mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2025-08-06 22:44:38 +08:00
Added option LWIP_ARP_FILTER_NETIF to use multiple IPs on one hardware interface (by using multiple netifs, each with its own IP)
This commit is contained in:
parent
597764e35b
commit
d656e9f28e
@ -157,6 +157,16 @@ PACK_STRUCT_END
|
|||||||
#define ARP_REQUEST 1
|
#define ARP_REQUEST 1
|
||||||
#define ARP_REPLY 2
|
#define ARP_REPLY 2
|
||||||
|
|
||||||
|
/** Define this to 1 and define LWIP_ARP_FILTER_NETIF_FN(pbuf, netif, type)
|
||||||
|
* to a filter function that returns the correct netif when using multiple
|
||||||
|
* netifs on one hardware interface where the netif's low-level receive
|
||||||
|
* routine cannot decide for the correct netif (e.g. when mapping multiple
|
||||||
|
* IP addresses to one hardware interface).
|
||||||
|
*/
|
||||||
|
#ifndef LWIP_ARP_FILTER_NETIF
|
||||||
|
#define LWIP_ARP_FILTER_NETIF 0
|
||||||
|
#endif
|
||||||
|
|
||||||
#if ARP_QUEUEING
|
#if ARP_QUEUEING
|
||||||
/** struct for queueing outgoing packets for unknown address
|
/** struct for queueing outgoing packets for unknown address
|
||||||
* defined here to be accessed by memp.h
|
* defined here to be accessed by memp.h
|
||||||
|
@ -1226,6 +1226,10 @@ ethernet_input(struct pbuf *p, struct netif *netif)
|
|||||||
}
|
}
|
||||||
#endif /* ETHARP_SUPPORT_VLAN */
|
#endif /* ETHARP_SUPPORT_VLAN */
|
||||||
|
|
||||||
|
#if LWIP_ARP_FILTER_NETIF
|
||||||
|
netif = LWIP_ARP_FILTER_NETIF_FN(p, netif, type);
|
||||||
|
#endif /* LWIP_ARP_FILTER_NETIF*/
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
#if LWIP_ARP
|
#if LWIP_ARP
|
||||||
/* IP packet? */
|
/* IP packet? */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user