|
PROFINET IO Controller Stack 1.0.0
Modern C++ implementation of a PROFINET IO Controller stack
|
Plain (untagged) Ethernet II frame header. More...
#include <protocol.h>
Collaboration diagram for profinet::EthernetHeader:Public Member Functions | |
| Bytes | ToBytes () const |
| Serialize this header and its payload back to raw frame bytes. | |
Static Public Member Functions | |
| static EthernetHeader | Parse (const Bytes &data) |
| Parse an Ethernet header and payload from raw frame bytes. | |
Public Attributes | |
| MacAddress | dst {} |
| Destination MAC address. | |
| MacAddress | src {} |
| Source MAC address. | |
| std::uint16_t | type = 0 |
| EtherType field. | |
| Bytes | payload |
| Frame payload following the header. | |
Plain (untagged) Ethernet II frame header.
Definition at line 62 of file protocol.h.
|
inlinestatic |
Parse an Ethernet header and payload from raw frame bytes.
| data | Complete frame bytes, starting at the destination MAC. |
Definition at line 79 of file protocol.h.
References dst, profinet::wire::Reader::Fixed(), profinet::macAddressLength, payload, profinet::wire::Reader::ReadBytes(), profinet::wire::Reader::Remaining(), src, type, and profinet::wire::Reader::U16().
Referenced by profinet::dcp::ParseSetResponse(), and profinet::dcp::RecvSetResponse().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Serialize this header and its payload back to raw frame bytes.
Definition at line 97 of file protocol.h.
References dst, payload, profinet::wire::PutFixed(), profinet::wire::PutU16(), src, and type.
Here is the call graph for this function:| MacAddress profinet::EthernetHeader::dst {} |
Destination MAC address.
Definition at line 65 of file protocol.h.
Referenced by Parse(), profinet::dcp::ReadResponse(), profinet::dcp::RecvSetResponse(), and ToBytes().
| Bytes profinet::EthernetHeader::payload |
Frame payload following the header.
Definition at line 74 of file protocol.h.
Referenced by Parse(), profinet::dcp::ParseSetResponse(), profinet::dcp::ReadResponse(), profinet::dcp::ReceiveHello(), profinet::dcp::RecvSetResponse(), and ToBytes().
| MacAddress profinet::EthernetHeader::src {} |
Source MAC address.
Definition at line 68 of file protocol.h.
Referenced by Parse(), profinet::dcp::ReadResponse(), profinet::dcp::ReceiveHello(), and ToBytes().
| std::uint16_t profinet::EthernetHeader::type = 0 |
EtherType field.
Definition at line 71 of file protocol.h.
Referenced by Parse(), profinet::dcp::ParseSetResponse(), profinet::dcp::ReadResponse(), profinet::dcp::ReceiveHello(), profinet::dcp::RecvSetResponse(), and ToBytes().