PXIe-8520 Ethernet Raw Frame Format
- Updated2025-04-14
- 6 minute(s) read
PXIe-8520 Ethernet Raw Frame Format
The raw frame format for NI-XNET Ethernet interfaces is the form in which NI-XNET stores Ethernet frame data for the NI-XNET Read and NI-XNET Write functions and in TDMS files. Raw frame data comprises one or more frames encoded in a sequence of bytes.
The raw frame format is ideal for log files because you can transfer the data between NI-XNET and the file with very little conversion.
In the following table, byte offset refers to the offset from the beginning of the frame. For example, if the first frame is in raw data bytes 0–127, and the second frame is in bytes 128–255, the source MAC address of the second frame starts at offset 156 (128 + Byte Offset 28).
The following table specifies the overall Ethernet frame format, including header fields that are specific to NI-XNET interfaces, such as timestamps.
Field | Byte Offset |
---|---|
Length | 0 to 1 |
Type | 2 to 3 |
Local Timestamp | 4 to 11 Note The PXIe-8520 does not presently
support timestamping. |
Network Timestamp | 12 to 19 Note The PXIe-8520 does not presently
support timestamping. |
Flags | 20 to 23 |
Frame Data | 24 (Length - 5) |
FCS |
Note The PXIe-8520 does not presently support tap mode.
|
These fields have the following definitions:
You can compute the length of Frame Data (IEEE Std 802.3 frame data) by Length - 28, to account for the fields that are specific to NI (and the FCS).
For writing a frame, this field uses big-endian byte order (most significant byte first; also known as network order).
For reading a frame, this field uses host-byte order.
The type is an enumerated value that characterizes the frame as either a standard Ethernet frame that is transmitted or received or as a special frame.
The upper three bits of this element specify the protocol. The valid values in decimal are:
The lower 5 bits of this element contain the specific type.
Special values specify features that are not related to the protocol or bus traffic. Special values designate the frame as a special frame.
- Transmit (bit 31): Whether the frame occurred due to transmit
(True) or not (False).
For NI-XNET Read on the endpoint path, this flag is always False.
- Receive (bit 30): Whether the frame occurred due to receive
(True) or not (False).
For NI-XNET Read on the endpoint path, this flag is always True.
- Network Synced (bit 23): Relevant to
synchronization.Note The PXIe-8520 does not presently support synchronization.
- Error (bit 16): Whether an error occurred during reception or transmission of the frame (False = good frame, True = bad frame).
All unused bits are 0.
NI-XNET Write ignores this field.
The maximum length of this array is provided in the Payload Length Maximum property.
This field uses big-endian byte order.
This field uses big-endian byte order. NI-XNET Write ignores this field.
The following tables provide examples of the two most commonly used formats for frame data on Ethernet, as specified in IEEE Std 802.3 and IEEE Std 802.1Q. Unless otherwise indicated, fields in the following tables all use big-endian byte order.
NI-XNET Ethernet Raw Frame Data for Untagged Frames
The following table shows frame data for an untagged frame. An untagged frame uses the default Priority 0, default Drop Eligible false, and the default VLAN Identifier (VID) 1.
Field | Byte Offset |
---|---|
Destination MAC Address | 24 to 29 |
Source MAC Address | 30 to 35 |
EtherType | 36 to 37 |
MSDU | 38 to (Length - 5) |
These fields are defined as follows:
For Write, you can use Source MAC Address Auto? to automatically populate this field.
In other words, the EtherType determines what the frame contains.
EtherType values are assigned by the IEEE Registration Authority (IEEE-RA). Examples include hex 0800 for Internet Protocol version 4 (IPv4), hex 08DD for Internet Protocol version 6 (IPv6), and hex 22F0 for IEEE Std 1722.
IEEE Std 802.3 specifies the minimum length of the MSDU as 46 bytes (padded as necessary).
The maximum length of the MSDU, sometimes called the maximum transmission unit (MTU), is 1,500 bytes.
NI-XNET Ethernet Raw Frame Data for VLAN Frames
The following table shows frame data for a frame with a VLAN tag.
Field | Byte Offset |
---|---|
Destination MAC Address | 24 to 29 |
Source MAC Address | 30 to 35 |
Tag Protocol ID | 36 to 37 |
Tag Control Info | 38 to 39 |
EtherType | 40 to 41 |
MSDU | 42 to (Length - 5) |
These fields are defined as follows:
For Write, you can use Source MAC Address Auto? to automatically populate this field.
If a frame contains a tag, this tag protocol identification (TPID) field specifies the encoding of the tag's information (tag control info). TPID of hex 8100 is the Customer VLAN Tag (C-TAG), which is the general-purpose tag format commonly known as a VLAN tag.
- Bits 13–15 (upper three bits): priority code point (PCP). This field is commonly known as the priority of the frame. Priority is mapped to a traffic class, and the traffic class determines the timing and importance of the frame as it egresses from a queue at each port in the switched Ethernet network. In other words, priority determines how the frame travels through queues.
- Bit 12: drop eligibility indicator, or drop eligible indicator (DEI): If drop eligible is true, the frame can be discarded by metering algorithms in preference to frames in which drop eligible is false.
- Bits 0-11 (lower 12 bits): VLAN identifier (VID): Specifies where the frame travels through the network (i.e., on which ports of a switch it egresses). Within a frame, VID value 0 indicates a null VID, meaning that the tag contains only priority information (commonly known as priority tag). The default VID value for all ports is 1, and therefore both untagged and priority-tagged frames use the default VID of 1.
In other words, the EtherType determines what the frame contains.
EtherType values are assigned by the IEEE Registration Authority (IEEE RA). Examples include hex 0800 for Internet Protocol version 4 (IPv4), hex 08DD for Internet Protocol version 6 (IPv6), and hex 22F0 for IEEE Std 1722.
IEEE Std 802.3 specifies the minimum length of the MSDU as 46 bytes (padded as necessary).
The maximum length of the MSDU, sometimes called the maximum transmission unit (MTU), is 1,500 bytes.
Related Information
- PXIe-8520 Special Frames
The NI-XNET driver offers some special frames: frames that enable functionality but are not directly used in bus communication. The protocol that your device supports largely determines the types of special frames that the device supports.
- PXIe-8520 Unsupported NI-XNET Features
The PXIe-8520 does not support certain features of NI-XNET.
- Frame Input Stream Mode
A frame input stream session reads all frames received from the network using a single stream. It typically is used for analyzing or logging all frame traffic on the network.
- Frame Output Stream Mode
A frame output stream session transmits an arbitrary sequence of frame values using a single stream. The frame values are not limited to a single frame—they can transmit any frame.