ethernetPacket::SetVlanPriority
Valid for: CANoe DE • CANoe4SW DEMethod Syntax
long ethernetPacket.SetVlanPriority(word vlanPriority);// form 1long ethernetPacket.SetVlanPriority(dword vlanIndex, word vlanPriority);// form 2
Description
Sets the VLAN priority of an Ethernet packet. If the packets do not contain a VLAN tag, a new VLAN tag is added. For double-tagged VLAN, form 2 can be used.Parameters
-
vlanPriority: The VLAN priority to set.
Range: 0..7 -
vlanIndex: Index of the VLAN tag for double-tagged VLANs. Index 0 is the inner VLAN, index 1 the outer VLAN.
Range: 0..2
Return Values
- 0: Success
- 1: Failed to add VLAN tag
- 2: VLAN priority out of range