RX Network Stream

Reference Documentation

product_line_custom
Intel® PAC
Napatech SmartNIC
category
Reference Information
Napatech Software Suite: RX Network Stream

Detailed Description

The RX network stream is used for both capture and in-line scenarios. The capture scenarios can deliver packets either packet-by-packet or as segments. The segment delivery is used for store to disk scenarios followed by offline analysis via the file-based network stream.

Packet Interface

The main interface is the packet interface. The packet interface is an interface for applications to do packet-by-packet processing. Please note that this approach will move some CPU load from the application to the driver compared to the segment interface. To open an RX network stream using the packet interface, call the NT_NetRxOpen function with the interface type set to NT_NET_INTERFACE_PACKET. To receive a packet, call NT_NetRxGet and use the packet macros to access the data. When finished with the packet, call NT_NetRxRelease to release it again. When finished with the stream, call NT_NetRxClose to close it.

For an example on how to use the packet interface see net/analysis/analysis_example.c.

Segment Interface

The segment interface is only intended to be used for writing data to the disc and to do this the application will have to add a file header, provided by the system, to the beginning of the file. To read back data from the file, the application will have to use the File Network Stream to open the file and process the saved data packet by packet. To open an RX network stream using the segment interface, call the NT_NetRxOpen function with the interface type set to NT_NET_INTERFACE_SEGMENT. To receive a segment, call NT_NetRxGet and use the segment macros to access the data. When finished with the segment, call NT_NetRxRelease to release it again. When finished with the stream, call NT_NetRxClose to close it.

For an example on how to use the segment interface see net/capture/capture_example.c.

Data Sharing

Data sharing is a feature that will allow multiple applications to access the same shared host buffer.

Data sharing is supported at the host buffer level. This allows multiple applications to access the same host buffer, at the same time, and individually decide if they want to use the packet interface or the segment interface. Data sharing is zero copy but will take up some extra CPU power to handle the synchronization of the host buffers. The service daemon is responsible for handling the host buffer exchange with the hardware and the data sharing is transparent to the application.

In-line network streams cannot be shared and any attempt to open an existing in-line stream fails with an error return value.

Note
Be aware that the slowest application sets the speed. This means that a packet/segment will not be returned to the hardware before all applications that share the host buffer have processed it. To avoid this use Host Buffer Allowance

Data Merging

Data merging is used for merging data packets received from multiple host buffers into one stream. This feature is used to merge data from multiple ports on multiple adapters, or multiple host buffers from one in-line adapter. The Napatech Software Suite supports merging of data from up to 42 host buffers, making it possible to merge data from 42 NT adapters. See the NTPL for a description on how to configure data merging.

Note
Data merging is only possible for packet streams.
Note
Timesynchronisation is required when merging from different adapters (see Adapter Merge).

Functions

int NT_NetRxOpen (NtNetStreamRx_t *hStream, const char *name, enum NtNetInterface_e netIntf, uint32_t streamId, int hostBufferAllowance)
 Opens in-line or capture host buffer(s) and returns a NtNetStreamRx_t handle. More...
 
int NT_NetRxOpen_v2 (NtNetStreamRx_t *hStream, const char *name, enum NtNetInterface_e netIntf, uint32_t streamId, int hostBufferAllowance, int flags)
 Opens in-line or capture host buffer(s) and returns a NtNetStreamRx_t handle. More...
 
void NT_NetRxOpenAttrInit (NtNetRxAttr_t *attr)
 Initialize RX stream attributes. More...
 
void NT_NetRxOpenAttrSetName (NtNetRxAttr_t *attr, const char *name)
 Sets the stream name attribute. More...
 
const char * NT_NetRxOpenAttrGetName (const NtNetRxAttr_t *attr)
 Returns the name attribute. More...
 
void NT_NetRxOpenAttrSetNetIntf (NtNetRxAttr_t *attr, enum NtNetInterface_e netIntf)
 Sets the interface type attribute. More...
 
enum NtNetInterface_e NT_NetRxOpenAttrGetNetIntf (const NtNetRxAttr_t *attr)
 Returns the interface type attribute. More...
 
void NT_NetRxOpenAttrSetHostBufferAllowance (NtNetRxAttr_t *attr, int hostBufferAllowance)
 Sets the host buffer allowance attribute. More...
 
int NT_NetRxOpenAttrGetHostBufferAllowance (const NtNetRxAttr_t *attr)
 Returns the buffer allowance attribute. More...
 
void NT_NetRxOpenAttrSetFlags (NtNetRxAttr_t *attr, int flags)
 Sets the flags attribute. More...
 
int NT_NetRxOpenAttrGetFlags (const NtNetRxAttr_t *attr)
 Returns the flags attribute. More...
 
int NT_NetRxOpen_Attr (NtNetStreamRx_t *hStream, uint32_t streamId, const NtNetRxAttr_t *attr)
 Opens in-line or capture host buffer(s) and returns a NtNetStreamRx_t handle. More...
 
int NT_NetRxOpenMulti (NtNetStreamRx_t *hStream, const char *name, enum NtNetInterface_e netIntf, uint32_t *paStreamId, unsigned int numStreamIds, int hostBufferAllowance)
 Opens in-line or capture host buffer(s) and returns a NtNetStreamRx_t handle. More...
 
int NT_NetRxOpenMulti_v2 (NtNetStreamRx_t *hStream, const char *name, enum NtNetInterface_e netIntf, uint32_t *paStreamId, unsigned int numStreamIds, int hostBufferAllowance, int flags)
 Opens in-line or capture host buffer(s) and returns a NtNetStreamRx_t handle. More...
 
int NT_NetRxOpenMulti_Attr (NtNetStreamRx_t *hStream, uint32_t *paStreamId, unsigned int numStreamIds, const NtNetRxAttr_t *attr)
 Opens in-line or capture host buffer(s) and returns a NtNetStreamRx_t handle. More...
 
int NT_NetRxGet (NtNetStreamRx_t hStream, NtNetBuf_t *netBuf, int timeout)
 Gets data from an in-line or capture stream. More...
 
int NT_NetRxGetNextPacket (NtNetStreamRx_t hStream, NtNetBuf_t *netBuf, int timeout)
 Gets data from an in-line or capture stream. More...
 
int NT_NetRxRead (NtNetStreamRx_t hStream, NtNetRx_t *cmd)
 Reads data from the stream. More...
 
int NT_NetRxRelease (NtNetStreamRx_t hStream, NtNetBuf_t netBuf)
 Releases network buffer. More...
 
int NT_NetRxClose (NtNetStreamRx_t hStream)
 Closes an in-line or capture stream. More...
 

Data Structures

struct  NtNetRxFileHeader_s
 
struct  NtNetRxStreamDrop_s
 
struct  NtNetRxStreamTime_s
 
