/[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.32 by likewise, Mon Mar 31 08:00:01 2003 UTC revision 1.33 by likewise, Tue Apr 1 14:02:50 2003 UTC
# Line 410  udp_send(struct udp_pcb *pcb, struct pbu Line 410  udp_send(struct udp_pcb *pcb, struct pbu
410        /* chksum zero must become 0xffff, as zero means 'no checksum' */        /* chksum zero must become 0xffff, as zero means 'no checksum' */
411        if(udphdr->chksum == 0x0000) udphdr->chksum = 0xffff;        if(udphdr->chksum == 0x0000) udphdr->chksum = 0xffff;
412      }      }
413      DEBUGF(UDP_DEBUG, ("udp_send: UDP checksum %x\n", udphdr->chksum));      DEBUGF(UDP_DEBUG, ("udp_send: UDP checksum 0x%04x\n", udphdr->chksum));
414      snmp_inc_udpoutdatagrams();      snmp_inc_udpoutdatagrams();
415      DEBUGF(UDP_DEBUG, ("udp_send: ip_output_if(,,,,IP_PROTO_UDP,)\n"));      DEBUGF(UDP_DEBUG, ("udp_send: ip_output_if(,,,,IP_PROTO_UDP,)\n"));
416      /* output to IP */      /* output to IP */
417      err = ip_output_if(q, src_ip, &pcb->remote_ip, UDP_TTL, IP_PROTO_UDP, netif);          err = ip_output_if(q, src_ip, &pcb->remote_ip, UDP_TTL, IP_PROTO_UDP, netif);    
418    }    }
419    
420    /* did we chain a header? */    /* did we chain a header earlier? */
421    if (q != p) {    if (q != p) {
422      /* free the header */      /* free the header */
423      pbuf_free(q);      pbuf_free(q);
# Line 504  udp_bind(struct udp_pcb *pcb, struct ip_ Line 504  udp_bind(struct udp_pcb *pcb, struct ip_
504      pcb->next = udp_pcbs;      pcb->next = udp_pcbs;
505      udp_pcbs = pcb;      udp_pcbs = pcb;
506    }      }  
507    DEBUGF(UDP_DEBUG, ("udp_bind: bound to port %u\n", port));    DEBUGF(UDP_DEBUG | DBG_TRACE | DBG_STATE, ("udp_bind: bound to %u.%u.%u.%u, port %u\n",
508                           (u8_t)(ntohl(ipaddr->addr) >> 24 & 0xff),
509                           (u8_t)(ntohl(ipaddr->addr) >> 16 & 0xff),
510                           (u8_t)(ntohl(ipaddr->addr) >> 8 & 0xff),
511                           (u8_t)(ntohl(ipaddr->addr) & 0xff), port));
512    return ERR_OK;    return ERR_OK;
513  }  }
514  /**  /**

Legend:
Removed from v.1.32  
changed lines
  Added in v.1.33

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