/[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.5 by davidhaas, Thu Feb 6 22:18:56 2003 UTC revision 1.6 by davidhaas, Tue Feb 18 19:27:48 2003 UTC
# Line 95  ip_reass_timer(void *arg) Line 95  ip_reass_timer(void *arg)
95  {  {
96    if(ip_reasstmr > 1) {    if(ip_reasstmr > 1) {
97      ip_reasstmr--;      ip_reasstmr--;
98      sys_timeout(IP_REASS_TMO, (sys_timeout_handler) ip_reass_timer, NULL);      sys_timeout(IP_REASS_TMO, ip_reass_timer, NULL);
99    } else if(ip_reasstmr == 1)    } else if(ip_reasstmr == 1)
100          ip_reasstmr = 0;          ip_reasstmr = 0;
101  }  }
# Line 121  ip_reass(struct pbuf *p) Line 121  ip_reass(struct pbuf *p)
121      DEBUGF(IP_REASS_DEBUG, ("ip_reass: new packet\n"));      DEBUGF(IP_REASS_DEBUG, ("ip_reass: new packet\n"));
122      memcpy(iphdr, fraghdr, IP_HLEN);      memcpy(iphdr, fraghdr, IP_HLEN);
123      ip_reasstmr = IP_REASS_MAXAGE;      ip_reasstmr = IP_REASS_MAXAGE;
124      sys_timeout(IP_REASS_TMO, (sys_timeout_handler) ip_reass_timer, NULL);      sys_timeout(IP_REASS_TMO, ip_reass_timer, NULL);
125      ip_reassflags = 0;      ip_reassflags = 0;
126      /* Clear the bitmap. */      /* Clear the bitmap. */
127      memset(ip_reassbitmap, 0, sizeof(ip_reassbitmap));      memset(ip_reassbitmap, 0, sizeof(ip_reassbitmap));
# Line 148  ip_reass(struct pbuf *p) Line 148  ip_reass(struct pbuf *p)
148        DEBUGF(IP_REASS_DEBUG,        DEBUGF(IP_REASS_DEBUG,
149               ("ip_reass: fragment outside of buffer (%d:%d/%d).\n", offset,               ("ip_reass: fragment outside of buffer (%d:%d/%d).\n", offset,
150                offset + len, IP_REASS_BUFSIZE));                offset + len, IP_REASS_BUFSIZE));
151        sys_timeout_remove((sys_timeout_handler) ip_reass_timer, NULL);        sys_untimeout(ip_reass_timer, NULL);
152        ip_reasstmr = 0;        ip_reasstmr = 0;
153        goto nullreturn;        goto nullreturn;
154      }      }
# Line 236  ip_reass(struct pbuf *p) Line 236  ip_reass(struct pbuf *p)
236        /* If we have come this far, we have a full packet in the        /* If we have come this far, we have a full packet in the
237           buffer, so we allocate a pbuf and copy the packet into it. We           buffer, so we allocate a pbuf and copy the packet into it. We
238           also reset the timer. */           also reset the timer. */
239        sys_timeout_remove((sys_timeout_handler) ip_reass_timer, NULL);        sys_untimeout(ip_reass_timer, NULL);
240        ip_reasstmr = 0;        ip_reasstmr = 0;
241        pbuf_free(p);        pbuf_free(p);
242        p = pbuf_alloc(PBUF_LINK, ip_reasslen, PBUF_POOL);        p = pbuf_alloc(PBUF_LINK, ip_reasslen, PBUF_POOL);

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

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