struct  NtNetRxPcapInfo_s
 
struct  NtNetRxHbRing_s
 
struct  NtNetRxHbInfo_s
 
struct  NtNetRxHbInfo_s::NtNetRxHb_s
 
struct  NtNetRx_s
 
union  NtNetRx_s::NtNetRx_u
 
struct  NtNetTxHbInfo_s
 
struct  NtNetTxHbInfo_s::NtNetTxHb_s
 
struct  NtNetTxHbRing_s
 
struct  NtNetTx_s
 
union  NtNetTx_s::NtNetTx_u
 
struct  NtNetTxFragment_s
 
struct  NtNetFileReadInfo_v1_s
 
struct  NtNetFileReadDesc_s
 
struct  NtNetFileRead_s
 
union  NtNetFileRead_s::NtNetFileRead_u
 
union  __nt_netrx_attr
 
union  __nt_nettx_attr
 

Macros

#define __SIZEOF_NT_NETRX_ATTR   (128)
 
#define __SIZEOF_NT_NETTX_ATTR   (128)
 
#define NT_NETRX_NONE   (0)
 
#define NT_NETRX_READONLY_STREAM   (1LL<<0)
 

Typedefs

typedef struct NtNetRx_s NtNetRx_t
 
typedef struct NtNetTx_s NtNetTx_t
 
typedef struct NtNetTxFragment_s NtNetTxFragment_t
 
typedef struct NtNetFileReadInfo_v1_s NtNetFileInfo_v1_t
 
typedef struct NtNetFileReadDesc_s NtNetFileReadDesc_t
 
typedef struct NtNetFileRead_s NtNetFileRead_t
 
typedef struct NtNetStreamRx_s * NtNetStreamRx_t
 
typedef union __nt_netrx_attr NtNetRxAttr_t
 
typedef union __nt_nettx_attr NtNetTxAttr_t
 

Enumerations

enum  NtNetRxCmd_e {
  NT_NETRX_READ_CMD_UNKNOWN =0, NT_NETRX_READ_CMD_GET_FILE_HEADER, NT_NETRX_READ_CMD_STREAM_DROP, NT_NETRX_READ_CMD_STREAM_TIME,
  NT_NETRX_READ_CMD_PCAP_FCS, NT_NETRX_READ_CMD_GET_RING_CONTROL, NT_NETRX_READ_CMD_GET_HB_INFO
}
 
enum  NtNetTxDescriptorMode_e {
  NT_NETTX_DESCRIPTOR_MODE_STD, NT_NETTX_DESCRIPTOR_MODE_DYN1, NT_NETTX_DESCRIPTOR_MODE_DYN2, NT_NETTX_DESCRIPTOR_MODE_DYN3,
  NT_NETTX_DESCRIPTOR_MODE_DYN4
}
 
enum  NtNetTxCmd_e { NT_NETTX_READ_CMD_UNKNOWN =0, NT_NETTX_READ_CMD_GET_HB_INFO, NT_NETTX_READ_CMD_GET_RING_CONTROL }
 
enum  NtNetFileReadCmd_e {
  NT_NETFILE_READ_INFO_UNKNOWN_CMD =0, NT_NETFILE_READ_COMPAT_0, NT_NETFILE_READ_FILETYPE_CMD, NT_NETFILE_READ_DESCRIPTOR_CMD,
  NT_NETFILE_READ_INFO_CMD_V1
}
 
enum  NtNetFileType_e { NT_NETFILE_TYPE_UNKNOWN, NT_NETFILE_TYPE_NT, NT_NETFILE_TYPE_PCAP, NT_NETFILE_TYPE_PCAP_NG }
 
enum  NtNetRxOpenFlags_e { NT_NETRX_OPEN_FLAGS_NONE =0, NT_NETRX_OPEN_FLAGS_READONLY_STREAM =1LL<<0 }
 

Data Structure Documentation

struct NtNetRxFileHeader_s

File header return structure. Note: This header can only be read when all NTPL assignments have completed.

Definition at line 283 of file stream_net.h.

Data Fields

uint8_t data [128]
 The actual file header. More...
 
int32_t size
 The size of the file header. More...
 

Field Documentation

uint8_t NtNetRxFileHeader_s::data[128]

The actual file header.

Examples:
net/capture/capture_example.c.

Definition at line 284 of file stream_net.h.

Referenced by main().

int32_t NtNetRxFileHeader_s::size

The size of the file header.

Examples:
net/capture/capture_example.c.

Definition at line 285 of file stream_net.h.

Referenced by main().

struct NtNetRxStreamDrop_s

Stream drop counter return structure

Definition at line 291 of file stream_net.h.

Data Fields

uint64_t pktsDropped
 Packets dropped because the application is affected by the host buffer allowance (hysteresis) More...
 
uint64_t octetsDropped
 Bytes dropped because the application is affected by the host buffer allowance (hysteresis) More...
 

Field Documentation

uint64_t NtNetRxStreamDrop_s::pktsDropped

Packets dropped because the application is affected by the host buffer allowance (hysteresis)

Definition at line 292 of file stream_net.h.

uint64_t NtNetRxStreamDrop_s::octetsDropped

Bytes dropped because the application is affected by the host buffer allowance (hysteresis)

Definition at line 293 of file stream_net.h.

struct NtNetRxStreamTime_s

Stream time

Definition at line 299 of file stream_net.h.

Data Fields

uint64_t ts
 Current stream time. Can be used when NT_NetRxGet() returns timeout to get the time of the stream. More...
 

Field Documentation

uint64_t NtNetRxStreamTime_s::ts

Current stream time. Can be used when NT_NetRxGet() returns timeout to get the time of the stream.

Definition at line 300 of file stream_net.h.

struct NtNetRxPcapInfo_s

PCAP information

Definition at line 306 of file stream_net.h.

Data Fields

uint32_t fcs
 Returns non-zero if FCS is included in packets with PCAP descriptors. More...
 

Field Documentation

uint32_t NtNetRxPcapInfo_s::fcs

Returns non-zero if FCS is included in packets with PCAP descriptors.

Definition at line 307 of file stream_net.h.

struct NtNetRxHbRing_s

Expose buffer info to the user (Napatech internal use only - may change without further notice)

Definition at line 313 of file stream_net.h.

Data Fields

volatile uint64_t * pRead
 
volatile uint64_t * pWrite
 
uint8_t * ring
 
uint64_t size
 
uint64_t mask
 

Field Documentation

volatile uint64_t* NtNetRxHbRing_s::pRead

Definition at line 314 of file stream_net.h.

volatile uint64_t* NtNetRxHbRing_s::pWrite

Definition at line 315 of file stream_net.h.

uint8_t* NtNetRxHbRing_s::ring

Definition at line 316 of file stream_net.h.

