You can set the vlan priority field using sockopt ():
int priority = 7; setsockopt(sfd, SOL_SOCKET, SO_PRIORITY, &priority, sizeof(priority));
In the file net / 8021q / vlan_dev.c you can see that the priority field skb-> is used for VLAN 802.1Q TCI ...
source share