NT_NetFileGet

Reference Documentation

product_line_custom
Napatech SmartNIC
category
Reference Information
int NT_NetFileGet ( NtNetStreamFile_t hStream,
    NtNetBuf_t * netBuf
  )    

Gets packets/segments from a file stream.

This function is called to retrieve packets or segments from a capture file

Note:

This function has no mutex protection, therefore the same hStream cannot be used by multiple threads

Note:

When NT_STATUS_END_OF_FILE is returned the internal file offset that been reset making it possible to call NT_NetFileGet() again without having to close and open the file, which improves performance when replaying a file continuously.

Parameters

[in] hStream

NetFile stream handle

[out] netBuf

Packet/segment container reference

Return values

NT_SUCCESS

(0) Success

NT_STATUS_END_OF_FILE

EOF indicator - See note

otherwise

Error - use NT_ExplainError for an error description

Definition at line 968 of file stream_net.h.

Referenced by GetTimeStamp(), and main().