diff options
| author | Lexi Winter <ivy@FreeBSD.org> | 2025-05-28 03:57:55 +0100 |
|---|---|---|
| committer | Lexi Winter <ivy@FreeBSD.org> | 2025-05-28 03:58:28 +0100 |
| commit | 2fccab7d768c3d6ccbec54c04922ccdd0602af47 (patch) | |
| tree | ea88aa218521a11ac096db4dd7d40a939ecf0435 | |
| parent | 2d6c5614aab89a93c56ef1ebff6817a024d17476 (diff) | |
if_vlan: add a prototype for vlan_input_plf/dev/vlan_input_p
Move the definition of vlan_input_p to net/if.c and its prototype to
if_vlan_var.h, to match the other functions exported from if_vlan.
Remove the previous comment which is now outdated.
This is required for if_bridge to use this function.
| -rw-r--r-- | sys/net/if.c | 1 | ||||
| -rw-r--r-- | sys/net/if_ethersubr.c | 2 | ||||
| -rw-r--r-- | sys/net/if_vlan.c | 9 | ||||
| -rw-r--r-- | sys/net/if_vlan_var.h | 1 |
4 files changed, 2 insertions, 11 deletions
diff --git a/sys/net/if.c b/sys/net/if.c index 0255c27a3136..d81608924b41 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -2104,6 +2104,7 @@ int (*vlan_tag_p)(struct ifnet *, uint16_t *); int (*vlan_pcp_p)(struct ifnet *, uint16_t *); int (*vlan_setcookie_p)(struct ifnet *, void *); void *(*vlan_cookie_p)(struct ifnet *); +void (*vlan_input_p)(struct ifnet *, struct mbuf *); /* * Handle a change in the interface link state. To avoid LORs diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c index cb858f20f3b6..b72528c9e21c 100644 --- a/sys/net/if_ethersubr.c +++ b/sys/net/if_ethersubr.c @@ -106,8 +106,6 @@ int (*ng_ether_output_p)(struct ifnet *ifp, struct mbuf **mp); void (*ng_ether_attach_p)(struct ifnet *ifp); void (*ng_ether_detach_p)(struct ifnet *ifp); -void (*vlan_input_p)(struct ifnet *, struct mbuf *); - /* if_bridge(4) support */ void (*bridge_dn_p)(struct mbuf *, struct ifnet *); bool (*bridge_same_p)(const void *, const void *); diff --git a/sys/net/if_vlan.c b/sys/net/if_vlan.c index a37a9d41fc53..9561ae5c316c 100644 --- a/sys/net/if_vlan.c +++ b/sys/net/if_vlan.c @@ -888,15 +888,6 @@ vlan_devat(struct ifnet *ifp, uint16_t vid) return (ifp); } -/* - * VLAN support can be loaded as a module. The only place in the - * system that's intimately aware of this is ether_input. We hook - * into this code through vlan_input_p which is defined there and - * set here. No one else in the system should be aware of this so - * we use an explicit reference here. - */ -extern void (*vlan_input_p)(struct ifnet *, struct mbuf *); - /* For if_link_state_change() eyes only... */ extern void (*vlan_link_state_p)(struct ifnet *); diff --git a/sys/net/if_vlan_var.h b/sys/net/if_vlan_var.h index e7171974289b..24b53d66da4d 100644 --- a/sys/net/if_vlan_var.h +++ b/sys/net/if_vlan_var.h @@ -168,6 +168,7 @@ extern int (*vlan_tag_p)(struct ifnet *, uint16_t *); extern int (*vlan_pcp_p)(struct ifnet *, uint16_t *); extern int (*vlan_setcookie_p)(struct ifnet *, void *); extern void *(*vlan_cookie_p)(struct ifnet *); +extern void (*vlan_input_p)(struct ifnet *, struct mbuf *); #include <sys/_eventhandler.h> |
