libisdn
msgb_fifo.c File Reference
#include <stdlib.h>
#include <string.h>
#include "msgb.h"
#include "msgb_fifo.h"

Go to the source code of this file.

Functions

int msgb_fifo_init (struct msgb_fifo *fifo, const int size)
struct msgb_fifomsgb_fifo_alloc (const int size)
int msgb_fifo_destroy (struct msgb_fifo *fifo)
int msgb_fifo_size (const struct msgb_fifo *fifo)
int msgb_fifo_length (const struct msgb_fifo *fifo)
int msgb_fifo_empty (const struct msgb_fifo *fifo)
int msgb_fifo_full (const struct msgb_fifo *fifo)
int msgb_fifo_enqueue (struct msgb_fifo *fifo, struct msgb *msg)
struct msgbmsgb_fifo_dequeue (struct msgb_fifo *fifo)

Function Documentation

struct msgb_fifo* msgb_fifo_alloc ( const int  size) [read]

Definition at line 30 of file msgb_fifo.c.

References msgb_fifo_init().

struct msgb* msgb_fifo_dequeue ( struct msgb_fifo fifo) [read]

Definition at line 98 of file msgb_fifo.c.

References dlist_entry, dlist_pop_head(), msgb_fifo::entries, and msgb_fifo::nr_entries.

int msgb_fifo_destroy ( struct msgb_fifo fifo)

Definition at line 49 of file msgb_fifo.c.

int msgb_fifo_empty ( const struct msgb_fifo fifo)

Definition at line 71 of file msgb_fifo.c.

References msgb_fifo::nr_entries.

int msgb_fifo_enqueue ( struct msgb_fifo fifo,
struct msgb msg 
)
int msgb_fifo_full ( const struct msgb_fifo fifo)

Definition at line 76 of file msgb_fifo.c.

References msgb_fifo::nr_entries, and msgb_fifo::size.

int msgb_fifo_init ( struct msgb_fifo fifo,
const int  size 
)

Definition at line 19 of file msgb_fifo.c.

References dlist_init_head(), msgb_fifo::entries, msgb_fifo::size, and msgb::size.

Referenced by msgb_fifo_alloc().

int msgb_fifo_length ( const struct msgb_fifo fifo)

Definition at line 66 of file msgb_fifo.c.

References msgb_fifo::nr_entries.

int msgb_fifo_size ( const struct msgb_fifo fifo)

Definition at line 61 of file msgb_fifo.c.

References msgb_fifo::size.