SolarCapture C Bindings User Guide  SF-115721-CD
Draft 2A
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
ext_packet_list.h File Reference

sc_packet_list: A list of packets. More...

Data Structures

struct  sc_packet_list
 A list of packets or packet buffers. More...
 

Functions

static void sc_packet_list_init (struct sc_packet_list *l)
 Initialise a list. More...
 
static int sc_packet_list_is_empty (const struct sc_packet_list *l)
 Check if packet list is empty. More...
 
static void sc_packet_list_finalise (struct sc_packet_list *l)
 Finalise a list. More...
 
static struct sc_packetsc_packet_list_tail (struct sc_packet_list *l)
 Return the tail of current tail of the list. More...
 
static void sc_packet_list_push_head (struct sc_packet_list *pl, struct sc_packet *p)
 Push a packet to the head of a list. More...
 
static void sc_packet_list_append (struct sc_packet_list *l, struct sc_packet *p)
 Append a packet to a list and finalise. More...
 
static void sc_packet_list_append_list (struct sc_packet_list *dest, struct sc_packet_list *src)
 Append a list to a list. More...
 
static struct sc_packetsc_packet_list_pop_head (struct sc_packet_list *pl)
 Remove and return the head of the list. More...
 

Detailed Description

sc_packet_list: A list of packets.

Function Documentation

static void sc_packet_list_append ( struct sc_packet_list l,
struct sc_packet p 
)
inlinestatic

Append a packet to a list and finalise.

Parameters
lThe packet list.
pThe packet.
static void sc_packet_list_append_list ( struct sc_packet_list dest,
struct sc_packet_list src 
)
inlinestatic

Append a list to a list.

Parameters
destThe list to be extended.
srcThe list to be appended to dest.

After this call dest is finalised if and only if src was finalised.

src must be non-empty.

static void sc_packet_list_finalise ( struct sc_packet_list l)
inlinestatic

Finalise a list.

Parameters
lThe packet list.

If a list is not finalised, it is possible that the next pointer of tail is not NULL.

static void sc_packet_list_init ( struct sc_packet_list l)
inlinestatic

Initialise a list.

Parameters
lThe packet list.
static int sc_packet_list_is_empty ( const struct sc_packet_list l)
inlinestatic

Check if packet list is empty.

Parameters
lThe packet list.
Returns
True (1) if the packet list is empty, false (0) otherwise
static struct sc_packet* sc_packet_list_pop_head ( struct sc_packet_list pl)
static

Remove and return the head of the list.

Parameters
plThe packet list.
Returns
The removed head of the packet list.

This must only be invoked on a non-empty list.

static void sc_packet_list_push_head ( struct sc_packet_list pl,
struct sc_packet p 
)
inlinestatic

Push a packet to the head of a list.

Parameters
plThe packet list.
pThe packet.
static struct sc_packet* sc_packet_list_tail ( struct sc_packet_list l)
static

Return the tail of current tail of the list.

Parameters
lThe packet list.
Returns
The tail of current tail of the list.