/[lwip]/lwip/src/netif/etharp.c
ViewVC logotype

Diff of /lwip/src/netif/etharp.c

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

revision 1.31 by likewise, Sun Mar 16 23:46:29 2003 UTC revision 1.32 by davidhaas, Tue Mar 18 14:48:40 2003 UTC
# Line 202  find_arp_entry(void) Line 202  find_arp_entry(void)
202        /* remember entry with oldest stable entry in j*/        /* remember entry with oldest stable entry in j*/
203        if((arp_table[i].state == ETHARP_STATE_STABLE) &&        if((arp_table[i].state == ETHARP_STATE_STABLE) &&
204  #if ARP_QUEUEING /* do not want to re-use an entry with queued packets */  #if ARP_QUEUEING /* do not want to re-use an entry with queued packets */
205        (arp_table[i].p != NULL) &&        (arp_table[i].p == NULL) &&
206  #endif  #endif
207        (arp_table[i].ctime >= maxtime)) {        (arp_table[i].ctime >= maxtime)) {
208          maxtime = arp_table[i].ctime;          maxtime = arp_table[i].ctime;
# Line 682  struct pbuf *etharp_query(struct netif * Line 682  struct pbuf *etharp_query(struct netif *
682      arp_table[i].p = NULL;      arp_table[i].p = NULL;
683  #endif  #endif
684    }    }
685    #if ARP_QUEUEING
686      /* any pbuf to queue and queue is empty? */
687      if ((q != NULL) && (arp_table[i].p == NULL)) {
688        /* copy PBUF_REF referenced payloads to PBUF_RAM */
689        q = pbuf_unref(q);
690        /* pbufs are queued, increase the reference count */
691        pbuf_ref_chain(q);
692        /* remember pbuf to queue, if any */
693        arp_table[i].p = q;
694        DEBUGF(ETHARP_DEBUG, ("etharp_query: queued packet on ARP entry.\n"));
695      }
696    #endif
697    /* allocate a pbuf for the outgoing ARP request packet */    /* allocate a pbuf for the outgoing ARP request packet */
698    p = pbuf_alloc(PBUF_LINK, sizeof(struct etharp_hdr), PBUF_RAM);    p = pbuf_alloc(PBUF_LINK, sizeof(struct etharp_hdr), PBUF_RAM);
699    /* could allocate pbuf? */    /* could allocate pbuf? */
# Line 717  struct pbuf *etharp_query(struct netif * Line 729  struct pbuf *etharp_query(struct netif *
729    } else {    } else {
730      DEBUGF(ETHARP_DEBUG, ("etharp_query: could not allocate pbuf for ARP request.\n"));      DEBUGF(ETHARP_DEBUG, ("etharp_query: could not allocate pbuf for ARP request.\n"));
731    }    }
 #if ARP_QUEUEING  
   /* any pbuf to queue and queue is empty? */  
   if ((q != NULL) && (arp_table[i].p == NULL)) {  
     /* copy PBUF_REF referenced payloads to PBUF_RAM */  
     q = pbuf_unref(q);  
     /* pbufs are queued, increase the reference count */  
     pbuf_ref_chain(q);  
     /* remember pbuf to queue, if any */  
     arp_table[i].p = q;  
     DEBUGF(ETHARP_DEBUG, ("etharp_query: queued packet on ARP entry.\n"));  
   }  
 #endif  
732    return NULL;    return NULL;
733  }  }

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

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