Packet macros

Reference Documentation

product_line_custom
Napatech SmartNIC
category
Reference Information

The following is only possible on packet-based streams.

Unless specified otherwise, the NT_NET_GET_PKT_XYZ macros will return integer type values.

In debug mode some packet macros contain an assert which asserts that the descriptor is supported for a given macro. Define the macro NDEBUG to remove the assert or use the build option -DNDEBUG. When the assert is removed the unsupported descriptors cause macros to return -1.

The descriptor support for the various macros is as follows:

Macro group

NT

Ext7

Ext8

Ext9

Dyn

Basic descriptor macros

X

X

X

X

X

NT descriptor macros

X

X

X

X

 

Extended NT descriptor macros

 

X

X

X

 

Extended NT descriptor IPF macros

   

X

X

 

Extended NT descriptor Tunneling macros

     

X

 

TX macros

X

X

X

X

 

Note that some macros may exist in different variants for each descriptor type. In that case, the supported descriptor is part of the macro name.