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

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

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

revision 1.33 by softins, Wed Jul 21 09:23:11 2004 UTC revision 1.34 by likewise, Thu Nov 25 13:33:07 2004 UTC
# Line 85  ip_route(struct ip_addr *dest) Line 85  ip_route(struct ip_addr *dest)
85    /* iterate through netifs */    /* iterate through netifs */
86    for(netif = netif_list; netif != NULL; netif = netif->next) {    for(netif = netif_list; netif != NULL; netif = netif->next) {
87      /* network mask matches? */      /* network mask matches? */
88      if (ip_addr_maskcmp(dest, &(netif->ip_addr), &(netif->netmask))) {      if (ip_addr_netcmp(dest, &(netif->ip_addr), &(netif->netmask))) {
89        /* return netif on which to forward IP packet */        /* return netif on which to forward IP packet */
90        return netif;        return netif;
91      }      }
# Line 240  ip_input(struct pbuf *p, struct netif *i Line 240  ip_input(struct pbuf *p, struct netif *i
240        if (ip_addr_cmp(&(iphdr->dest), &(netif->ip_addr)) ||        if (ip_addr_cmp(&(iphdr->dest), &(netif->ip_addr)) ||
241          /* or broadcast matching this interface network address? */          /* or broadcast matching this interface network address? */
242          (ip_addr_isbroadcast(&(iphdr->dest), netif) &&          (ip_addr_isbroadcast(&(iphdr->dest), netif) &&
243           ip_addr_maskcmp(&(iphdr->dest), &(netif->ip_addr), &(netif->netmask))) ||           ip_addr_netcmp(&(iphdr->dest), &(netif->ip_addr), &(netif->netmask))) ||
244           /* or restricted broadcast? */           /* or restricted broadcast? */
245           ip_addr_cmp(&(iphdr->dest), IP_ADDR_BROADCAST)) {           ip_addr_cmp(&(iphdr->dest), IP_ADDR_BROADCAST)) {
246          LWIP_DEBUGF(IP_DEBUG, ("ip_input: packet accepted on interface %c%c\n",          LWIP_DEBUGF(IP_DEBUG, ("ip_input: packet accepted on interface %c%c\n",

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

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