#include <stdio.h>
#include <pthread.h>
#include <assert.h>
#include <semaphore.h>
#include "misc.h"
#include "tcpproxy.h"
#include "tcp.h"
#include "tcptimer.h"
Go to the source code of this file.
Typedefs | |
typedef timerq_event | Ttimerq_event |
Functions | |
void | init_timer () |
void | cleanup_timer () |
long | clear_timer (void(*func)(void *), void *arg) |
void | clear_tcp_timers (void *arg) |
long | left_timer (void(*func)(void *), void *arg) |
int | add_timer (long mdelay, void(*func)(void *), void *arg) |
void | tcp_timer (void *sig_mask) |
Variables | |
static const struct timespec | tick = { TIMER_MTICK/1000, 1000000*TIMER_MTICK } |
static pthread_mutex_t | timerq_mut = PTHREAD_MUTEX_INITIALIZER |
static Ttimerq_event * | timerq_head = NULL |
|
|
|
Definition at line 137 of file tcptimer.c. References timerq_event::arg, clear_timer(), timerq_event::func, get_mclock(), mutex_lock(), mutex_unlock(), timerq_event::next, timerq_event::time_left, timerq_event::time_queued, timerq_mut, and xmalloc(). Referenced by add_tcp_sent(), tcps_close_wait(), tcps_closing(), tcps_fin_wait1(), tcps_fin_wait2(), and tcps_new(). |
|
Definition at line 41 of file tcptimer.c. References DPRINT, timerq_event::next, and xfree(). Referenced by main(). |
|
Definition at line 102 of file tcptimer.c. References clear_timer(), and tcp_timeout(). |
|
Definition at line 65 of file tcptimer.c. References timerq_event::arg, timerq_event::func, get_mclock(), mutex_lock(), mutex_unlock(), timerq_event::next, timerq_event::time_left, timerq_event::time_queued, timerq_mut, and xfree(). Referenced by add_timer(), clear_tcp_queue(), clear_tcp_timers(), handle_tcp(), mh_ack_rcvd(), and tcps_syn_sent(). |
|
Definition at line 32 of file tcptimer.c. Referenced by main(). |
|
Definition at line 113 of file tcptimer.c. References timerq_event::arg, DPRINT, timerq_event::func, mutex_lock(), mutex_unlock(), timerq_event::next, timerq_event::time_left, and timerq_mut. |
|
Definition at line 191 of file tcptimer.c. References DPRINT, EPRINT, timerq_event::func, get_mclock(), mutex_lock(), mutex_unlock(), timerq_event::next, request_exit, timerq_event::time_left, timerq_mut, and xfree(). Referenced by main(). |
|
Definition at line 24 of file tcptimer.c. |
|
Definition at line 26 of file tcptimer.c. |
|
Definition at line 25 of file tcptimer.c. Referenced by add_timer(), clear_timer(), left_timer(), and tcp_timer(). |