OpenVPN
|
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_set * | mbuf_init (unsigned int size) |
void | mbuf_free (struct mbuf_set *ms) |
struct mbuf_buffer * | mbuf_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_instance * | mbuf_peek_dowork (struct mbuf_set *ms) |
static struct multi_instance * | mbuf_peek (struct mbuf_set *ms) |
#define MBUF_INDEX | ( | head, | |
offset, | |||
size | |||
) | (((head) + (offset)) & ((size)-1)) |
Definition at line 89 of file mbuf.c.
References mbuf_set::array, ASSERT, mbuf_item::buffer, mbuf_set::capacity, D_MULTI_DROPPED, mbuf_set::head, mbuf_set::len, mbuf_set::max_queued, mbuf_extract_item(), mbuf_free_buf(), MBUF_INDEX, msg, and mbuf_buffer::refcount.
Referenced by multi_add_mbuf(), and multi_tcp_process_outgoing_link().
struct mbuf_buffer* mbuf_alloc_buf | ( | const struct buffer * | buf | ) |
Definition at line 65 of file mbuf.c.
References ALLOC_OBJ, mbuf_buffer::buf, clone_buf(), mbuf_buffer::flags, and mbuf_buffer::refcount.
Referenced by multi_bcast(), multi_tcp_process_outgoing_link(), and multi_unicast().
|
inlinestatic |
Definition at line 80 of file mbuf.h.
References mbuf_set::len.
Referenced by mbuf_peek(), multi_process_outgoing_link_pre(), multi_tcp_process_outgoing_link(), multi_tcp_set_global_rw_flags(), and p2mp_iow_flags().
void mbuf_dereference_instance | ( | struct mbuf_set * | ms, |
struct multi_instance * | mi | ||
) |
Definition at line 152 of file mbuf.c.
References mbuf_set::array, mbuf_item::buffer, mbuf_set::capacity, D_MBUF, mbuf_set::head, mbuf_item::instance, mbuf_set::len, mbuf_free_buf(), MBUF_INDEX, and msg.
Referenced by multi_close_instance().
Definition at line 111 of file mbuf.c.
References mbuf_set::array, mbuf_set::capacity, mbuf_set::head, mbuf_item::instance, mbuf_set::len, and MBUF_INDEX.
Referenced by mbuf_add_item(), multi_get_queue(), and multi_tcp_process_outgoing_link_ready().
void mbuf_free | ( | struct mbuf_set * | ms | ) |
Definition at line 49 of file mbuf.c.
References mbuf_set::array, mbuf_item::buffer, mbuf_set::capacity, mbuf_set::head, mbuf_set::len, mbuf_free_buf(), and MBUF_INDEX.
Referenced by multi_tcp_instance_specific_free(), and multi_uninit().
void mbuf_free_buf | ( | struct mbuf_buffer * | mb | ) |
Definition at line 76 of file mbuf.c.
References mbuf_buffer::buf, free_buf(), and mbuf_buffer::refcount.
Referenced by mbuf_add_item(), mbuf_dereference_instance(), mbuf_free(), multi_bcast(), multi_get_queue(), multi_tcp_process_outgoing_link(), multi_tcp_process_outgoing_link_ready(), and multi_unicast().
struct mbuf_set* mbuf_init | ( | unsigned int | size | ) |
Definition at line 39 of file mbuf.c.
References adjust_power_of_2(), ALLOC_ARRAY, ALLOC_OBJ_CLEAR, mbuf_set::array, and mbuf_set::capacity.
Referenced by multi_init(), and multi_tcp_instance_specific_init().
|
inlinestatic |
Definition at line 86 of file mbuf.h.
References mbuf_set::len.
Referenced by multi_output_queue_ready().
|
inlinestatic |
Definition at line 92 of file mbuf.h.
References mbuf_set::max_queued.
Referenced by multi_print_status().
|
inlinestatic |
Definition at line 100 of file mbuf.h.
References mbuf_defined(), and mbuf_peek_dowork().
Referenced by multi_tcp_process_io().
struct multi_instance* mbuf_peek_dowork | ( | struct mbuf_set * | ms | ) |
Definition at line 132 of file mbuf.c.
References mbuf_set::array, mbuf_set::capacity, mbuf_set::head, mbuf_item::instance, mbuf_set::len, and MBUF_INDEX.
Referenced by mbuf_peek().