summaryrefslogtreecommitdiffstats
path: root/freebsd/sys/net/if_vlan_var.h
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2013-11-06 16:20:21 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2013-11-11 10:08:08 +0100
commit66659ff1ad6831b0ea7425fa6ecd8a8687523658 (patch)
tree48e22b475fa8854128e0861a33fed6f78c8094b5 /freebsd/sys/net/if_vlan_var.h
parentDefine __GLOBL1() and __GLOBL() (diff)
downloadrtems-libbsd-66659ff1ad6831b0ea7425fa6ecd8a8687523658.tar.bz2
Update to FreeBSD 9.2
Diffstat (limited to 'freebsd/sys/net/if_vlan_var.h')
-rw-r--r--freebsd/sys/net/if_vlan_var.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/freebsd/sys/net/if_vlan_var.h b/freebsd/sys/net/if_vlan_var.h
index ec71df1a..fd3fc4f3 100644
--- a/freebsd/sys/net/if_vlan_var.h
+++ b/freebsd/sys/net/if_vlan_var.h
@@ -131,7 +131,25 @@ struct vlanreq {
(*vlan_trunk_cap_p)(_ifp); \
} while (0)
+#define VLAN_TRUNKDEV(_ifp) \
+ (_ifp)->if_type == IFT_L2VLAN ? (*vlan_trunkdev_p)((_ifp)) : NULL
+#define VLAN_TAG(_ifp, _tag) \
+ (_ifp)->if_type == IFT_L2VLAN ? (*vlan_tag_p)((_ifp), (_tag)) : EINVAL
+#define VLAN_COOKIE(_ifp) \
+ (_ifp)->if_type == IFT_L2VLAN ? (*vlan_cookie_p)((_ifp)) : NULL
+#define VLAN_SETCOOKIE(_ifp, _cookie) \
+ (_ifp)->if_type == IFT_L2VLAN ? \
+ (*vlan_setcookie_p)((_ifp), (_cookie)) : EINVAL
+#define VLAN_DEVAT(_ifp, _tag) \
+ (_ifp)->if_vlantrunk != NULL ? (*vlan_devat_p)((_ifp), (_tag)) : NULL
+
extern void (*vlan_trunk_cap_p)(struct ifnet *);
+extern struct ifnet *(*vlan_trunkdev_p)(struct ifnet *);
+extern struct ifnet *(*vlan_devat_p)(struct ifnet *, uint16_t);
+extern int (*vlan_tag_p)(struct ifnet *, uint16_t *);
+extern int (*vlan_setcookie_p)(struct ifnet *, void *);
+extern void *(*vlan_cookie_p)(struct ifnet *);
+
#endif /* _KERNEL */
#endif /* _NET_IF_VLAN_VAR_H_ */