PacketProtocolTag
classThis tag specifies the protocol of the packet.
Packet processing at the sender ===============================
| ApplicationData | whole packet has no protocol data part has no protocol
| UdpHeader ApplicationData | whole packet has UDP protocol data part has UDP protocol
| Ipv4Header UdpHeader ApplicationData | whole packet has IPv4 protocol data part has IPv4 protocol
EthernetMacHeader | Ipv4Header UdpHeader ApplicationData | whole packet has incomplete Ethernet protocol data part has IPv4 protocol
EthernetMacHeader | Ipv4Header UdpHeader ApplicationData | EthernetPadding EthernetFcs whole packet has Ethernet protocol data part has IPv4 protocol
| EthernetMacHeader Ipv4Header UdpHeader ApplicationData EthernetPadding EthernetFcs | whole packet has Ethernet protocol data part has Ethernet protocol
Packet processing at the receiver =================================
| EthernetMacHeader Ipv4Header UdpHeader ApplicationData EthernetPadding EthernetFcs | whole packet has Ethernet protocol data part has Ethernet protocol
EthernetMacHeader Ipv4Header UdpHeader ApplicationData EthernetPadding | EthernetFcs whole packet has Ethernet protocol data part has no protocol
EthernetMacHeader | Ipv4Header UdpHeader ApplicationData | EthernetPadding EthernetFcs whole packet has Ethernet protocol data part has IPv4 protocol
EthernetMacHeader Ipv4Header | UdpHeader ApplicationData | EthernetPadding EthernetFcs whole packet has Ethernet protocol data part has UDP protocol
EthernetMacHeader Ipv4Header UdpHeader | ApplicationData | EthernetPadding EthernetFcs whole packet has Ethernet protocol data part has no protocol
Usage diagram
The following diagram shows usage relationships between types. Unresolved types are missing from the diagram.
Inheritance diagram
The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram.
Extends
| Name | Type | Description |
|---|---|---|
| ProtocolTagBase | class |
This is an abstract base class that should not be directly added as a tag. |
Fields
| Name | Type | Description |
|---|---|---|
| frontOffset | b |
extra offset relative to the packet data part front offset |
| backOffset | b |
extra offset relative to the packet data part back offset |
| protocol | Protocol |
specifies a protocol (internal class with an artificial identifier) |
Source code
// // This tag specifies the protocol of the packet. // // Packet processing at the sender // =============================== // // | ApplicationData | // whole packet has no protocol // data part has no protocol // // | UdpHeader ApplicationData | // whole packet has UDP protocol // data part has UDP protocol // // | Ipv4Header UdpHeader ApplicationData | // whole packet has IPv4 protocol // data part has IPv4 protocol // // EthernetMacHeader | Ipv4Header UdpHeader ApplicationData | // whole packet has incomplete Ethernet protocol // data part has IPv4 protocol // // EthernetMacHeader | Ipv4Header UdpHeader ApplicationData | EthernetPadding EthernetFcs // whole packet has Ethernet protocol // data part has IPv4 protocol // // | EthernetMacHeader Ipv4Header UdpHeader ApplicationData EthernetPadding EthernetFcs | // whole packet has Ethernet protocol // data part has Ethernet protocol // // Packet processing at the receiver // ================================= // // | EthernetMacHeader Ipv4Header UdpHeader ApplicationData EthernetPadding EthernetFcs | // whole packet has Ethernet protocol // data part has Ethernet protocol // // EthernetMacHeader Ipv4Header UdpHeader ApplicationData EthernetPadding | EthernetFcs // whole packet has Ethernet protocol // data part has no protocol // // EthernetMacHeader | Ipv4Header UdpHeader ApplicationData | EthernetPadding EthernetFcs // whole packet has Ethernet protocol // data part has IPv4 protocol // // EthernetMacHeader Ipv4Header | UdpHeader ApplicationData | EthernetPadding EthernetFcs // whole packet has Ethernet protocol // data part has UDP protocol // // EthernetMacHeader Ipv4Header UdpHeader | ApplicationData | EthernetPadding EthernetFcs // whole packet has Ethernet protocol // data part has no protocol // class PacketProtocolTag extends ProtocolTagBase { b frontOffset = b(0); // extra offset relative to the packet data part front offset b backOffset = b(0); // extra offset relative to the packet data part back offset }File: src/inet/common/ProtocolTag.msg