NT_NetTxAddPacket

Reference Documentation

product_line_custom
Napatech SmartNIC
category
Reference Information
int NT_NetTxAddPacket ( NtNetStreamTx_t hStream,
    uint32_t port,
    NtNetTxFragment_t * fragments,
    uint32_t fragmentCount,
    int timeout
  )    

AddPacket to a TX stream.

This function is called to put together scattered fragments of a packet and add it to a TX stream

Note:

This function has no mutex protection and cannot be used by multiple threads on the same stream, hStream.

Parameters

[in] hStream

Network TX stream handle

[in] port

Port to add packet into host buffer

[in] fragments

The scattered list of packet fragments

[in] fragmentCount

The number of scattered fragments in the list

[in] timeout

Time in milliseconds to wait for a packet buffer - a timeout of -1 will wait indefinitely for a packet buffer

Return values

NT_SUCCESS

Success

!=NT_SUCCESS

Error - use NT_ExplainError for an error description

Definition at line 787 of file stream_net.h.

Referenced by main().