diff options
-rw-r--r-- | networking/vconfig.c | 36 |
1 files changed, 35 insertions, 1 deletions
diff --git a/networking/vconfig.c b/networking/vconfig.c index d58c375f7..0bb33084a 100644 --- a/networking/vconfig.c +++ b/networking/vconfig.c | |||
@@ -27,11 +27,45 @@ | |||
27 | #include <fcntl.h> | 27 | #include <fcntl.h> |
28 | #include <sys/ioctl.h> | 28 | #include <sys/ioctl.h> |
29 | #include <net/if.h> | 29 | #include <net/if.h> |
30 | #include <linux/if_vlan.h> | ||
31 | #include <string.h> | 30 | #include <string.h> |
32 | #include <limits.h> | 31 | #include <limits.h> |
33 | #include "busybox.h" | 32 | #include "busybox.h" |
34 | 33 | ||
34 | /* Stuff from linux/if_vlan.h, kernel version 2.4.23 */ | ||
35 | enum vlan_ioctl_cmds { | ||
36 | ADD_VLAN_CMD, | ||
37 | DEL_VLAN_CMD, | ||
38 | SET_VLAN_INGRESS_PRIORITY_CMD, | ||
39 | SET_VLAN_EGRESS_PRIORITY_CMD, | ||
40 | GET_VLAN_INGRESS_PRIORITY_CMD, | ||
41 | GET_VLAN_EGRESS_PRIORITY_CMD, | ||
42 | SET_VLAN_NAME_TYPE_CMD, | ||
43 | SET_VLAN_FLAG_CMD | ||
44 | }; | ||
45 | enum vlan_name_types { | ||
46 | VLAN_NAME_TYPE_PLUS_VID, /* Name will look like: vlan0005 */ | ||
47 | VLAN_NAME_TYPE_RAW_PLUS_VID, /* name will look like: eth1.0005 */ | ||
48 | VLAN_NAME_TYPE_PLUS_VID_NO_PAD, /* Name will look like: vlan5 */ | ||
49 | VLAN_NAME_TYPE_RAW_PLUS_VID_NO_PAD, /* Name will look like: eth0.5 */ | ||
50 | VLAN_NAME_TYPE_HIGHEST | ||
51 | }; | ||
52 | |||
53 | struct vlan_ioctl_args { | ||
54 | int cmd; /* Should be one of the vlan_ioctl_cmds enum above. */ | ||
55 | char device1[24]; | ||
56 | |||
57 | union { | ||
58 | char device2[24]; | ||
59 | int VID; | ||
60 | unsigned int skb_priority; | ||
61 | unsigned int name_type; | ||
62 | unsigned int bind_type; | ||
63 | unsigned int flag; /* Matches vlan_dev_info flags */ | ||
64 | } u; | ||
65 | |||
66 | short vlan_qos; | ||
67 | }; | ||
68 | |||
35 | #define VLAN_GROUP_ARRAY_LEN 4096 | 69 | #define VLAN_GROUP_ARRAY_LEN 4096 |
36 | #define SIOCSIFVLAN 0x8983 /* Set 802.1Q VLAN options */ | 70 | #define SIOCSIFVLAN 0x8983 /* Set 802.1Q VLAN options */ |
37 | 71 | ||