#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <pthread.h>
#include <sys/time.h>
#include <time.h>
#include "tcpproxy.h"
#include "misc.h"
Go to the source code of this file.
Functions | |
void | eprintf (const char *template,...) |
void * | xmalloc (size_t size) |
void | xfree (void *ptr) |
void | mutex_lock (char *caller, pthread_mutex_t *mut) |
void | mutex_unlock (char *caller, pthread_mutex_t *mut) |
long | get_uclock () |
long | get_mclock () |
void | safe_exit (int val) |
unsigned | ceil_div (unsigned a, unsigned b) |
|
|
|
|
|
Definition at line 105 of file misc.c. Referenced by add_tcp_sent(), add_timer(), clear_timer(), and tcp_timer(). |
|
|
|
Definition at line 65 of file misc.c. References EPRINT, EXIT_ERR_MUTEX, and safe_exit(). Referenced by add_timer(), alloc_tcp_queue(), clear_timer(), close_tcp_queue(), handle_tcp(), left_timer(), mh_ack_rcvd(), packet_timeout(), queue_packet(), reset_tcp_queue(), scheduler(), tcp_timeout(), and tcp_timer(). |
|
Definition at line 79 of file misc.c. References EPRINT, EXIT_ERR_MUTEX, and safe_exit(). Referenced by add_timer(), alloc_tcp_queue(), clear_timer(), close_tcp_queue(), handle_tcp(), left_timer(), mh_ack_rcvd(), packet_timeout(), queue_packet(), reset_tcp_queue(), scheduler(), tcp_timeout(), and tcp_timer(). |
|
Definition at line 119 of file misc.c. References main_thread, and request_exit. Referenced by init_sched(), mutex_lock(), mutex_unlock(), xfree(), and xmalloc(). |
|
Definition at line 49 of file misc.c. References EPRINT, EXIT_ERR_MEM_FREE, and safe_exit(). Referenced by cleanup_sched(), cleanup_timer(), clear_tcp_queue(), clear_timer(), dealloc_packet_data(), mh_ack_rcvd(), packet_timeout(), send_tcp_rst(), and tcp_timer(). |
|
Definition at line 32 of file misc.c. References EPRINT, EXIT_ERR_MEM_ALLOC, and safe_exit(). Referenced by add_tcp_sent(), add_timer(), alloc_packet_data(), init_sched(), and send_tcp_rst(). |