Lines Matching defs:netif
36 #include "lwip/netif.h"
37 #include "netif/etharp.h" /* proxy arp hook */
50 proxy_ip4_is_mapped_loopback(struct netif *netif, const ip_addr_t *dst, ip_addr_t *lo)
62 if (!ip_addr_netcmp(dst, &netif->ip_addr, &netif->netmask)) {
66 /* XXX: TODO: check netif is a proxying netif! */
68 off = ntohl(ip4_addr_get_u32(dst) & ~ip4_addr_get_u32(&netif->netmask));
88 pxremap_proxy_arp(struct netif *netif, ip_addr_t *dst)
90 return proxy_ip4_is_mapped_loopback(netif, dst, NULL);
97 * "dst" to proxy (instead of forwarding them via "netif" or dropping).
100 pxremap_ip4_divert(struct netif *netif, ip_addr_t *dst)
102 return proxy_ip4_is_mapped_loopback(netif, dst, NULL);
116 struct netif *netif;
121 for (netif = netif_list; netif != NULL; netif = netif->next) {
122 if (netif_is_up(netif) /* && this is a proxy netif */) {
123 if (proxy_ip4_is_mapped_loopback(netif, src, dst)) {
146 struct netif *netif;
160 netif = ip_route(target);
161 if (netif == NULL) {
165 netif = netif_list;
166 LWIP_ASSERT1(netif != NULL);
167 LWIP_ASSERT1(netif->next == NULL);
175 ip_addr_get_network(&net, &netif->ip_addr, &netif->netmask);
188 proxy_ip6_is_mapped_loopback(struct netif *netif, ip6_addr_t *dst)
192 /* XXX: TODO: check netif is a proxying netif! */
197 if (ip6_addr_ispreferred(netif_ip6_addr_state(netif, i))
198 && ip6_addr_isuniquelocal(netif_ip6_addr(netif, i)))
200 ip6_addr_t *ifaddr = netif_ip6_addr(netif, i);
219 pxremap_proxy_na(struct netif *netif, ip6_addr_t *dst)
221 return proxy_ip6_is_mapped_loopback(netif, dst);
227 * "dst" to proxy (instead of forwarding them via "netif" or dropping).
230 pxremap_ip6_divert(struct netif *netif, ip6_addr_t *dst)
232 return proxy_ip6_is_mapped_loopback(netif, dst);
246 struct netif *netif;
252 for (netif = netif_list; netif != NULL; netif = netif->next) {
253 if (!netif_is_up(netif) /* || this is not a proxy netif */) {
258 if (ip6_addr_ispreferred(netif_ip6_addr_state(netif, i))
259 && ip6_addr_isuniquelocal(netif_ip6_addr(netif, i)))
261 ip6_addr_t *ifaddr = netif_ip6_addr(netif, i);
291 struct netif *netif;
301 netif = ip6_route_fwd(target);
302 if (netif == NULL) {
306 netif = netif_list;
307 LWIP_ASSERT1(netif != NULL);
308 LWIP_ASSERT1(netif->next == NULL);
312 ip6_addr_t *ifaddr = netif_ip6_addr(netif, i);
313 if (ip6_addr_ispreferred(netif_ip6_addr_state(netif, i))