uint64_t NtNetRxHbRing_s::size

Definition at line 317 of file stream_net.h.

uint64_t NtNetRxHbRing_s::mask

Definition at line 318 of file stream_net.h.

struct NtNetRxHbInfo_s

RX Host buffer info

Definition at line 324 of file stream_net.h.

Data Fields

unsigned int numAddedHostBuffers
 The number of host buffers added by the driver. More...
 
unsigned int numAssignedHostBuffers
 The number of host buffers assigned and also the depth of the array. More...
 
struct NtNetRxHbInfo_s::NtNetRxHb_s aHostBuffer [128]
 

Field Documentation

unsigned int NtNetRxHbInfo_s::numAddedHostBuffers

The number of host buffers added by the driver.

Definition at line 325 of file stream_net.h.

unsigned int NtNetRxHbInfo_s::numAssignedHostBuffers

The number of host buffers assigned and also the depth of the array.

Definition at line 326 of file stream_net.h.

struct NtNetRxHbInfo_s::NtNetRxHb_s NtNetRxHbInfo_s::aHostBuffer[128]
struct NtNetRxHbInfo_s::NtNetRxHb_s

Definition at line 327 of file stream_net.h.

Data Fields

uint64_t timestamp
 The current host buffer time. More...
 
size_t size
 The size of the host buffer (4GA only) More...
 
size_t available
 Amount of the host buffer available to the adapter (4GA only) More...
 
size_t dequeued
 Reserved for future use. More...
 
size_t pending
 Amount of the host buffer pending for the application to read (4GA only) More...
 
size_t inlinePending
 Reserved for future use. More...
 
enum NtNetHostBufferLayout_e layout
 The host buffer layout. More...
 
int index
 The host buffer index. Unique throughout the system. More...
 

Field Documentation

uint64_t NtNetRxHbInfo_s::NtNetRxHb_s::timestamp

The current host buffer time.

Definition at line 328 of file stream_net.h.

size_t NtNetRxHbInfo_s::NtNetRxHb_s::size

The size of the host buffer (4GA only)

Definition at line 329 of file stream_net.h.

size_t NtNetRxHbInfo_s::NtNetRxHb_s::available

Amount of the host buffer available to the adapter (4GA only)

Definition at line 330 of file stream_net.h.

size_t NtNetRxHbInfo_s::NtNetRxHb_s::dequeued

Reserved for future use.

Definition at line 331 of file stream_net.h.

size_t NtNetRxHbInfo_s::NtNetRxHb_s::pending

Amount of the host buffer pending for the application to read (4GA only)

Definition at line 332 of file stream_net.h.

size_t NtNetRxHbInfo_s::NtNetRxHb_s::inlinePending

Reserved for future use.

Definition at line 333 of file stream_net.h.

enum NtNetHostBufferLayout_e NtNetRxHbInfo_s::NtNetRxHb_s::layout

The host buffer layout.

Definition at line 334 of file stream_net.h.

int NtNetRxHbInfo_s::NtNetRxHb_s::index

The host buffer index. Unique throughout the system.

Definition at line 335 of file stream_net.h.

struct NtNetRx_s

NetRx structure. Network RX data is read via this structure via NT_NetRxRead().

Examples:
net/capture/capture_example.c.

Definition at line 342 of file stream_net.h.

Data Fields

enum NtNetRxCmd_e cmd
 The read command - specified what to read from NetRx. More...
 
union NtNetRx_s::NtNetRx_u u
 

Field Documentation

enum NtNetRxCmd_e NtNetRx_s::cmd

The read command - specified what to read from NetRx.

Examples:
net/capture/capture_example.c.

Definition at line 343 of file stream_net.h.

Referenced by main().

union NtNetRx_s::NtNetRx_u NtNetRx_s::u
Examples:
net/capture/capture_example.c.

Referenced by main().

union NtNetRx_s::NtNetRx_u

Union of all possible return structures from NetRxRead()

Definition at line 347 of file stream_net.h.

Data Fields

struct NtNetRxFileHeader_s fileheader
 The structure to use for NtNetRx_s::cmd==NT_NETRX_READ_CMD_GET_FILE_HEADER. More...
 
struct NtNetRxStreamDrop_s streamDrop
 The structure to use for NtNetRx_s::cmd==NT_NETRX_READ_CMD_STREAM_DROP. More...
 
struct NtNetRxStreamTime_s streamTime
 The structure to use for NtNetRx_s::cmd==NT_NETRX_READ_CMD_STREAM_TIME. More...
 
struct NtNetRxPcapInfo_s pcap
 The structure to use for NtNetRx_s::cmd==NT_NETRX_READ_CMD_PCAP_INFO. More...
 
struct NtNetRxHbRing_s ringControl
 The structure to use for NtNetRx_s::cmd==NT_NETRX_READ_CMD_GET_RING_CONTROL. More...
 
struct NtNetRxHbInfo_s hbInfo
 The structure to use for NtNetRx_s::cmd==NT_NETRX_READ_CMD_GET_HB_INFO. More...
 

Field Documentation

struct NtNetRxFileHeader_s NtNetRx_s::NtNetRx_u::fileheader

The structure to use for NtNetRx_s::cmd==NT_NETRX_READ_CMD_GET_FILE_HEADER.

Examples:
net/capture/capture_example.c.

Definition at line 348 of file stream_net.h.

Referenced by main().

struct NtNetRxStreamDrop_s NtNetRx_s::NtNetRx_u::streamDrop

The structure to use for NtNetRx_s::cmd==NT_NETRX_READ_CMD_STREAM_DROP.

Definition at line 349 of file stream_net.h.

struct NtNetRxStreamTime_s NtNetRx_s::NtNetRx_u::streamTime

The structure to use for NtNetRx_s::cmd==NT_NETRX_READ_CMD_STREAM_TIME.

Definition at line 350 of file stream_net.h.

struct NtNetRxPcapInfo_s NtNetRx_s::NtNetRx_u::pcap

The structure to use for NtNetRx_s::cmd==NT_NETRX_READ_CMD_PCAP_INFO.

Definition at line 351 of file stream_net.h.

struct NtNetRxHbRing_s NtNetRx_s::NtNetRx_u::ringControl

The structure to use for NtNetRx_s::cmd==NT_NETRX_READ_CMD_GET_RING_CONTROL.

Definition at line 352 of file stream_net.h.

struct NtNetRxHbInfo_s NtNetRx_s::NtNetRx_u::hbInfo

The structure to use for NtNetRx_s::cmd==NT_NETRX_READ_CMD_GET_HB_INFO.

Definition at line 353 of file stream_net.h.

struct NtNetTxHbInfo_s

TX Host buffer info

Definition at line 369 of file stream_net.h.

Data Fields

unsigned int numHostBuffers
 The number of host buffers used by the stream and also the depth of the array. More...
 
