![]() |
SolarCapture C Bindings User Guide
SF-115721-CD
Issue 3
|
A packed-stream packet. More...
#include <packed_stream.h>
Data Fields | |
uint16_t | ps_next_offset |
uint8_t | ps_pkt_start_offset |
uint8_t | ps_flags |
uint16_t | ps_cap_len |
uint16_t | ps_orig_len |
uint32_t | ps_ts_sec |
uint32_t | ps_ts_nsec |
A packed-stream packet.
Packed-stream is an encapsulation that encodes multiple packets or other data in a buffer. Each packet is represented by an sc_packed_packet header which gives information about the packet stored and the offset to the next packet in the buffer.
The offset of the last packet in the buffer must generate a pointer that lies beyond the end of the buffer containing packed-stream data.
The following example code shows how to iterate over the set of packets stored in an sc_packet that contains packed-stream packets:
uint16_t ps_cap_len |
Number of bytes of packet payload stored.
uint8_t ps_flags |
SC_PS_FLAG_* flags.
uint16_t ps_next_offset |
Offset of next packet from start of this struct.
uint16_t ps_orig_len |
Original length of the frame.
uint8_t ps_pkt_start_offset |
Offset of packet payload from start of this struct.
uint32_t ps_ts_nsec |
Timestamp (nanoseconds).
uint32_t ps_ts_sec |
Timestamp (seconds).