diff options
| author | Jeff Roberson <jeff@FreeBSD.org> | 2011-03-21 09:40:01 +0000 |
|---|---|---|
| committer | Jeff Roberson <jeff@FreeBSD.org> | 2011-03-21 09:40:01 +0000 |
| commit | e4cd31dd3c7adc94a486ca5309c7096f81fa70f1 (patch) | |
| tree | 79d67d85de5b498560d0272509bd0b1bfccf7d86 /sys/net/if_vlan_var.h | |
| parent | 0b626a289e9814fa1f14ea32280410521fc43224 (diff) | |
Notes
Diffstat (limited to 'sys/net/if_vlan_var.h')
| -rw-r--r-- | sys/net/if_vlan_var.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/sys/net/if_vlan_var.h b/sys/net/if_vlan_var.h index ec71df1ace7c..fd3fc4f3c363 100644 --- a/sys/net/if_vlan_var.h +++ b/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_ */ |