struct NtNetTxHbInfo_s::NtNetTxHb_s aHostBuffer [128]
 

Field Documentation

unsigned int NtNetTxHbInfo_s::numHostBuffers

The number of host buffers used by the stream and also the depth of the array.

Examples:
net/transmit_multifunction/transmit_multifunction_example.c.

Definition at line 370 of file stream_net.h.

Referenced by _NetTxDataCheckHbInfo().

struct NtNetTxHbInfo_s::NtNetTxHb_s

Definition at line 371 of file stream_net.h.

Data Fields

size_t size
 The size of the host buffer. More...
 
size_t available
 Amount of the host buffer available to the application. More...
 
size_t dequeued
 Amount of the host buffer dequeued by the application. More...
 
size_t released
 Amount of the host buffer released waiting to be transmitted. More...
 
enum NtNetHostBufferLayout_e layout
 The host buffer layout. More...
 
int index
 The host buffer index. Unique throughout the system. More...
 
uint64_t portMask
 The port-mask the host buffer can utilize. More...
 

Field Documentation

size_t NtNetTxHbInfo_s::NtNetTxHb_s::size

The size of the host buffer.

Examples:
net/transmit_multifunction/transmit_multifunction_example.c, net/transmit_packet/transmit_packet_example.c, and net/transmit_segment/transmit_segment_example.c.

Definition at line 372 of file stream_net.h.

Referenced by _NetTxDataCheckHbInfo(), and main().

size_t NtNetTxHbInfo_s::NtNetTxHb_s::available

Amount of the host buffer available to the application.

Examples:
net/transmit_multifunction/transmit_multifunction_example.c, net/transmit_packet/transmit_packet_example.c, and net/transmit_segment/transmit_segment_example.c.

Definition at line 373 of file stream_net.h.

Referenced by _NetTxDataCheckHbInfo(), and main().

size_t NtNetTxHbInfo_s::NtNetTxHb_s::dequeued

Amount of the host buffer dequeued by the application.

Examples:
net/transmit_multifunction/transmit_multifunction_example.c, net/transmit_packet/transmit_packet_example.c, and net/transmit_segment/transmit_segment_example.c.

Definition at line 374 of file stream_net.h.

Referenced by _NetTxDataCheckHbInfo(), and main().

size_t NtNetTxHbInfo_s::NtNetTxHb_s::released

Amount of the host buffer released waiting to be transmitted.

Examples:
net/transmit_multifunction/transmit_multifunction_example.c, net/transmit_packet/transmit_packet_example.c, and net/transmit_segment/transmit_segment_example.c.

Definition at line 375 of file stream_net.h.

Referenced by _NetTxDataCheckHbInfo(), and main().

enum NtNetHostBufferLayout_e NtNetTxHbInfo_s::NtNetTxHb_s::layout

The host buffer layout.

Definition at line 376 of file stream_net.h.

int NtNetTxHbInfo_s::NtNetTxHb_s::index

The host buffer index. Unique throughout the system.

Definition at line 377 of file stream_net.h.

uint64_t NtNetTxHbInfo_s::NtNetTxHb_s::portMask

The port-mask the host buffer can utilize.

Definition at line 378 of file stream_net.h.

struct NtNetTxHbRing_s

Expose host buffer info (Napatech internal use only - may change without further notice)

Definition at line 385 of file stream_net.h.

Data Fields

volatile uint64_t * pRead
 
volatile uint64_t * pWrite
 
uint8_t * ring
 
uint64_t size
 
uint16_t minTxPktSize
 The min transmit packet size of this port. More...
 
uint16_t maxTxPktSize
 The max transmit packet size of this port. More...
 
uint8_t port
 The port this ring is attached to. More...
 

Field Documentation

volatile uint64_t* NtNetTxHbRing_s::pRead

Definition at line 386 of file stream_net.h.

volatile uint64_t* NtNetTxHbRing_s::pWrite

Definition at line 387 of file stream_net.h.

uint8_t* NtNetTxHbRing_s::ring

Definition at line 388 of file stream_net.h.

uint64_t NtNetTxHbRing_s::size

Definition at line 389 of file stream_net.h.

uint16_t NtNetTxHbRing_s::minTxPktSize

The min transmit packet size of this port.

Definition at line 390 of file stream_net.h.

uint16_t NtNetTxHbRing_s::maxTxPktSize

The max transmit packet size of this port.

Definition at line 391 of file stream_net.h.

uint8_t NtNetTxHbRing_s::port

The port this ring is attached to.

Definition at line 392 of file stream_net.h.

struct NtNetTx_s

NetTx structure. Network TX data is read via this structure via NT_NetTxRead().

Examples:
net/transmit_multifunction/transmit_multifunction_example.c, net/transmit_packet/transmit_packet_example.c, and net/transmit_segment/transmit_segment_example.c.

Definition at line 399 of file stream_net.h.

Data Fields

enum NtNetTxCmd_e cmd
 The read command - specified what to read from NetTx. More...
 
union NtNetTx_s::NtNetTx_u u
 

Field Documentation

enum NtNetTxCmd_e NtNetTx_s::cmd

The read command - specified what to read from NetTx.

Examples:
net/transmit_multifunction/transmit_multifunction_example.c, net/transmit_packet/transmit_packet_example.c, and net/transmit_segment/transmit_segment_example.c.

Definition at line 400 of file stream_net.h.

Referenced by _NetTxDataCheckHbInfo(), and main().

union NtNetTx_s::NtNetTx_u

Union of all possible return structures from NetTxRead()

Definition at line 404 of file stream_net.h.

Data Fields

struct NtNetTxHbInfo_s hbInfo
 Information about the host buffers used. More...
 
struct NtNetTxHbRing_s ringControl
 Control of the host buffer ring (Napatech internal use only - may change without further notice) More...
 

Field Documentation

struct NtNetTxHbInfo_s NtNetTx_s::NtNetTx_u::hbInfo

Information about the host buffers used.

Examples:
net/transmit_multifunction/transmit_multifunction_example.c, net/transmit_packet/transmit_packet_example.c, and net/transmit_segment/transmit_segment_example.c.

Definition at line 405 of file stream_net.h.

Referenced by _NetTxDataCheckHbInfo(), and main().

struct NtNetTxHbRing_s NtNetTx_s::NtNetTx_u::ringControl

Control of the host buffer ring (Napatech internal use only - may change without further notice)

Definition at line 406 of file stream_net.h.

struct NtNetTxFragment_s

NtNetTxFragment structure. A TX packet may be scattered in a list of fragments, which is put together and added to the TX hostbuffer via NT_NetTxAddPacket().

Definition at line 415 of file stream_net.h.

Data Fields

uint8_t * data
 
uint16_t size
 

Field Documentation

