OpenVPN
|
Go to the source code of this file.
Data Structures | |
struct | shaper |
Macros | |
#define | SHAPER_MIN 100 /* bytes per second */ |
#define | SHAPER_MAX 100000000 |
#define | SHAPER_MAX_TIMEOUT 10 /* seconds */ |
#define | SHAPER_USE_FP |
Functions | |
void | shaper_msg (struct shaper *s) |
void | shaper_reset_wakeup (struct shaper *s) |
bool | shaper_soonest_event (struct timeval *tv, int delay) |
static void | shaper_reset (struct shaper *s, int bytes_per_second) |
static void | shaper_init (struct shaper *s, int bytes_per_second) |
static int | shaper_current_bandwidth (struct shaper *s) |
static int | shaper_delay (struct shaper *s) |
static void | shaper_wrote_bytes (struct shaper *s, int nbytes) |
|
inlinestatic |
Definition at line 93 of file shaper.h.
References shaper::bytes_per_second.
|
inlinestatic |
Definition at line 103 of file shaper.h.
References ASSERT, D_SHAPER_DEBUG, dmsg, openvpn_gettimeofday(), SHAPER_MAX_TIMEOUT, tv_defined(), tv_subtract(), and shaper::wakeup.
Referenced by io_wait_dowork().
|
inlinestatic |
Definition at line 86 of file shaper.h.
References shaper_reset(), and shaper_reset_wakeup().
Referenced by do_init_traffic_shaper().
void shaper_msg | ( | struct shaper * | s | ) |
Definition at line 88 of file shaper.c.
References shaper::bytes_per_second, M_INFO, and msg.
Referenced by do_init_traffic_shaper().
|
inlinestatic |
Definition at line 74 of file shaper.h.
References shaper::bytes_per_second, constrain_int(), shaper::factor, SHAPER_MAX, and SHAPER_MIN.
Referenced by shaper_init().
void shaper_reset_wakeup | ( | struct shaper * | s | ) |
Definition at line 82 of file shaper.c.
References CLEAR, and shaper::wakeup.
Referenced by shaper_init().
bool shaper_soonest_event | ( | struct timeval * | tv, |
int | delay | ||
) |
Definition at line 37 of file shaper.c.
References D_SHAPER_DEBUG, and dmsg.
Referenced by io_wait_dowork().
|
inlinestatic |
Definition at line 128 of file shaper.h.
References ASSERT, shaper::bytes_per_second, D_SHAPER_DEBUG, dmsg, shaper::factor, max_int(), min_int(), openvpn_gettimeofday(), SHAPER_MAX_TIMEOUT, tv_add(), and shaper::wakeup.
Referenced by process_outgoing_link().