Detailed Description
The following is only available if "PacketDescriptor = Ext7, Ext8 or Ext9" has been set in the ntservice.ini file and if NT_NET_GET_PKT_DESCRIPTOR_TYPE returns NT_PACKET_DESCRIPTOR_TYPE_NT_EXTENDED
Macros | |
#define | NT_NET_GET_PKT_HASH_EXT(_hNetBuf_) |
Get the packet hash value. More... | |
#define | NT_NET_GET_PKT_HASH_TYPE_EXT(_hNetBuf_) |
Get the number of the used hash key type. More... | |
#define | NT_NET_GET_PKT_HASH_VALID_EXT(_hNetBuf_) |
Indicates if the hash calculation is valid. More... | |
#define | NT_NET_GET_PKT_JUMBO_EXT(_hNetBuf_) |
Indicates if the frame is a jumbo frame. More... | |
#define | NT_NET_GET_PKT_BROADCAST_EXT(_hNetBuf_) |
Indicates if the destination MAC address is broadcast. More... | |
#define | NT_NET_GET_PKT_L4_PORT_TYPE_EXT(_hNetBuf_) |
Get the layer 4 port type When using extended descriptor 9 it is advised to use NT_NET_GET_PKT_TUNNEL_TYPE instead. More... | |
#define | NT_NET_GET_PKT_L4_FRAME_TYPE_EXT(_hNetBuf_) |
Get layer 4 frame type. More... | |
#define | NT_NET_GET_PKT_L3_FRAME_TYPE_EXT(_hNetBuf_) |
Get layer 3 frame type. More... | |
#define | NT_NET_GET_PKT_L2_FRAME_TYPE_EXT(_hNetBuf_) |
Get layer 2 frame type. More... | |
#define | NT_NET_GET_PKT_L4_LENGTH_EXT(_hNetBuf_) |
Get layer 4 header length (valid for L4 = UDP/TCP only) More... | |
#define | NT_NET_GET_PKT_L3_LENGTH_EXT(_hNetBuf_) |
Get layer 3 header length (valid for L3 = IPv4/IPv6 only) More... | |
#define | NT_NET_GET_PKT_MPLS_COUNT_EXT(_hNetBuf_) |
Get the number of MPLS shim labels present. More... | |
#define | NT_NET_GET_PKT_VLAN_COUNT_EXT(_hNetBuf_) |
Get the number of VLANs present. More... | |
#define | NT_NET_GET_PKT_ISL_EXT(_hNetBuf_) |
Indicates if ISL encapsulation is present. More... | |
#define | NT_NET_GET_PKT_DECODE_ERROR_EXT(_hNetBuf_) |
Indicates if a frame decoding error is present. More... | |
#define | NT_NET_GET_PKT_FRAME_LARGE_EXT(_hNetBuf_) |
Indicates if the frame is a large frame. More... | |
#define | NT_NET_GET_PKT_FRAME_SMALL_EXT(_hNetBuf_) |
Indicates if the frame is a small frame. More... | |
#define | NT_NET_GET_PKT_IPV6_FR_HEADER_EXT(_hNetBuf_) |
Indicates if an IPv6 fragment header is present. More... | |
#define | NT_NET_GET_PKT_IPV6_RT_HEADER_EXT(_hNetBuf_) |
Indicates if an IPv6 routing header is present. More... | |
#define | NT_NET_GET_PKT_L4_PROTOCOL_NUM_EXT(_hNetBuf_) |
Get layer 4 protocol number (TCP, UDP, SCTP etc.) - if not an IP packet this is 0. More... | |
#define | NT_NET_GET_PKT_L3_FRAGMENTED_EXT(_hNetBuf_) |
Indicates if the packet is part of a layer 3 fragmented datagram. Only valid for IPv4 if more fragments bit = 1 or fragment offset not equal to 0. More... | |
#define | NT_NET_GET_PKT_L3_FIRST_FRAG_EXT(_hNetBuf_) |
Layer 3 First fragment (offset = 0) Note: Only valid for IPv4 - always set on IPv6 so use IPV6_FR_HEADER instead. More... | |
#define | NT_NET_GET_PKT_COLOR_EXT(_hNetBuf_) |
Returns the packet color of the frame, if the frame matches a filter. The color is automatically assigned as a 6bit color ID when the filter is defined. If the frame matches more than one filter, the packet color of the frame is the one from the filter with the highest priority. More... | |
#define | NT_NET_GET_PKT_L5_OFFSET_EXT(_hNetBuf_) |
Returns the offset in bytes (0x00 - 0x1FF) from the start of the frame to the start of layer 5. The value 0x00 indicates an invalid offset. More... | |
#define | NT_NET_GET_PKT_L4_OFFSET_EXT(_hNetBuf_) |
Returns the offset in bytes (0x00 - 0x1FF) from the start of the frame to the start of layer 4. The value 0x00 indicates an invalid offset. More... | |
#define | NT_NET_GET_PKT_L3_OFFSET_EXT(_hNetBuf_) |
Returns the offset in bytes (0x00 - 0x1FF) from the start of the frame to the start of layer 3. The value 0x00 indicates an invalid offset. More... | |
Macro Definition Documentation
#define NT_NET_GET_PKT_HASH_EXT | ( | _hNetBuf_ | ) |
Get the packet hash value.
- Parameters
-
[in] _hNetBuf_ Packet container reference
- Returns
- Returns the packet hash value. If the hash calculation is invalid, the value is 0x00.
Definition at line 764 of file pktdescr.h.
#define NT_NET_GET_PKT_HASH_TYPE_EXT | ( | _hNetBuf_ | ) |
Get the number of the used hash key type.
- Parameters
-
[in] _hNetBuf_ Packet container reference
- Returns
- Returns the number of the used hash key type.
Definition at line 772 of file pktdescr.h.
#define NT_NET_GET_PKT_HASH_VALID_EXT | ( | _hNetBuf_ | ) |
Indicates if the hash calculation is valid.
- Parameters
-
[in] _hNetBuf_ Packet container reference
- Returns
- Returns 1 if the hash value/type is valid - Returns 0 if the hash value/type is invalid
Definition at line 780 of file pktdescr.h.
#define NT_NET_GET_PKT_JUMBO_EXT | ( | _hNetBuf_ | ) |
Indicates if the frame is a jumbo frame.
- Parameters
-
[in] _hNetBuf_ Packet container reference
- Returns
- Returns 1 if the packet has a jumbo frame - Returns 0 if the packet does not have a jumbo frame
Definition at line 788 of file pktdescr.h.
#define NT_NET_GET_PKT_BROADCAST_EXT | ( | _hNetBuf_ | ) |
Indicates if the destination MAC address is broadcast.
- Parameters
-
[in] _hNetBuf_ Packet container reference
- Returns
- Returns 1 if the destination MAC is a broadcast address - Returns 0 if the destination MAC is not a broadcast address
Definition at line 796 of file pktdescr.h.
#define NT_NET_GET_PKT_L4_PORT_TYPE_EXT | ( | _hNetBuf_ | ) |
Get the layer 4 port type When using extended descriptor 9 it is advised to use NT_NET_GET_PKT_TUNNEL_TYPE instead.
- Parameters
-
[in] _hNetBuf_ Packet container reference
- Returns
- Return the layer 4 port type - see NtL4PortType_e for values
Definition at line 805 of file pktdescr.h.
#define NT_NET_GET_PKT_L4_FRAME_TYPE_EXT | ( | _hNetBuf_ | ) |
Get layer 4 frame type.
- Parameters
-
[in] _hNetBuf_ Packet container reference
- Returns
- Returns layer 4 frame type - see NtL4FrameType_e for values
Definition at line 813 of file pktdescr.h.
#define NT_NET_GET_PKT_L3_FRAME_TYPE_EXT | ( | _hNetBuf_ | ) |
Get layer 3 frame type.
- Parameters
-
[in] _hNetBuf_ Packet container reference
- Returns
- Returns layer 3 frame type - see NtL3FrameType_e for values
Definition at line 821 of file pktdescr.h.
#define NT_NET_GET_PKT_L2_FRAME_TYPE_EXT | ( | _hNetBuf_ | ) |
Get layer 2 frame type.
- Parameters
-
[in] _hNetBuf_ Packet container reference
- Returns
- Returns layer 2 frame type - see NtL2FrameType_e for values
Definition at line 829 of file pktdescr.h.
#define NT_NET_GET_PKT_L4_LENGTH_EXT | ( | _hNetBuf_ | ) |
Get layer 4 header length (valid for L4 = UDP/TCP only)
- Parameters
-
[in] _hNetBuf_ Packet container reference
- Returns
- Returns layer 4 header length in units of 32 bits
Definition at line 837 of file pktdescr.h.
#define NT_NET_GET_PKT_L3_LENGTH_EXT | ( | _hNetBuf_ | ) |
Get layer 3 header length (valid for L3 = IPv4/IPv6 only)
- Parameters
-
[in] _hNetBuf_ Packet container reference
- Returns
- Returns layer 3 header length in units of 32 bits
Definition at line 845 of file pktdescr.h.
#define NT_NET_GET_PKT_MPLS_COUNT_EXT | ( | _hNetBuf_ | ) |
Get the number of MPLS shim labels present.
- Parameters
-
[in] _hNetBuf_ Packet container reference
- Returns
- Returns the number of MPLS shim labels present
Definition at line 853 of file pktdescr.h.
#define NT_NET_GET_PKT_VLAN_COUNT_EXT | ( | _hNetBuf_ | ) |
Get the number of VLANs present.
- Parameters
-
[in] _hNetBuf_ Packet container reference
- Returns
- Returns the number of VLANs present
Definition at line 861 of file pktdescr.h.
#define NT_NET_GET_PKT_ISL_EXT | ( | _hNetBuf_ | ) |
Indicates if ISL encapsulation is present.
- Parameters
-
[in] _hNetBuf_ Packet container reference
- Returns
- Returns 1 if ISL encapsulation is present - Returns 0 if ISL encapsulation is not present
Definition at line 869 of file pktdescr.h.
#define NT_NET_GET_PKT_DECODE_ERROR_EXT | ( | _hNetBuf_ | ) |
Indicates if a frame decoding error is present.
- Parameters
-
[in] _hNetBuf_ Packet container reference
- Returns
- Returns 1 if the frame could not be decoded correctly - Returns 0 otherwise
Definition at line 877 of file pktdescr.h.
#define NT_NET_GET_PKT_FRAME_LARGE_EXT | ( | _hNetBuf_ | ) |
Indicates if the frame is a large frame.
- Parameters
-
[in] _hNetBuf_ Packet container reference
- Returns
- - Returns 1 when FrameSize > MaxFrameSize. MaxFrameSize is set in ntservice.ini. Returns 0 when FrameSize <= MaxFrameSize
Definition at line 885 of file pktdescr.h.
#define NT_NET_GET_PKT_FRAME_SMALL_EXT | ( | _hNetBuf_ | ) |
Indicates if the frame is a small frame.
- Parameters
-
[in] _hNetBuf_ Packet container reference
- Returns
- Returns 1 when PktSz < 64 (+ISL and/or VLAN) - Returns 0 when PktSz >= 64
Definition at line 893 of file pktdescr.h.
#define NT_NET_GET_PKT_IPV6_FR_HEADER_EXT | ( | _hNetBuf_ | ) |
Indicates if an IPv6 fragment header is present.
- Parameters
-
[in] _hNetBuf_ Packet container reference
- Returns
- Returns 1 if IPv6 fragment header is present - Returns 0 if no IPv6 fragment header is present
Definition at line 901 of file pktdescr.h.
#define NT_NET_GET_PKT_IPV6_RT_HEADER_EXT | ( | _hNetBuf_ | ) |
Indicates if an IPv6 routing header is present.
- Parameters
-
[in] _hNetBuf_ Packet container reference
- Returns
- Returns 1 if IPv6 routing header is present - Returns 0 if no IPv6 routing header is present
Definition at line 909 of file pktdescr.h.
#define NT_NET_GET_PKT_L4_PROTOCOL_NUM_EXT | ( | _hNetBuf_ | ) |
Get layer 4 protocol number (TCP, UDP, SCTP etc.) - if not an IP packet this is 0.
- Parameters
-
[in] _hNetBuf_ Packet container reference
- Returns
- Returns the layer 4 protocol number / next header.
Definition at line 917 of file pktdescr.h.
#define NT_NET_GET_PKT_L3_FRAGMENTED_EXT | ( | _hNetBuf_ | ) |
Indicates if the packet is part of a layer 3 fragmented datagram. Only valid for IPv4 if more fragments bit = 1 or fragment offset not equal to 0.
- Parameters
-
[in] _hNetBuf_ Packet container reference
- Returns
- Returns 1 if fragmented layer 3 - Returns 0 otherwise
Definition at line 925 of file pktdescr.h.
#define NT_NET_GET_PKT_L3_FIRST_FRAG_EXT | ( | _hNetBuf_ | ) |
Layer 3 First fragment (offset = 0) Note: Only valid for IPv4 - always set on IPv6 so use IPV6_FR_HEADER instead.
- Parameters
-
[in] _hNetBuf_ Packet container reference
- Returns
- Returns 1 if first fragment or not fragmented - Returns 0 otherwise
Definition at line 933 of file pktdescr.h.
#define NT_NET_GET_PKT_COLOR_EXT | ( | _hNetBuf_ | ) |
Returns the packet color of the frame, if the frame matches a filter. The color is automatically assigned as a 6bit color ID when the filter is defined. If the frame matches more than one filter, the packet color of the frame is the one from the filter with the highest priority.
- Parameters
-
[in] _hNetBuf_ Packet container reference
- Returns
- Returns the color of the packet as an integer value
Definition at line 944 of file pktdescr.h.
#define NT_NET_GET_PKT_L5_OFFSET_EXT | ( | _hNetBuf_ | ) |
Returns the offset in bytes (0x00 - 0x1FF) from the start of the frame to the start of layer 5. The value 0x00 indicates an invalid offset.
- Parameters
-
[in] _hNetBuf_ Packet container reference
- Returns
- Returns layer 5 offset as an integer value
Definition at line 953 of file pktdescr.h.
#define NT_NET_GET_PKT_L4_OFFSET_EXT | ( | _hNetBuf_ | ) |
Returns the offset in bytes (0x00 - 0x1FF) from the start of the frame to the start of layer 4. The value 0x00 indicates an invalid offset.
- Parameters
-
[in] _hNetBuf_ Packet container reference
- Returns
- Returns layer 4 offset as an integer value
Definition at line 962 of file pktdescr.h.
#define NT_NET_GET_PKT_L3_OFFSET_EXT | ( | _hNetBuf_ | ) |
Returns the offset in bytes (0x00 - 0x1FF) from the start of the frame to the start of layer 3. The value 0x00 indicates an invalid offset.
- Parameters
-
[in] _hNetBuf_ Packet container reference
- Returns
- Returns layer 3 offset as an integer value
Definition at line 971 of file pktdescr.h.