![]() |
SolarCapture C Bindings User Guide
SF-115721-CD
Issue 3
|
Representation of a packet. More...
#include <ext_packet.h>
Data Fields | |
uint64_t | ts_sec |
uint32_t | ts_nsec |
uint16_t | flags |
uint16_t | frame_len |
uint8_t | frags_n |
uint8_t | iovlen |
uint16_t | reserved1 |
uint32_t | reserved2 |
struct iovec * | iov |
struct sc_packet * | next |
struct sc_packet * | frags |
struct sc_packet ** | frags_tail |
uintptr_t * | metadata |
Representation of a packet.
This data-structure describes a packet. It includes pointers to the packet contents, meta-data relating to the packet and fields to support creating lists of packets.
Each sc_packet instance is usually associated with a buffer that holds the packet contents. A packet may span multiple such buffers, in which case the 'head' buffer uses frags
and frags_tail
to identify the remaining buffers (which are linked via the next
field). Nodes should generally not use the frags
, frags_n
and frags_tail
fields, because they are sometimes used in special ways. Instead nodes should use iov
and iovlen
to find the buffer(s) underlying an sc_packet.
uint16_t flags |
flags defined below
struct sc_packet* frags |
list of chained fragments
uint8_t frags_n |
number of fragments in frags
chain
struct sc_packet** frags_tail |
last fragment in chain
uint16_t frame_len |
original frame length in bytes
struct iovec* iov |
identifies packet data
uint8_t iovlen |
number of entries in iov
array
uintptr_t* metadata |
packet metadata
struct sc_packet* next |
next packet in a packet list
uint16_t reserved1 |
reserved
uint32_t reserved2 |
reserved
uint32_t ts_nsec |
timestamp (nanoseconds)
uint64_t ts_sec |
timestamp (seconds)