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