ronnie
2022-10-14 1504bb53e29d3d46222c0b3ea994fc494b48e153
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/*
 * Linux VLAN configuration kernel interface
 * Copyright (c) 2016, Jouni Malinen <j@w1.fi>
 *
 * This software may be distributed under the terms of the BSD license.
 * See README for more details.
 */
 
#ifndef LINUX_VLAN_H
#define LINUX_VLAN_H
 
/* This ioctl is defined in linux/sockios.h */
 
#ifndef SIOCSIFVLAN
#define SIOCSIFVLAN 0x8983
#endif /* SIOCSIFVLAN */
 
/* This interface is defined in linux/if_vlan.h */
 
#define ADD_VLAN_CMD 0
#define DEL_VLAN_CMD 1
#define SET_VLAN_INGRESS_PRIORITY_CMD 2
#define SET_VLAN_EGRESS_PRIORITY_CMD 3
#define GET_VLAN_INGRESS_PRIORITY_CMD 4
#define GET_VLAN_EGRESS_PRIORITY_CMD 5
#define SET_VLAN_NAME_TYPE_CMD 6
#define SET_VLAN_FLAG_CMD 7
#define GET_VLAN_REALDEV_NAME_CMD 8
#define GET_VLAN_VID_CMD 9
 
#define VLAN_NAME_TYPE_PLUS_VID 0
#define VLAN_NAME_TYPE_RAW_PLUS_VID 1
#define VLAN_NAME_TYPE_PLUS_VID_NO_PAD 2
#define VLAN_NAME_TYPE_RAW_PLUS_VID_NO_PAD 3
 
struct vlan_ioctl_args {
   int cmd;
   char device1[24];
 
   union {
       char device2[24];
       int VID;
       unsigned int skb_priority;
       unsigned int name_type;
       unsigned int bind_type;
       unsigned int flag;
   } u;
 
   short vlan_qos;
};
 
#endif /* LINUX_VLAN_H */