uint8_t* NtNetTxFragment_s::data

Definition at line 417 of file stream_net.h.

Referenced by main().

uint16_t NtNetTxFragment_s::size

Definition at line 418 of file stream_net.h.

Referenced by main().

struct NtNetFileReadInfo_v1_s

NetFile stream Info return structure

Definition at line 436 of file stream_net.h.

Data Fields

uint64_t lastTimestamp
 The time stamp in the last packet in last segment read using the function NT_NetFileGet. More...
 
uint64_t numberOfOctets
 Number of octets read from Netfile so far. More...
 
uint32_t numberOfPackets
 Number of packets read from Netfile so far. More...
 
uint64_t firstTimestamp
 The time stamp in the first packet in first segment read using the function NT_NetFileGet. More...
 

Field Documentation

uint64_t NtNetFileReadInfo_v1_s::lastTimestamp

The time stamp in the last packet in last segment read using the function NT_NetFileGet.

Examples:
net/replay4GA/replay4ga_example.c, and net/replayGS/replayGS_example.c.

Definition at line 437 of file stream_net.h.

Referenced by main().

uint64_t NtNetFileReadInfo_v1_s::numberOfOctets

Number of octets read from Netfile so far.

Definition at line 438 of file stream_net.h.

uint32_t NtNetFileReadInfo_v1_s::numberOfPackets

Number of packets read from Netfile so far.

Definition at line 439 of file stream_net.h.

uint64_t NtNetFileReadInfo_v1_s::firstTimestamp

The time stamp in the first packet in first segment read using the function NT_NetFileGet.

Definition at line 440 of file stream_net.h.

struct NtNetFileReadDesc_s

Definition at line 450 of file stream_net.h.

Data Fields

enum NtTimestampType_e tsType
 Timestamp format used in packet data. More...
 
enum NtPacketDescriptorType_e desc
 Descriptor used in packet data. More...
 

Field Documentation

enum NtTimestampType_e NtNetFileReadDesc_s::tsType

Timestamp format used in packet data.

Definition at line 452 of file stream_net.h.

enum NtPacketDescriptorType_e NtNetFileReadDesc_s::desc

Descriptor used in packet data.

Definition at line 453 of file stream_net.h.

struct NtNetFileRead_s

NetFileRead stream structure - network File data is read via this structure via NT_NetFileRead()

Examples:
net/replay4GA/replay4ga_example.c, and net/replayGS/replayGS_example.c.

Definition at line 464 of file stream_net.h.

Data Fields

enum NtNetFileReadCmd_e cmd
 The read command - specified what to read from NetFile. More...
 
union NtNetFileRead_s::NtNetFileRead_u u
 

Field Documentation

enum NtNetFileReadCmd_e NtNetFileRead_s::cmd

The read command - specified what to read from NetFile.

Examples:
net/replay4GA/replay4ga_example.c, and net/replayGS/replayGS_example.c.

Definition at line 465 of file stream_net.h.

Referenced by main().

union NtNetFileRead_s::NtNetFileRead_u NtNetFileRead_s::u
union NtNetFileRead_s::NtNetFileRead_u

Union of all possible return structures from NT_NetFileRead()

Definition at line 469 of file stream_net.h.

Data Fields

struct NtNetFileReadInfo_v1_s info_v1
 Information about the NetFile. Used by NT_NETFILE_READ_INFO_CMD. More...
 
struct NtNetFileReadDesc_s desc
 Information about the descriptor and timestamp format used. Used by NT_NETFILE_READ_DESCRIPTOR_CMD. More...
 
NtNetFileType_e fileType
 Information about the type of the opened file. More...
 

Field Documentation

struct NtNetFileReadInfo_v1_s NtNetFileRead_s::NtNetFileRead_u::info_v1

Information about the NetFile. Used by NT_NETFILE_READ_INFO_CMD.

Examples:
net/replay4GA/replay4ga_example.c, and net/replayGS/replayGS_example.c.

Definition at line 470 of file stream_net.h.

Referenced by main().

struct NtNetFileReadDesc_s NtNetFileRead_s::NtNetFileRead_u::desc

Information about the descriptor and timestamp format used. Used by NT_NETFILE_READ_DESCRIPTOR_CMD.

Definition at line 471 of file stream_net.h.

NtNetFileType_e NtNetFileRead_s::NtNetFileRead_u::fileType

Information about the type of the opened file.

Definition at line 472 of file stream_net.h.

union __nt_netrx_attr

Definition at line 489 of file stream_net.h.

Data Fields

char __size [__SIZEOF_NT_NETRX_ATTR]
 
long int __align
 

Field Documentation

char __nt_netrx_attr::__size[__SIZEOF_NT_NETRX_ATTR]

Definition at line 490 of file stream_net.h.

long int __nt_netrx_attr::__align

Definition at line 491 of file stream_net.h.

union __nt_nettx_attr

Data Fields

char __size [__SIZEOF_NT_NETTX_ATTR]
 
long int __align
 

Field Documentation

char __nt_nettx_attr::__size[__SIZEOF_NT_NETTX_ATTR]

Definition at line 500 of file stream_net.h.

long int __nt_nettx_attr::__align

Definition at line 501 of file stream_net.h.

Function Documentation

int NT_NetRxOpen ( NtNetStreamRx_t hStream,
const char *  name,
enum NtNetInterface_e  netIntf,
uint32_t  streamId,
int  hostBufferAllowance 
)

Opens in-line or capture host buffer(s) and returns a NtNetStreamRx_t handle.

This function is called to retrieve a handle to an in-line or capture network stream.

In-line network streams cannot be shared and any attempt to open an existing in-line stream fails with an error return value.

Note
It is important to start calling NT_NetRxGet() and NT_NetRxRelease() soon after this call to avoid packet drop. Host buffers are assigned/released to the streamid within NT_NetRxGet() and NT_NetRxRelease().
Parameters
[out]hStreamReference to a NtNetStreamRx_t stream pointer
[in]nameStream friendly name - used in, for example, logging statements
[in]netIntfInterface type - segment or packet
[in]streamIdThe network stream ID to open - can be opened a number of times which will cause sharing of the host buffers in the streamId
[in]hostBufferAllowanceDrop level for the host buffer allowance (hysteresis), -1 means disabled
Return values
NT_SUCCESSSuccess
!=NT_SUCCESSError - use NT_ExplainError for an error description
Examples:
net/analysis/analysis_example.c, net/capture/capture_example.c, net/inline/inline_example.c, net/ipfdemo/ipfdemo_example.c, net/netflow/netflow_example.c, net/numa/numa_example.c, net/streamidstatistics/streamidstatistics_example.c, net/timestamp_inject/timestamp_inject_example.cpp, and net/vlandemo/vlandemo_example.c.

