OpenVPN
|
#include "syshead.h"
#include "crypto.h"
#include "misc.h"
#include "fragment.h"
#include "integer.h"
#include "memdbg.h"
Go to the source code of this file.
Macros | |
#define | FRAG_ERR(s) { errmsg = s; goto error; } |
Functions | |
static void | fragment_list_buf_init (struct fragment_list *list, const struct frame *frame) |
static void | fragment_list_buf_free (struct fragment_list *list) |
static struct fragment * | fragment_list_get_buf (struct fragment_list *list, int seq_id) |
struct fragment_master * | fragment_init (struct frame *frame) |
Allocate and initialize a fragment_master structure. More... | |
void | fragment_free (struct fragment_master *f) |
Free a fragment_master structure and its internal packet buffers. More... | |
void | fragment_frame_init (struct fragment_master *f, const struct frame *frame) |
Allocate internal packet buffers for a fragment_master structure. More... | |
void | fragment_incoming (struct fragment_master *f, struct buffer *buf, const struct frame *frame) |
Process an incoming packet, which may or may not be fragmented. More... | |
static void | fragment_prepend_flags (struct buffer *buf, int type, int seq_id, int frag_id, int frag_size) |
static int | optimal_fragment_size (int len, int max_frag_size) |
void | fragment_outgoing (struct fragment_master *f, struct buffer *buf, const struct frame *frame) |
Process an outgoing packet, which may or may not need to be fragmented. More... | |
bool | fragment_ready_to_send (struct fragment_master *f, struct buffer *buf, const struct frame *frame) |
Check whether outgoing fragments are ready to be send, and if so make one available. More... | |
static void | fragment_ttl_reap (struct fragment_master *f) |
void | fragment_wakeup (struct fragment_master *f, struct frame *frame) |
#define FRAG_ERR | ( | s | ) | { errmsg = s; goto error; } |
Definition at line 38 of file fragment.c.
|
static |
Definition at line 51 of file fragment.c.
References fragment::buf, fragment_list::fragments, free_buf(), and N_FRAG_BUF.
Referenced by fragment_free().
|
static |
Definition at line 41 of file fragment.c.
References alloc_buf(), fragment::buf, BUF_SIZE, fragment_list::fragments, and N_FRAG_BUF.
Referenced by fragment_frame_init().
|
static |
Definition at line 65 of file fragment.c.
References fragment::defined, fragment_list::fragments, fragment_list::index, modulo_add(), modulo_subtract(), N_FRAG_BUF, N_SEQ_ID, and fragment_list::seq_id.
Referenced by fragment_incoming().
|
static |
Definition at line 261 of file fragment.c.
References ASSERT, fragment::buf, buf_write_prepend(), D_FRAG_DEBUG, dmsg, FRAG_ID_MASK, FRAG_ID_SHIFT, FRAG_SEQ_ID_MASK, FRAG_SEQ_ID_SHIFT, FRAG_SIZE_MASK, FRAG_SIZE_ROUND_SHIFT, FRAG_SIZE_SHIFT, FRAG_TYPE_MASK, FRAG_TYPE_SHIFT, FRAG_WHOLE, FRAG_YES_NOTLAST, fragment_header_format, hton_fragment_header_type, and buffer::len.
Referenced by fragment_outgoing(), and fragment_ready_to_send().
|
static |
Definition at line 413 of file fragment.c.
References D_FRAG_ERRORS, fragment::defined, http-client::f, FRAG_TTL_SEC, msg, N_FRAG_BUF, now, and fragment::timestamp.
Referenced by fragment_wakeup().
|
inlinestatic |
Definition at line 302 of file fragment.c.
References FRAG_SIZE_ROUND_MASK, fragment::max_frag_size, and min_int().
Referenced by fragment_outgoing().