1 From: Patrick McHardy <kaber@trash.net>
2 Date: Fri, 18 Jan 2008 16:55:48 +0000 (+0100)
3 Subject: [LIBNL]: Add if_vlan.h
4 X-Git-Url: http://git.kernel.org/?p=libs%2Fnetlink%2Flibnl.git;a=commitdiff_plain;h=e91bb2ffb090955d443e643a25b250bf3d33534a;hp=7f6b7a8eea0334b34d58dec72c66121a76f08958
8 vlan support needs VLAN_FLAG_REORDER_HDR, which is not available in
9 older if_vlan.h versions. Add the current version from the kernel.
11 Signed-off-by: Patrick McHardy <kaber@trash.net>
15 +++ b/include/linux/if_vlan.h
18 + * VLAN An implementation of 802.1Q VLAN tagging.
20 + * Authors: Ben Greear <greearb@candelatech.com>
22 + * This program is free software; you can redistribute it and/or
23 + * modify it under the terms of the GNU General Public License
24 + * as published by the Free Software Foundation; either version
25 + * 2 of the License, or (at your option) any later version.
29 +#ifndef _LINUX_IF_VLAN_H_
30 +#define _LINUX_IF_VLAN_H_
33 +/* VLAN IOCTLs are found in sockios.h */
35 +/* Passed in vlan_ioctl_args structure to determine behaviour. */
36 +enum vlan_ioctl_cmds {
39 + SET_VLAN_INGRESS_PRIORITY_CMD,
40 + SET_VLAN_EGRESS_PRIORITY_CMD,
41 + GET_VLAN_INGRESS_PRIORITY_CMD,
42 + GET_VLAN_EGRESS_PRIORITY_CMD,
43 + SET_VLAN_NAME_TYPE_CMD,
45 + GET_VLAN_REALDEV_NAME_CMD, /* If this works, you know it's a VLAN device, btw */
46 + GET_VLAN_VID_CMD /* Get the VID of this VLAN (specified by name) */
50 + VLAN_FLAG_REORDER_HDR = 0x1,
53 +enum vlan_name_types {
54 + VLAN_NAME_TYPE_PLUS_VID, /* Name will look like: vlan0005 */
55 + VLAN_NAME_TYPE_RAW_PLUS_VID, /* name will look like: eth1.0005 */
56 + VLAN_NAME_TYPE_PLUS_VID_NO_PAD, /* Name will look like: vlan5 */
57 + VLAN_NAME_TYPE_RAW_PLUS_VID_NO_PAD, /* Name will look like: eth0.5 */
58 + VLAN_NAME_TYPE_HIGHEST
61 +struct vlan_ioctl_args {
62 + int cmd; /* Should be one of the vlan_ioctl_cmds enum above. */
68 + unsigned int skb_priority;
69 + unsigned int name_type;
70 + unsigned int bind_type;
71 + unsigned int flag; /* Matches vlan_dev_info flags */
77 +#endif /* !(_LINUX_IF_VLAN_H_) */