capture_multi_example.c
Go to the documentation of this file.
115 * will return NT_SUCCESS when a segment is returned. Segments with NT_NET_GET_SEGMENTLENGTH()==0
117 * the segment. The NT_NET_GET_SEGMENT_TIMESTAMP() macro can still be used on the empty segments.
234 NtNetBuf_t hNetBuf = NULL; // Net buffer container. Segment data is returned in this when calling NT_NetRxGet().
253 // Initialize the NTAPI library and thereby check if NTAPI_VERSION can be used together with this library
277 // Get a stream handle with stream ID. NT_NET_INTERFACE_SEGMENT specify that we will receive data in a segment based matter.
318 // We got a segment. Check if the timestamp is newer than when the NTPL assign command was applied
321 if ((((struct ntpcap_ts_s *)NT_NET_GET_SEGMENT_PTR(hNetBuf))->sec * 1000000 + ((struct ntpcap_ts_s *)NT_NET_GET_SEGMENT_PTR(hNetBuf))->usec) >
325 break; // Break out, we have received a segment that is received after the NTPL assign command was applied
329 if ((((struct ntpcap_ts_s *)NT_NET_GET_SEGMENT_PTR(hNetBuf))->sec * 1000000000 + ((struct ntpcap_ts_s *)NT_NET_GET_SEGMENT_PTR(hNetBuf))->usec) >
333 break; // Break out, we have received a segment that is received after the NTPL assign command was applied
339 break; // Break out, we have received a segment that is received after the NTPL assign command was applied
363 (unsigned long long)NT_NET_GET_SEGMENT_TIMESTAMP(hNetBuf), currentStream, NT_NET_GET_SEGMENT_LENGTH(hNetBuf));
429 // Close the stream and release the hostbuffer. This will also remove the NTPL assignments performed.