types.hpp File Reference

#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include <cstdio>
#include <event.h>
#include <time.h>
#include <list>

Go to the source code of this file.

Classes

struct  config_entry
struct  buf_el
 Buffer used to store information to send. More...
struct  t_uid
 Main structure used to identify user or destination. More...
struct  t_traffic
 information about user / destination traffic More...
struct  client_s
 Structure to store network information. More...
class  proxy_server
 Information about local proxy server. More...
struct  thread_s
 Thread structure. More...

Defines

#define debug(...)   ;
#define MAX_CLIENT_RECV   4024
#define MAX_LIMIT_SERVER_RECV   4024
#define RECV_THREAD_AMOUNT   1
#define t_int   int
#define t_traffic_int   long long
#define QUARTER   900
#define HOUR   3600
#define DAY   86400
#define MONTH   2592000

Typedefs

typedef client_s client_t

Enumerations

enum  AUTH_STATE { AUTH_STATE_UNKNOWN = 0, AUTH_STATE_BANNED = 1, AUTH_STATE_IGNORE_BANNED = 2 }
enum  CONFIG_ENTRY_CHECK_MODE { CHECK_TRAFFIC = 1, CHECK_HOSTING = 2, CHECK_BOTH = 3 }
enum  conn_state { opened, closed }

Functions

void reload_config ()
 Reloads configuration. Called if SIGUSR1 was received. Will call parse_config(rules_file) to fetch new configuration, then
.

Variables

int curr_month
bool pending_reload


Define Documentation

#define DAY   86400

number of seconds in day

#define debug ( ...   )     ;

Special macro to print information to stderr when in debugging mode

#define HOUR   3600

number of seconds in hour

#define MAX_CLIENT_RECV   4024

#define MAX_LIMIT_SERVER_RECV   4024

#define MONTH   2592000

number of seconds in month

#define QUARTER   900

number of seconds in 15min

#define RECV_THREAD_AMOUNT   1

#define t_int   int

#define t_traffic_int   long long

type of traffic information


Typedef Documentation

typedef client_s client_t


Enumeration Type Documentation

enum AUTH_STATE

Enumerator:
AUTH_STATE_UNKNOWN 
AUTH_STATE_BANNED 
AUTH_STATE_IGNORE_BANNED 

Enumerator:
CHECK_TRAFFIC 
CHECK_HOSTING 
CHECK_BOTH 

enum conn_state

Enumerator:
opened 
closed 


Function Documentation

void reload_config (  ) 

Reloads configuration. Called if SIGUSR1 was received. Will call parse_config(rules_file) to fetch new configuration, then
.

  • for new entries, will call insert_to_config()
  • for deleted entires, will call destructors
  • for other, will override old configuration


Variable Documentation

Variable identifying current month (1-12)


Generated on Thu Oct 22 16:30:59 2009 for Main server by  doxygen 1.5.6