Functions | |
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. More... | |
static NT_INLINE uint64_t | _nt_net_get_next_packet (struct NtNetBuf_s *segNetBuf, uint64_t segLength, struct NtNetBuf_s *pktNetBuf) |
Inline C function to use when traversing segments. The function will update the NetBuf to the next packet in the segment. More... | |
static NT_INLINE void | _nt_net_build_pkt_netbuf (struct NtNetBuf_s *segNetBuf, struct NtNetBuf_s *pktNetBuf) |
Inline C function to build a packet based NtNetBuf_t from a segment based NtNetBuf_t. More... | |
static NT_INLINE void | _nt_net_initialize_segment_netbuf (uint64_t size, void *segment, uint8_t portOffset, struct NtNetBuf_s *segNetBuf) |
Inline C function to initialize a segment NtNetBuf_t structure using any received segment buffer. More... | |
Detailed Description
These inline C functions are only valid when "PacketDescriptor" in ntservice.ini file has been set to any value than PCAP and NT_NET_GET_PKT_DESCRIPTOR_TYPE returns NT_PACKET_DESCRIPTOR_TYPE_NT_EXTENDED or NT_PACKET_DESCRIPTOR_TYPE_NT
Function Documentation
|
static |
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 1921 of file stream_net.h.
|
static |
Inline C function to use when traversing segments. The function will update the NetBuf to the next packet in the segment.
- Parameters
-
[in] segNetBuf Segment NtNetBuf_s * structure [in] segLength Length of the segment - used to know when there is no more data [out] pktNetBuf Packet NtNetBuf_s * structure
- Return values
-
Returns the amount of data left in the segment
- Examples:
- net/capture/capture_example.c, net/replay/replay_example.c, net/replay4GA/replay4ga_example.c, net/replayGS/replayGS_example.c, net/segment_inline/segment_inline_example.c, net/transmit_multifunction/transmit_multifunction_example.c, net/transmit_segment/transmit_segment_example.c, and net/transmit_segment_dyn_descr/transmit_segment_dyn_descr_example.cpp.
Definition at line 1945 of file stream_net.h.
Referenced by main().
|
static |
Inline C function to build a packet based NtNetBuf_t from a segment based NtNetBuf_t.
- Parameters
-
[in] segNetBuf Segment NtNetBuf_t structure [out] pktNetBuf Destination packet NtNetBuf_t structure
- Examples:
- net/capture/capture_example.c, net/replay/replay_example.c, net/replay4GA/replay4ga_example.c, net/replayGS/replayGS_example.c, net/segment_inline/segment_inline_example.c, net/transmit_multifunction/transmit_multifunction_example.c, net/transmit_segment/transmit_segment_example.c, and net/transmit_segment_dyn_descr/transmit_segment_dyn_descr_example.cpp.
Definition at line 1970 of file stream_net.h.
Referenced by GetTimeStamp(), and main().
|
static |
Inline C function to initialize a segment NtNetBuf_t structure using any received segment buffer.
This function is used when a new NtNetBuf_t handle is needed for a provided segment buffer, e.g. when copying segments
- Parameters
-
[in] size Size of the segment pointed to by the "segment" pointer [in] segment Pointer to the segment [in] portOffset Segments are per adapter and ports are relative to the port offset. The port offset of the adapter of which the segment originates from most be copied/stored in parallel, or known by some other means, and specified here. If 0 is used here local ports will be seen as logical ports. [out] segNetBuf Segment NtNetBuf_t structure to initialize
Definition at line 1990 of file stream_net.h.