diff options
author | jeff <jeff@FreeBSD.org> | 2011-03-21 09:40:01 +0000 |
---|---|---|
committer | jeff <jeff@FreeBSD.org> | 2011-03-21 09:40:01 +0000 |
commit | 2d7d8c05e7404fbebf1f0fe24c13bc5bb58d2338 (patch) | |
tree | 79d67d85de5b498560d0272509bd0b1bfccf7d86 /sys/net/if_vlan_var.h | |
parent | 3420a736119b646db3defc2c3e24d534e35d73a0 (diff) | |
download | FreeBSD-src-2d7d8c05e7404fbebf1f0fe24c13bc5bb58d2338.zip FreeBSD-src-2d7d8c05e7404fbebf1f0fe24c13bc5bb58d2338.tar.gz |
- Merge changes to the base system to support OFED. These include
a wider arg2 for sysctl, updates to vlan code, IFT_INFINIBAND,
and other miscellaneous small features.
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 ec71df1..fd3fc4f 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_ */ |