ethernetPacket::GetVlan
Valid for: CANoe DE • CANoe4SW DEMethod Syntax
long ethernetPacket.GetVlan(word &tpid, word &tci)// form 1long ethernetPacket.GetVlan(dword vlanIndex, word &tpid, word &tci)// form 2
Description
Returns the VLAN tag, if the Ethernet packet contains a VLAN tag.For double-tagged VLAN form 2 can be used to access a specific VLAN tag.
Parameters
- vlanIndex: Index of the VLAN tag for double-tagged VLANs. Index 0 is the inner VLAN, index 1 the outer VLAN.
Range: 0..2 - tpid: Returns the VLAN TPDI value.
- tci: Returns the VALN TCI value.
Return Values
- 0: Success
- 1: Packet does not contain VLAN
- <0: Internal error