/[lwip]/lwip/src/core/ipv4/ip_frag.c
ViewVC logotype

Diff of /lwip/src/core/ipv4/ip_frag.c

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

revision 1.1 by jani, Fri Nov 22 15:46:50 2002 UTC revision 1.2 by jani, Wed Dec 18 10:40:01 2002 UTC
# Line 62  copy_from_pbuf(struct pbuf *p, u16_t * o Line 62  copy_from_pbuf(struct pbuf *p, u16_t * o
62    p->len -= *offset;    p->len -= *offset;
63    while (len) {    while (len) {
64      l = len < p->len ? len : p->len;      l = len < p->len ? len : p->len;
65      bcopy(p->payload, buffer, l);      memcpy(buffer, p->payload, l);
66      buffer += l;      buffer += l;
67      len -= l;      len -= l;
68      if (len)      if (len)
# Line 112  ip_reass(struct pbuf *p) Line 112  ip_reass(struct pbuf *p)
112       buffer. The timer is updated with the maximum age. */       buffer. The timer is updated with the maximum age. */
113    if (ip_reasstmr == 0) {    if (ip_reasstmr == 0) {
114      DEBUGF(IP_REASS_DEBUG, ("ip_reass: new packet\n"));      DEBUGF(IP_REASS_DEBUG, ("ip_reass: new packet\n"));
115      bcopy(fraghdr, iphdr, IP_HLEN);      memcpy(iphdr, fraghdr, IP_HLEN);
116      ip_reasstmr = IP_REASS_MAXAGE;      ip_reasstmr = IP_REASS_MAXAGE;
117      sys_timeout(IP_REASS_TMO, (sys_timeout_handler) ip_reass_timer, NULL);      sys_timeout(IP_REASS_TMO, (sys_timeout_handler) ip_reass_timer, NULL);
118      ip_reassflags = 0;      ip_reassflags = 0;
119      /* Clear the bitmap. */      /* Clear the bitmap. */
120      bzero(ip_reassbitmap, sizeof(ip_reassbitmap));      memset(ip_reassbitmap, 0, sizeof(ip_reassbitmap));
121    }    }
122    
123    /* Check if the incoming fragment matches the one currently present    /* Check if the incoming fragment matches the one currently present
# Line 235  ip_reass(struct pbuf *p) Line 235  ip_reass(struct pbuf *p)
235               avaliable data in the pbuf is given by the q->len               avaliable data in the pbuf is given by the q->len
236               variable. */               variable. */
237            DEBUGF(IP_REASS_DEBUG,            DEBUGF(IP_REASS_DEBUG,
238                   ("ip_reass: bcopy from %p (%d) to %p, %d bytes\n",                   ("ip_reass: memcpy from %p (%d) to %p, %d bytes\n",
239                    &ip_reassbuf[i], i, q->payload,                    &ip_reassbuf[i], i, q->payload,
240                    q->len > ip_reasslen - i ? ip_reasslen - i : q->len));                    q->len > ip_reasslen - i ? ip_reasslen - i : q->len));
241            bcopy(&ip_reassbuf[i], q->payload,            memcpy(q->payload, &ip_reassbuf[i],
242                  q->len > ip_reasslen - i ? ip_reasslen - i : q->len);                  q->len > ip_reasslen - i ? ip_reasslen - i : q->len);
243            i += q->len;            i += q->len;
244          }          }
# Line 284  ip_frag(struct pbuf *p, struct netif *ne Line 284  ip_frag(struct pbuf *p, struct netif *ne
284    
285    /* Copy the IP header in it */    /* Copy the IP header in it */
286    iphdr = rambuf->payload;    iphdr = rambuf->payload;
287    bcopy(p->payload, iphdr, IP_HLEN);    memcpy(iphdr, p->payload, IP_HLEN);
288    
289    /* Save original offset */    /* Save original offset */
290    tmp = ntohs(IPH_OFFSET(iphdr));    tmp = ntohs(IPH_OFFSET(iphdr));

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

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