OpenVPN
Data Structures | Macros | Functions
mbuf.h File Reference
#include "basic.h"
#include "buffer.h"
Include dependency graph for mbuf.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  mbuf_buffer
 
struct  mbuf_item
 
struct  mbuf_set
 

Macros

#define MBUF_INDEX(head, offset, size)   (((head) + (offset)) & ((size)-1))
 
#define MF_UNICAST   (1<<0)
 

Functions

struct mbuf_setmbuf_init (unsigned int size)
 
void mbuf_free (struct mbuf_set *ms)
 
struct mbuf_buffermbuf_alloc_buf (const struct buffer *buf)
 
void mbuf_free_buf (struct mbuf_buffer *mb)
 
void mbuf_add_item (struct mbuf_set *ms, const struct mbuf_item *item)
 
bool mbuf_extract_item (struct mbuf_set *ms, struct mbuf_item *item)
 
void mbuf_dereference_instance (struct mbuf_set *ms, struct multi_instance *mi)
 
static bool mbuf_defined (const struct mbuf_set *ms)
 
static unsigned int mbuf_len (const struct mbuf_set *ms)
 
static int mbuf_maximum_queued (const struct mbuf_set *ms)
 
struct multi_instancembuf_peek_dowork (struct mbuf_set *ms)
 
static struct multi_instancembuf_peek (struct mbuf_set *ms)
 

Macro Definition Documentation

◆ MBUF_INDEX

#define MBUF_INDEX (   head,
  offset,
  size 
)    (((head) + (offset)) & ((size)-1))

◆ MF_UNICAST

#define MF_UNICAST   (1<<0)

Definition at line 48 of file mbuf.h.

Referenced by multi_get_queue(), and multi_unicast().

Function Documentation

◆ mbuf_add_item()

void mbuf_add_item ( struct mbuf_set ms,
const struct mbuf_item item 
)

◆ mbuf_alloc_buf()

struct mbuf_buffer* mbuf_alloc_buf ( const struct buffer buf)

◆ mbuf_defined()

static bool mbuf_defined ( const struct mbuf_set ms)
inlinestatic

◆ mbuf_dereference_instance()

void mbuf_dereference_instance ( struct mbuf_set ms,
struct multi_instance mi 
)

◆ mbuf_extract_item()

bool mbuf_extract_item ( struct mbuf_set ms,
struct mbuf_item item 
)

◆ mbuf_free()

void mbuf_free ( struct mbuf_set ms)

◆ mbuf_free_buf()

void mbuf_free_buf ( struct mbuf_buffer mb)

◆ mbuf_init()

struct mbuf_set* mbuf_init ( unsigned int  size)

◆ mbuf_len()

static unsigned int mbuf_len ( const struct mbuf_set ms)
inlinestatic

Definition at line 88 of file mbuf.h.

References mbuf_set::len.

Referenced by multi_output_queue_ready().

◆ mbuf_maximum_queued()

static int mbuf_maximum_queued ( const struct mbuf_set ms)
inlinestatic

Definition at line 94 of file mbuf.h.

References mbuf_set::max_queued, and mbuf_peek_dowork().

Referenced by multi_print_status().

◆ mbuf_peek()

static struct multi_instance* mbuf_peek ( struct mbuf_set ms)
static

Definition at line 102 of file mbuf.h.

References mbuf_defined(), and mbuf_peek_dowork().

Referenced by multi_tcp_process_io().

◆ mbuf_peek_dowork()

struct multi_instance* mbuf_peek_dowork ( struct mbuf_set ms)