Referenced by main(), PacketReaderThread::processPackets(), taskReceiverCounter(), and taskReceiverMiss().

int NT_NetRxOpen_v2 ( NtNetStreamRx_t hStream,
const char *  name,
enum NtNetInterface_e  netIntf,
uint32_t  streamId,
int  hostBufferAllowance,
int  flags 
)

Opens in-line or capture host buffer(s) and returns a NtNetStreamRx_t handle.

This function is called to retrieve a handle to an in-line or capture network stream with flags.

In-line network streams cannot be shared and any attempt to open an existing in-line stream fails with an error return value.

Note
It is important to start calling NT_NetRxGet() and NT_NetRxRelease() soon after this call to avoid packet drop. Host buffers are assigned/released to the streamid within NT_NetRxGet() and NT_NetRxRelease().

The flags shall be either NT_NETRX_OPEN_FLAGS_NONE or the bitwise-inclusive OR of one or more of the other flags in the following table:

Flag Description
NT_NETRX_OPEN_FLAGS_NONE No flags set, equivalent to passing '0' as flag.
NT_NETRX_OPEN_FLAGS_READONLY_STREAM Using this option will cause a write to data returned by NT_NetRxGet to fail with a segmentation fault.
Parameters
[out]hStreamReference to a NtNetStreamRx_t stream pointer
[in]nameStream friendly name - used in, for example, logging statements
[in]netIntfInterface type - segment or packet
[in]streamIdThe network stream ID to open - can be opened a number of times which will cause sharing of the host buffers in the streamId
[in]hostBufferAllowanceDrop level for the host buffer allowance (hysteresis), -1 means disabled
[in]flagsFlags for the stream OR'd together, or zero for no flags.
Return values
NT_SUCCESSSuccess
!=NT_SUCCESSError - use NT_ExplainError for an error description
void NT_NetRxOpenAttrInit ( NtNetRxAttr_t attr)

Initialize RX stream attributes.

The attributes are initialized to the following default values:
name = NULL
netIntf = NT_NET_INTERFACE_UNKNOWN
hostBufferAllowance = -1
flags = NT_NETRX_OPEN_FLAGS_NONE

Parameters
[out]attrPointer to the attributes structure
void NT_NetRxOpenAttrSetName ( NtNetRxAttr_t attr,
const char *  name 
)

Sets the stream name attribute.

Parameters
[in]attrPointer to the attributes structure
[in]nameStream friendly name - used in, for example, logging statements
const char* NT_NetRxOpenAttrGetName ( const NtNetRxAttr_t attr)

Returns the name attribute.

Returns
The name attribute
void NT_NetRxOpenAttrSetNetIntf ( NtNetRxAttr_t attr,
enum NtNetInterface_e  netIntf 
)

Sets the interface type attribute.

Parameters
[in]attrPointer to the attributes structure
[in]netIntfInterface type - segment or packet
enum NtNetInterface_e NT_NetRxOpenAttrGetNetIntf ( const NtNetRxAttr_t attr)

Returns the interface type attribute.

Returns
The interface type attribute
void NT_NetRxOpenAttrSetHostBufferAllowance ( NtNetRxAttr_t attr,
int  hostBufferAllowance 
)

Sets the host buffer allowance attribute.

Parameters
[in]attrPointer to the attributes structure
[in]hostBufferAllowanceDrop level for the host buffer allowance (hysteresis), -1 means disabled
int NT_NetRxOpenAttrGetHostBufferAllowance ( const NtNetRxAttr_t attr)

Returns the buffer allowance attribute.

Returns
The buffer allowance attribute
void NT_NetRxOpenAttrSetFlags ( NtNetRxAttr_t attr,
int  flags 
)

Sets the flags attribute.

The flags shall be either NT_NETRX_NONE or the bitwise-inclusive OR of one or more of the other flags in the following table - see enum NtNetRxOpenFlags_e

Flag Description
NT_NETRX_NONE No flags set, equivalent to passing '0' as flag.
NT_NETRX_READONLY_STREAM Using this option will cause a write to data returned by NT_NetRxGet to fail with a segmentation fault.
Parameters
[in]attrPointer to the attributes structure
[in]flagsDrop level for the host buffer allowance (hysteresis), -1 means disabled
int NT_NetRxOpenAttrGetFlags ( const NtNetRxAttr_t attr)

Returns the flags attribute.

Returns
The flags attribute - see enum NtNetRxOpenFlags_e
int NT_NetRxOpen_Attr ( NtNetStreamRx_t hStream,
uint32_t  streamId,
const NtNetRxAttr_t attr 
)

Opens in-line or capture host buffer(s) and returns a NtNetStreamRx_t handle.

This function is called to retrieve a handle to an in-line or capture network stream with flags.

Note
It is important to start calling NT_NetRxGet() and NT_NetRxRelease() soon after this call to avoid packet drop. Host buffers are assigned/released to the streamid within NT_NetRxGet() and NT_NetRxRelease().
Parameters
[out]hStreamReference to a NtNetStreamRx_t stream pointer
[in]streamIdThe network stream ID to open - can be opened a number of times which will cause sharing of the host buffers in the streamId
[in]attrAttributes of the stream
Return values
NT_SUCCESSSuccess
!=NT_SUCCESSError - use NT_ExplainError for an error description
int NT_NetRxOpenMulti ( NtNetStreamRx_t hStream,
const char *  name,
enum NtNetInterface_e  netIntf,
uint32_t *  paStreamId,
unsigned int  numStreamIds,
int  hostBufferAllowance 
)

Opens in-line or capture host buffer(s) and returns a NtNetStreamRx_t handle.

This function is called to retrieve a handle to an in-line or capture network streams. If multiple stream-ids are opened the data from them will be time stamp merged. Note multiple stream-ids can only be used with the packet interface.

Note
It is important to start calling NT_NetRxGet() and NT_NetRxRelease() soon after this call to avoid packet drop. Host buffers are assigned/released to the streamid within NT_NetRxGet() and NT_NetRxRelease().
Parameters
[out]hStreamReference to a NtNetStreamRx_t stream pointer
[in]nameStream friendly name - used in, for example, logging statements
[in]netIntfInterface type - Can only be packet if multiple are opened
[in]paStreamIdArray containing the network stream IDs to open. A maximum of 8 streams can be specified.
[in]numStreamIdsThe number of stream-ids in the paStreamId array
[in]hostBufferAllowanceDrop level for the host buffer allowance (hysteresis), -1 means disabled
Return values
NT_SUCCESSSuccess
!=NT_SUCCESSError - use NT_ExplainError for an error description
int NT_NetRxOpenMulti_v2 ( NtNetStreamRx_t hStream,
const char *  name,
enum NtNetInterface_e  netIntf,
uint32_t *  paStreamId,
unsigned int  numStreamIds,
int  hostBufferAllowance,
int  flags 
)

