Segment macros

Reference Documentation

Platform
Intel® PAC
Napatech SmartNIC
Content Type
Reference Information
Capture Software Version
Link™ Capture Software 12.10
Napatech Software Suite: Segment macros

Modules

 Functions to handle segment data
 

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...
 

Functions

uint64_t NT_NetGetSegmentTimestamp (void *pDescr)
 

Detailed Description

The following is only possible on segment-based streams

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 1858 of file stream_net.h.

Referenced by main().

#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 1876 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, and net/segment_inline/segment_inline_example.c.

Definition at line 1883 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 1891 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 1901 of file stream_net.h.

Function Documentation

uint64_t NT_NetGetSegmentTimestamp ( void *  pDescr)