Main Page | Class List | File List | Class Members | File Members

tcpproxy.h File Reference

#include "libipq.h"
#include <signal.h>

Go to the source code of this file.

Defines

#define _REENTRANT
#define MALLOC_CHECK_   2
#define DEBUG   1
#define TCP_MAX_CONN   256

Typedefs

typedef enum packet_dir Tpacket_dir
typedef packet_data Tpacket_data

Enumerations

enum  {
  EXIT_ERR_USAGE = 1, EXIT_ERR_BAD_MOBILE_IP, EXIT_ERR_IPQ_CREATE_HANDLE, EXIT_ERR_IPQ_SET_MODE,
  EXIT_ERR_IPQ_READ, EXIT_ERR_IPQ_MESSAGE_TYPE, EXIT_ERR_IPQ_ERR_MESSAGE, EXIT_ERR_MEM_ALLOC,
  EXIT_ERR_MEM_FREE, EXIT_ERR_IPQ_DESTROY_HANDLE, EXIT_ERR_WRONG_IP_VER, EXIT_ERR_CREATE_THREAD,
  EXIT_ERR_PTHREAD_ATTR, EXIT_ERR_SIG_MASK, EXIT_ERR_SET_SIG_HANDLER, EXIT_ERR_QUEUE_EMPTY,
  EXIT_ERR_QUEUE_FULL, EXIT_ERR_QUEUE_TYPE, EXIT_ERR_SEM_INIT, EXIT_ERR_MUTEX,
  EXIT_ERR_SOCKET
}
enum  packet_dir { PACKET_DIR_IN = 1, PACKET_DIR_OUT }

Functions

Tpacket_dataalloc_packet_data (ipq_packet_msg_t *p)
void dealloc_packet_data (Tpacket_data *pd)

Variables

volatile sig_atomic_t request_exit
pthread_t main_thread


Define Documentation

#define _REENTRANT
 

Definition at line 8 of file tcpproxy.h.

#define DEBUG   1
 

Definition at line 14 of file tcpproxy.h.

Referenced by clear_tcp_queue(), handle_packet(), and queue_packet().

#define MALLOC_CHECK_   2
 

Definition at line 9 of file tcpproxy.h.

#define TCP_MAX_CONN   256
 

Definition at line 16 of file tcpproxy.h.

Referenced by alloc_tcp_cb(), handle_tcp(), and init_tcp().


Typedef Documentation

typedef struct packet_data Tpacket_data
 

typedef enum packet_dir Tpacket_dir
 


Enumeration Type Documentation

anonymous enum
 

Enumeration values:
EXIT_ERR_USAGE 
EXIT_ERR_BAD_MOBILE_IP 
EXIT_ERR_IPQ_CREATE_HANDLE 
EXIT_ERR_IPQ_SET_MODE 
EXIT_ERR_IPQ_READ 
EXIT_ERR_IPQ_MESSAGE_TYPE 
EXIT_ERR_IPQ_ERR_MESSAGE 
EXIT_ERR_MEM_ALLOC 
EXIT_ERR_MEM_FREE 
EXIT_ERR_IPQ_DESTROY_HANDLE 
EXIT_ERR_WRONG_IP_VER 
EXIT_ERR_CREATE_THREAD 
EXIT_ERR_PTHREAD_ATTR 
EXIT_ERR_SIG_MASK 
EXIT_ERR_SET_SIG_HANDLER 
EXIT_ERR_QUEUE_EMPTY 
EXIT_ERR_QUEUE_FULL 
EXIT_ERR_QUEUE_TYPE 
EXIT_ERR_SEM_INIT 
EXIT_ERR_MUTEX 
EXIT_ERR_SOCKET 

Definition at line 22 of file tcpproxy.h.

enum packet_dir
 

Enumeration values:
PACKET_DIR_IN 
PACKET_DIR_OUT 

Definition at line 46 of file tcpproxy.h.


Function Documentation

Tpacket_data* alloc_packet_data ipq_packet_msg_t *  p  )  [inline]
 

Definition at line 42 of file tcpproxy.c.

References packet_data::ip, packet_data::ipq_pm, packet_data::payload, packet_data::trans, and xmalloc().

Referenced by handle_packet().

void dealloc_packet_data Tpacket_data pd  )  [inline]
 

Definition at line 61 of file tcpproxy.c.

References packet_data::payload, and xfree().

Referenced by clear_tcp_queue(), handle_packet(), handle_tcp(), queue_packet(), and send_packet().


Variable Documentation

pthread_t main_thread
 

Definition at line 36 of file tcpproxy.c.

Referenced by main(), and safe_exit().

volatile sig_atomic_t request_exit
 

Definition at line 35 of file tcpproxy.c.

Referenced by cleanup(), main(), safe_exit(), scheduler(), signal_handler(), and tcp_timer().


Generated on Sun May 14 13:36:53 2006 by  doxygen 1.4.2