Opens in-line or capture host buffer(s) and returns a NtNetStreamRx_t handle.

This function is called to retrieve a handle to an in-line or capture network streams with flags. If multiple stream-ids are opened the data from them will be time stamp merged. Note multiple stream-ids can only be used with the packet interface.

Note
It is important to start calling NT_NetRxGet() and NT_NetRxRelease() soon after this call to avoid packet drop. Host buffers are assigned/released to the streamid within NT_NetRxGet() and NT_NetRxRelease().

The flags shall be either NT_NETRX_NONE or the bitwise-inclusive OR of one or more of the other flags in the following table (see enum NtNetRxOpenFlags_e):

Flag Description
NT_NETRX_NONE No flags set, equivalent to passing '0' as flag.
NT_NETRX_READONLY_STREAM Using this option will cause a write to data returned by NT_NetRxGet to fail with a segmentation fault.
Parameters
[out]hStreamReference to a NtNetStreamRx_t stream pointer
[in]nameStream friendly name - used in, for example, logging statements
[in]netIntfInterface type - Can only be packet if multiple are opened
[in]paStreamIdArray containing the network stream IDs to open. A maximum of 8 streams can be specified.
[in]numStreamIdsThe number of stream-ids in the paStreamId array
[in]hostBufferAllowanceDrop level for the host buffer allowancei (hysteresis), -1 means disabled
[in]flagsFlags for the stream OR'd together, or zero for no flags.
Return values
NT_SUCCESSSuccess
!=NT_SUCCESSError - use NT_ExplainError for an error description
int NT_NetRxOpenMulti_Attr ( NtNetStreamRx_t hStream,
uint32_t *  paStreamId,
unsigned int  numStreamIds,
const NtNetRxAttr_t attr 
)

Opens in-line or capture host buffer(s) and returns a NtNetStreamRx_t handle.

This function is called to retrieve a handle to an in-line or capture network streams with flags. If multiple stream-ids are opened the data from them will be time stamp merged. Note multiple stream-ids can only be used with the packet interface.

Note
It is important to start calling NT_NetRxGet() and NT_NetRxRelease() soon after this call to avoid packet drop. Host buffers are assigned/released to the streamid within NT_NetRxGet() and NT_NetRxRelease().
Parameters
[out]hStreamReference to a NtNetStreamRx_t stream pointer
[in]paStreamIdArray containing the network stream IDs to open. A maximum of 8 streams can be specified.
[in]numStreamIdsThe number of stream-ids in the paStreamId array
[in]attrAttributes of the stream(s)
Return values
NT_SUCCESSSuccess
!=NT_SUCCESSError - use NT_ExplainError for an error description
int NT_NetRxGet ( NtNetStreamRx_t  hStream,
NtNetBuf_t netBuf,
int  timeout 
)

Gets data from an in-line or capture stream.

This function is called to retrieve packets/segments from a in-line or capture stream.

The calling process is suspended when no data is immediately available. The suspension is done in one of two ways, depending on the system clock resolution:

1) If the system clock resolution is <= 1 uSec, sleep calls are used. The timeout value is divided into sleep intervals (with intervals approximating the segment timeout on the adapter). It then periodically polls for data.

2) using events. If the system cannot do uSec sleeps, then the suspension mechanism used is event based. It puts the calling process to sleep waiting for an event. On data receival an event is sent and the process is woken up.

Parameters
[in]hStreamNetwork RX stream handle
[out]netBufSegment/packet container reference, is set to NULL if return value is not NT_SUCCESS
[in]timeoutThe timeout in milliseconds. The call will return when any data is available, or when the timeout is reached. A timeout of -1 will wait indefinitely if using the packet mode. In segment mode the waiting is always capped to the next HostBufferPollInterval (ntservice.ini), which is 100 usecs by default, at which point an empty segment is returned, if no data arrived. So in segment mode, any timeout larger than HostBufferPollInterval (including -1) has no effect.
Note
This function has no mutex protection, therefore the same hStream cannot be used by multiple threads
When the segment interface is used this function can return empty segments only containing a time stamp update, hence if NT_NET_GET_SEGMENT_LENGTH() return 0 only NT_NET_GET_SEGMENT_TIMESTAMP() can be used. The time stamp update will make it possible for users to merge packets in segments from different stream ids.
Return values
NT_SUCCESSData has been returned and must be released again via NT_NetRxRelease()
NT_STATUS_TIMEOUTNo data has been returned and a timeout has occured
NT_STATUS_TRYAGAINThe resource is temporarily unavailable because of reconfiguration - call NT_NetRxGet() again
ErrorUse NT_ExplainError for an error description
Examples:
net/analysis/analysis_example.c, net/capture/capture_example.c, net/inline/inline_example.c, net/ipfdemo/ipfdemo_example.c, net/netflow/netflow_example.c, net/numa/numa_example.c, net/streamidstatistics/streamidstatistics_example.c, and net/vlandemo/vlandemo_example.c.

Referenced by main(), and while().

int NT_NetRxGetNextPacket ( NtNetStreamRx_t  hStream,
NtNetBuf_t netBuf,
int  timeout 
)

Gets data from an in-line or capture stream.

This function is called to retrieve packets from a in-line or capture stream. The function will automatically release the previous packet when called, hence it is not possible to keep packets and if necessary the packets must be copied to a safe buffer before calling the function to get the next packet.

Parameters
[in]hStreamNetwork RX stream handle
[out]netBufSegment/packet container reference, is set to NULL if return value is not NT_SUCCESS
[in]timeoutThe timeout in milliseconds. The call will return when this timeout is reached unless data is available. A timeout of -1 will wait indefinitely for a new buffer.
Note
This function has no mutex protection, therefore the same hStream cannot be used by multiple threads
Return values
NT_SUCCESSData has been returned and will be valid until the next NT_NetRxGetNextPacket() call
NT_STATUS_TIMEOUTNo data has been returned and a timeout has occured
NT_STATUS_TRYAGAINThe resource is temporarily unavailable because of reconfiguration - call NT_NetRxGetNextPacket() again
ErrorUse NT_ExplainError for an error description
Examples:
net/timestamp_inject/timestamp_inject_example.cpp.

Referenced by PacketReaderThread::processPackets(), taskReceiverCounter(), and taskReceiverMiss().

int NT_NetRxRead ( NtNetStreamRx_t  hStream,
NtNetRx_t cmd 
)

Reads data from the stream.

This function will read on-line generated data from the stream, for example, a file header

Parameters
[in]hStreamNetRx stream handle
[in]cmdNetRx read structure
Return values
NT_SUCCESSSuccess
!=NT_SUCCESSError - use NT_ExplainError for an error description
Examples:
net/capture/capture_example.c.

Referenced by main().

