Segment macros

Reference Documentation

product_line_custom
Intel® PAC
Napatech SmartNIC
category
Reference Information
Napatech Software Suite: Segment macros

Detailed Description

The following is only possible on segment-based streams

Modules

 Functions to handle segment data
 

Functions

uint64_t NT_NetGetSegmentTimestamp (void *pDescr)
 

Macros

#define NT_NET_GET_SEGMENT_PTR(_hNetBuf_)
 Returns the segment pointer. More...
 
#define NT_NET_GET_SEGMENT_LENGTH(_hNetBuf_)
 Returns the segment length. More...
 
#define NT_NET_GET_SEGMENT_PKTS(_hNetBuf_)
 Returns the number of packets in a segment. More...
 
#define NT_NET_GET_SEGMENT_TIMESTAMP(_hNetBuf_)
 The time stamp of the first packet in the segment. More...
 
#define NT_NET_GET_SEGMENT_TIMESTAMP_TYPE(_hNetBuf_)
 The time stamp type. More...
 
#define NT_NET_SET_SEGMENT_LENGTH(_hNetBuf_, _length_)
 Sets the segment length. More...
 

Function Documentation

uint64_t NT_NetGetSegmentTimestamp ( void *  pDescr)

Macro Definition Documentation

#define NT_NET_GET_SEGMENT_PTR (   _hNetBuf_)

Returns the segment pointer.

Parameters
[in]_hNetBuf_Segment container reference
Examples:
net/capture/capture_example.c, net/replay/replay_example.c, net/replay4GA/replay4ga_example.c, and net/replayGS/replayGS_example.c.

Definition at line 1718 of file stream_net.h.

Referenced by main().

#define NT_NET_GET_SEGMENT_LENGTH (   _hNetBuf_)
#define NT_NET_GET_SEGMENT_PKTS (   _hNetBuf_)

Returns the number of packets in a segment.

This macro is only supported on NT4GA adapters configured to static segment size emulation mode. On NT4GA adapters configured to dynamic segment size this macro will always return 0.

Parameters
[in]_hNetBuf_Segment container reference

Definition at line 1736 of file stream_net.h.

#define NT_NET_GET_SEGMENT_TIMESTAMP (   _hNetBuf_)

The time stamp of the first packet in the segment.

Parameters
[in]_hNetBuf_Segment container reference
Examples:
net/capture/capture_example.c.

Definition at line 1743 of file stream_net.h.

Referenced by main().

#define NT_NET_GET_SEGMENT_TIMESTAMP_TYPE (   _hNetBuf_)

The time stamp type.

Parameters
[in]_hNetBuf_Segment container reference
Examples:
net/capture/capture_example.c.

Definition at line 1751 of file stream_net.h.

Referenced by main().

#define NT_NET_SET_SEGMENT_LENGTH (   _hNetBuf_,
  _length_ 
)

Sets the segment length.

This is used when generating a TX segment and should be used with care.

Parameters
[in,out]_hNetBuf_Segment container reference
[in]_length_Length of the segment

Definition at line 1761 of file stream_net.h.