segment_inline_example.c
Go to the documentation of this file.
103 * will return NT_SUCCESS when a segment is returned. Segments with NT_NET_GET_SEGMENTLENGTH()==0
105 * the segment. The NT_NET_GET_SEGMENT_TIMESTAMP() macro can still be used on the empty segments.
160 NtNetBuf_t hNetBuf; // Net buffer container. Segment data is returned in this when calling NT_NetRxGet().
168 // Initialize the NTAPI library and thereby check if NTAPI_VERSION can be used together with this library
185 if ((status = NT_NTPL(hCfgStream, "Setup[TxDescriptor=Dyn;TxPorts=0;UseWL=True] = StreamId == 1", &ntplInfo, NT_NTPL_PARSER_VALIDATE_NORMAL)) != NT_SUCCESS) {
197 if ((status = NT_NTPL(hCfgStream, "Assign[StreamId=1;Descriptor=Dyn3] = Port == 0", &ntplInfo, NT_NTPL_PARSER_VALIDATE_NORMAL)) != NT_SUCCESS) {
233 // Get a stream handle with stream ID 1. NT_NET_INTERFACE_SEGMENT specify that we will receive data in a segment based matter.
234 if ((status = NT_NetRxOpen(&hNetRx, "TestStream", NT_NET_INTERFACE_SEGMENT, 1, -1)) != NT_SUCCESS) {
256 // We got a segment. Check if the timestamp is newer than when the NTPL assign command was applied
258 break; // Break out, we have received a segment that is received after the NTPL assign command was applied
323 // Close the stream and release the hostbuffer. This will also remove the NTPL assignments performed.
352 if ((status = NT_NTPL(hCfgStream, tmpBuffer, &ntplInfo, NT_NTPL_PARSER_VALIDATE_NORMAL)) != NT_SUCCESS) {