int NT_NetRxRelease ( NtNetStreamRx_t  hStream,
NtNetBuf_t  netBuf 
)

Releases network buffer.

This function will release the netBuf data obtained via NT_NetRxGet(). The data within netBuf will on an in-line profile be sent to the adapter upon release even in the case where the NTPL assignment has been terminated.

Note
This function has no mutex protection, therefore the same hStream cannot be used by multiple threads
Parameters
[in]hStreamNetRx stream handle
[in]netBufNet buffer received via NT_NetRxGet()
Return values
NT_SUCCESSSuccess
!=NT_SUCCESSError - use NT_ExplainError for an error description
Examples:
net/analysis/analysis_example.c, net/capture/capture_example.c, net/inline/inline_example.c, net/ipfdemo/ipfdemo_example.c, net/netflow/netflow_example.c, net/numa/numa_example.c, net/streamidstatistics/streamidstatistics_example.c, and net/vlandemo/vlandemo_example.c.

Referenced by _ReleaseDgramTblEntry(), for(), main(), and while().

int NT_NetRxClose ( NtNetStreamRx_t  hStream)

Closes an in-line or capture stream.

This function is called to close an in-line or capture stream

Parameters
[in]hStreamIn-line or capture stream handle to close
Return values
NT_SUCCESSSuccess
!=NT_SUCCESSError - use NT_ExplainError for an error description
Examples:
net/analysis/analysis_example.c, net/capture/capture_example.c, net/inline/inline_example.c, net/ipfdemo/ipfdemo_example.c, net/netflow/netflow_example.c, net/numa/numa_example.c, net/streamidstatistics/streamidstatistics_example.c, net/timestamp_inject/timestamp_inject_example.cpp, and net/vlandemo/vlandemo_example.c.

Referenced by main(), PacketReaderThread::processPackets(), taskReceiverCounter(), taskReceiverMiss(), and while().

Macro Definition Documentation

#define __SIZEOF_NT_NETRX_ATTR   (128)

Parameter structure for NT_NetRxOpen_Attr/NT_NetRxOpen_v3/NT_NetRxOpenMulti_v3

Definition at line 488 of file stream_net.h.

#define __SIZEOF_NT_NETTX_ATTR   (128)

Parameter structure for NT_NetTxOpen_Attr/NT_NetTxOpen_v3/NT_NetTxOpenMulti_v3

Definition at line 498 of file stream_net.h.

#define NT_NETRX_NONE   (0)

Flags for NT_NetRxOpen_v2+/NT_NetRxOpenMulti_v2+

Obsolete: please use enum NtNetRxOpenFlags_e below

Definition at line 510 of file stream_net.h.

#define NT_NETRX_READONLY_STREAM   (1LL<<0)

Definition at line 511 of file stream_net.h.

Typedef Documentation

typedef struct NtNetRx_s NtNetRx_t

NetRx structure. Network RX data is read via this structure via NT_NetRxRead().

typedef struct NtNetTx_s NtNetTx_t

NetTx structure. Network TX data is read via this structure via NT_NetTxRead().

NtNetTxFragment structure. A TX packet may be scattered in a list of fragments, which is put together and added to the TX hostbuffer via NT_NetTxAddPacket().

NetFile stream Info return structure

NetFileRead stream structure - network File data is read via this structure via NT_NetFileRead()

typedef struct NtNetStreamRx_s* NtNetStreamRx_t

The Network RX stream handle - used for both in-line and capture streams

Definition at line 483 of file stream_net.h.

Definition at line 493 of file stream_net.h.

Definition at line 503 of file stream_net.h.

Enumeration Type Documentation

Possible NetRx stream commands

Enumerator
NT_NETRX_READ_CMD_UNKNOWN 

Unknown read command.

NT_NETRX_READ_CMD_GET_FILE_HEADER 

Gets the file header for the stream.

NT_NETRX_READ_CMD_STREAM_DROP 

Returns the drop counters for each stream - the counters increment when packets are dropped because of the host buffer allowance (hysteresis) being activated.

NT_NETRX_READ_CMD_STREAM_TIME 

Returns the current stream time.

NT_NETRX_READ_CMD_PCAP_FCS 

Returns whether packets with pcap descriptors include ethernet FCS.

NT_NETRX_READ_CMD_GET_RING_CONTROL 

Return control of the host buffer ring of a stream Dangerous!! (Napatech internal use only - may change without further notice)

NT_NETRX_READ_CMD_GET_HB_INFO 

Gets the info on the host buffers used by the stream.

Definition at line 257 of file stream_net.h.

TX stream descriptor modes. Used for configuring required variables for TX.

Enumerator
NT_NETTX_DESCRIPTOR_MODE_STD 

TX with standard descriptors.

NT_NETTX_DESCRIPTOR_MODE_DYN1 

TX with DYN1 descriptors.

NT_NETTX_DESCRIPTOR_MODE_DYN2 

TX with DYN2 descriptors.

NT_NETTX_DESCRIPTOR_MODE_DYN3 

TX with DYN3 descriptors.

NT_NETTX_DESCRIPTOR_MODE_DYN4 

TX with DYN4 descriptors.

Definition at line 271 of file stream_net.h.

Possible NetTx stream commands

Enumerator
NT_NETTX_READ_CMD_UNKNOWN 

Unknown read command.

NT_NETTX_READ_CMD_GET_HB_INFO 

Gets the info on the host buffers used by the stream.

NT_NETTX_READ_CMD_GET_RING_CONTROL 

Get the control of the host buffer ring. Dangerous!! (Napatech internal use only - may change without further notice)

Definition at line 360 of file stream_net.h.

Possible NetFileRead commands

Enumerator
NT_NETFILE_READ_INFO_UNKNOWN_CMD 

Unknown read command.

NT_NETFILE_READ_COMPAT_0 

Read information about the NetFile stream.

NT_NETFILE_READ_FILETYPE_CMD 

Read information about the opened file type.

NT_NETFILE_READ_DESCRIPTOR_CMD 

Read information about the descriptor and timestamp format used.

NT_NETFILE_READ_INFO_CMD_V1 

Read information about the NetFile stream.

Definition at line 424 of file stream_net.h.

Enumerator
NT_NETFILE_TYPE_UNKNOWN 

The opened file is a unknown.

NT_NETFILE_TYPE_NT 

The opened file is a Napatech capture file.

NT_NETFILE_TYPE_PCAP 

The opened file is a PCAP capture file.

NT_NETFILE_TYPE_PCAP_NG 

The opened file is a PCAP NG capture file.

Definition at line 443 of file stream_net.h.

Enumerator
NT_NETRX_OPEN_FLAGS_NONE 
NT_NETRX_OPEN_FLAGS_READONLY_STREAM 

Definition at line 516 of file stream_net.h.