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 |
} |
} |
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", |