_nt_net_create_segment_netbuf

Reference Documentation

product_line_custom
Napatech SmartNIC
category
Reference Information
static NT_INLINE void _nt_net_create_segment_netbuf ( uint64_t size,
    void * mem,
    uint8_t portOffset,
    struct NtNetBuf_s * segNetBuf
  )    

Inline C function to create a segment NtNetBuf_t.

This function is used when creating segments in application memory, e.g. when constructing a transmit segment

Parameters

[in] size

Size of the memory provided by the "mem" pointer

[in] mem

Pointer to the segment memory allocated

[in] portOffset

Segments are per adapter and ports are relative to the port offset. The port offset can be found in NtInfoAdapter_v6_s::portOffset. If 0 is provided then the possible values in NT_NET_SET_PKT_TXPORT can only be from 0 to 3.

[out] segNetBuf

Destination segment NtNetBuf_t structure

Definition at line 1227 of file stream_net.h.