summaryrefslogtreecommitdiff
path: root/sys/net/if_ethersubr.c
diff options
context:
space:
mode:
authorBrooks Davis <brooks@FreeBSD.org>2001-09-05 21:10:28 +0000
committerBrooks Davis <brooks@FreeBSD.org>2001-09-05 21:10:28 +0000
commit9d4fe4b2b057bee4a25218783aa21a106679cf63 (patch)
treedb9a1b36fca844efd89c94c81d0a7b9fb126f325 /sys/net/if_ethersubr.c
parent914da7d0d3b32f346a637f178a8a8cf9f3adf2db (diff)
Notes
Diffstat (limited to 'sys/net/if_ethersubr.c')
-rw-r--r--sys/net/if_ethersubr.c20
1 files changed, 7 insertions, 13 deletions
diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c
index 5b646b8565df..3a943bfd3c21 100644
--- a/sys/net/if_ethersubr.c
+++ b/sys/net/if_ethersubr.c
@@ -101,11 +101,6 @@ extern u_char aarp_org_code[3];
#include <net/bridge.h>
#endif
-#include "vlan.h"
-#if NVLAN > 0
-#include <net/if_vlan_var.h>
-#endif /* NVLAN > 0 */
-
/* netgraph node hooks for ng_ether(4) */
void (*ng_ether_input_p)(struct ifnet *ifp,
struct mbuf **mp, struct ether_header *eh);
@@ -115,6 +110,10 @@ 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);
+int (*vlan_input_p)(struct ether_header *eh, struct mbuf *m);
+int (*vlan_input_tag_p)(struct ether_header *eh, struct mbuf *m,
+ u_int16_t t);
+
static int ether_resolvemulti __P((struct ifnet *, struct sockaddr **,
struct sockaddr *));
u_char etherbroadcastaddr[6] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
@@ -524,14 +523,6 @@ ether_demux(ifp, eh, m)
ether_type = ntohs(eh->ether_type);
-#if NVLAN > 0
- if (ether_type == vlan_proto) {
- if (vlan_input(eh, m) < 0)
- ifp->if_data.ifi_noproto++;
- return;
- }
-#endif /* NVLAN > 0 */
-
switch (ether_type) {
#ifdef INET
case ETHERTYPE_IP:
@@ -582,6 +573,9 @@ ether_demux(ifp, eh, m)
aarpinput(IFP2AC(ifp), m); /* XXX */
return;
#endif NETATALK
+ case ETHERTYPE_VLAN:
+ VLAN_INPUT(ifp, eh, m);
+ return;
default:
#ifdef IPX
if (ef_inputp && ef_inputp(ifp, eh, m) == 0)