/[lwip]/lwip/src/core/udp.c
ViewVC logotype

Diff of /lwip/src/core/udp.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.35 by likewise, Tue Apr 1 15:00:26 2003 UTC revision 1.36 by likewise, Fri Apr 4 08:14:49 2003 UTC
# Line 509  udp_bind(struct udp_pcb *pcb, struct ip_ Line 509  udp_bind(struct udp_pcb *pcb, struct ip_
509      udp_pcbs = pcb;      udp_pcbs = pcb;
510    }      }  
511    DEBUGF(UDP_DEBUG | DBG_TRACE | DBG_STATE, ("udp_bind: bound to %u.%u.%u.%u, port %u\n",    DEBUGF(UDP_DEBUG | DBG_TRACE | DBG_STATE, ("udp_bind: bound to %u.%u.%u.%u, port %u\n",
512     (u8_t)(ntohl(ipaddr->addr) >> 24 & 0xff),     (u8_t)(ntohl(pcb->local_ip.addr) >> 24 & 0xff),
513     (u8_t)(ntohl(ipaddr->addr) >> 16 & 0xff),     (u8_t)(ntohl(pcb->local_ip.addr) >> 16 & 0xff),
514     (u8_t)(ntohl(ipaddr->addr) >> 8 & 0xff),     (u8_t)(ntohl(pcb->local_ip.addr) >> 8 & 0xff),
515     (u8_t)(ntohl(ipaddr->addr) & 0xff), port));     (u8_t)(ntohl(pcb->local_ip.addr) & 0xff), pcb->local_port));
516    return ERR_OK;    return ERR_OK;
517  }  }
518  /**  /**
# Line 543  udp_connect(struct udp_pcb *pcb, struct Line 543  udp_connect(struct udp_pcb *pcb, struct
543    pcb->remote_port = port;    pcb->remote_port = port;
544  /** TODO: this functionality belongs in upper layers */  /** TODO: this functionality belongs in upper layers */
545  #if 0  #if 0
   
546    pcb->flags |= UDP_FLAGS_CONNECTED;    pcb->flags |= UDP_FLAGS_CONNECTED;
547    /* Nail down local IP for netconn_addr()/getsockname() */    /* Nail down local IP for netconn_addr()/getsockname() */
548    if(ip_addr_isany(&pcb->local_ip) && !ip_addr_isany(&pcb->remote_ip)) {    if(ip_addr_isany(&pcb->local_ip) && !ip_addr_isany(&pcb->remote_ip)) {
# Line 564  udp_connect(struct udp_pcb *pcb, struct Line 563  udp_connect(struct udp_pcb *pcb, struct
563      pcb->local_ip.addr = 0;      pcb->local_ip.addr = 0;
564    }    }
565  #endif  #endif
566      DEBUGF(UDP_DEBUG | DBG_TRACE | DBG_STATE, ("udp_connect: connected to %u.%u.%u.%u, port %u\n",
567       (u8_t)(ntohl(pcb->remote_ip.addr) >> 24 & 0xff),
568       (u8_t)(ntohl(pcb->remote_ip.addr) >> 16 & 0xff),
569       (u8_t)(ntohl(pcb->remote_ip.addr) >> 8 & 0xff),
570       (u8_t)(ntohl(pcb->remote_ip.addr) & 0xff), pcb->remote_port));
571    
572    /* Insert UDP PCB into the list of active UDP PCBs. */    /* Insert UDP PCB into the list of active UDP PCBs. */
573    for(ipcb = udp_pcbs; ipcb != NULL; ipcb = ipcb->next) {    for(ipcb = udp_pcbs; ipcb != NULL; ipcb = ipcb->next) {
574      if(pcb == ipcb) {      if(pcb == ipcb) {

Legend:
Removed from v.1.35  
changed lines
  Added in v.1.36

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26