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

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

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

revision 1.28 by likewise, Thu May 1 08:00:41 2003 UTC revision 1.29 by likewise, Sun May 18 22:29:10 2003 UTC
# Line 1105  static void dhcp_free_reply(struct dhcp Line 1105  static void dhcp_free_reply(struct dhcp
1105    
1106    
1107  /**  /**
1108   * If an incoming DHCP message is in response to use, then trigger the state machine   * If an incoming DHCP message is in response to us, then trigger the state machine
1109   */   */
1110  static void dhcp_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p, struct ip_addr *addr, u16_t port)  static void dhcp_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p, struct ip_addr *addr, u16_t port)
1111  {  {
# Line 1116  static void dhcp_recv(void *arg, struct Line 1116  static void dhcp_recv(void *arg, struct
1116    u8_t msg_type;    u8_t msg_type;
1117    u8_t i;    u8_t i;
1118    DEBUGF(DHCP_DEBUG | DBG_TRACE | 3, ("dhcp_recv(pbuf = %p) from DHCP server %u.%u.%u.%u port %u\n", p,    DEBUGF(DHCP_DEBUG | DBG_TRACE | 3, ("dhcp_recv(pbuf = %p) from DHCP server %u.%u.%u.%u port %u\n", p,
1119      (u8_t)(ntohl(addr->addr) >> 24 & 0xff),      (u8_t)(ntohl(addr->addr) >> 24 & 0xff), (u8_t)(ntohl(addr->addr) >> 16 & 0xff),
1120      (u8_t)(ntohl(addr->addr) >> 16 & 0xff),      (u8_t)(ntohl(addr->addr) >>  8 & 0xff), (u8_t)(ntohl(addr->addr) & 0xff), port));
     (u8_t)(ntohl(addr->addr) >>  8 & 0xff),  
     (u8_t)(ntohl(addr->addr) & 0xff), port));  
1121    DEBUGF(DHCP_DEBUG | DBG_TRACE, ("pbuf->len = %u\n", p->len));    DEBUGF(DHCP_DEBUG | DBG_TRACE, ("pbuf->len = %u\n", p->len));
1122    DEBUGF(DHCP_DEBUG | DBG_TRACE, ("pbuf->tot_len = %u\n", p->tot_len));    DEBUGF(DHCP_DEBUG | DBG_TRACE, ("pbuf->tot_len = %u\n", p->tot_len));
1123    /* prevent warning */    /* prevent warnings about unused arguments */
1124    if (pcb || addr || port);    (void)pcb; (void)addr; (void)port;
1125    dhcp->p = p;    dhcp->p = p;
1126      /* TODO: check packet length before reading them */
1127    if (reply_msg->op != DHCP_BOOTREPLY) {    if (reply_msg->op != DHCP_BOOTREPLY) {
1128      DEBUGF(DHCP_DEBUG | DBG_TRACE | 1, ("not a DHCP reply message, but type %u\n", reply_msg->op));      DEBUGF(DHCP_DEBUG | DBG_TRACE | 1, ("not a DHCP reply message, but type %u\n", reply_msg->op));
1129      pbuf_free(p);      pbuf_free(p);

Legend:
Removed from v.1.28  
changed lines
  Added in v.1.29

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