FACT++  1.0
dis_old.c File Reference
#include <time.h>
#include <sys/timeb.h>
#include <dim.h>
#include <dis.h>
+ Include dependency graph for dis_old.c:

Go to the source code of this file.

Classes

struct  dis_dns_ent
 
struct  req_ent
 
struct  serv
 
struct  reqp_ent
 
struct  cli_ent
 
struct  exit_ent
 
struct  cmnds
 

Macros

#define DIMLIB
 
#define ALL   0
 
#define MORE   1
 
#define NONE   2
 
#define MAX_HASH_ENTRIES   5000
 

Typedefs

typedef struct dis_dns_ent DIS_DNS_CONN
 
typedef struct req_ent REQUEST
 
typedef struct serv SERVICE
 
typedef struct reqp_ent REQUEST_PTR
 
typedef struct cli_ent CLIENT
 
typedef struct exit_ent EXIT_H
 
typedef struct cmnds DIS_CMND
 

Functions

 _DIM_PROTO (static void dis_insert_request,(int conn_id, DIC_PACKET *dic_packet, int size, int status))
 
 _DIM_PROTO (int execute_service,(int req_id))
 
 _DIM_PROTO (void execute_command,(SERVICE *servp, DIC_PACKET *packet))
 
 _DIM_PROTO (void register_dns_services,(int flag))
 
 _DIM_PROTO (void register_services,(DIS_DNS_CONN *dnsp, int flag, int dns_flag))
 
 _DIM_PROTO (void std_cmnd_handler,(long *tag, int *cmnd_buff, int *size))
 
 _DIM_PROTO (void client_info,(long *tag, int **bufp, int *size))
 
 _DIM_PROTO (void add_exit_handler,(int *tag, int *bufp, int *size))
 
 _DIM_PROTO (static void exit_handler,(int *tag, int *bufp, int *size))
 
 _DIM_PROTO (static void error_handler,(int conn_id, int severity, int errcode, char *reason))
 
 _DIM_PROTO (SERVICE *find_service,(char *name))
 
 _DIM_PROTO (CLIENT *find_client,(int conn_id))
 
 _DIM_PROTO (static int get_format_data,(FORMAT_STR *format_data, char *def))
 
 _DIM_PROTO (static int release_conn,(int conn_id, int print_flag, int dns_flag))
 
 _DIM_PROTO (SERVICE *dis_hash_service_get_next,(int *start, SERVICE *prev, int flag))
 
 _DIM_PROTO (static unsigned do_dis_add_service_dns,(char *name, char *type, void *address, int size, void(*user_routine)(), long tag, long dnsid))
 
 _DIM_PROTO (static DIS_DNS_CONN *create_dns,(long dnsid))
 
void dis_set_debug_on ()
 
void dis_set_debug_off ()
 
void dis_no_threads ()
 
int dis_set_buffer_size (int size)
 
static int check_service_name (char *name)
 
static void dis_init ()
 
static unsigned do_dis_add_service_dns (char *name, char *type, void *address, int size, void(*user_routine)(), long tag, long dnsid)
 
static unsigned do_dis_add_service (char *name, char *type, void *address, int size, void(*user_routine)(), long tag)
 
unsigned dis_add_service (char *name, char *type, void *address, int size, void(*user_routine)(), long tag)
 
unsigned dis_add_service_dns (long dnsid, char *name, char *type, void *address, int size, void(*user_routine)(), long tag)
 
static unsigned do_dis_add_cmnd_dns (char *name, char *type, void(*user_routine)(), long tag, long dnsid)
 
static unsigned do_dis_add_cmnd (char *name, char *type, void(*user_routine)(), long tag)
 
unsigned dis_add_cmnd (char *name, char *type, void(*user_routine)(), long tag)
 
unsigned dis_add_cmnd_dns (long dnsid, char *name, char *type, void(*user_routine)(), long tag)
 
void dis_add_client_exit_handler (void(*user_routine)())
 
void dis_add_exit_handler (void(*user_routine)())
 
void dis_add_error_handler (void(*user_routine)())
 
static int get_format_data (FORMAT_STR *format_data, char *def)
 
void recv_dns_dis_rout (int conn_id, DNS_DIS_PACKET *packet, int size, int status)
 
int send_dns_update_packet (DIS_DNS_CONN *dnsp)
 
void do_register_services (DIS_DNS_CONN *dnsp)
 
void register_services (DIS_DNS_CONN *dnsp, int flag, int dns_flag)
 
void unregister_service (DIS_DNS_CONN *dnsp, SERVICE *servp)
 
void do_update_service_list (DIS_DNS_CONN *dnsp)
 
int dis_start_serving (char *task)
 
static DIS_DNS_CONNcreate_dns (long dnsid)
 
void dis_dns_init ()
 
int dis_start_serving_dns (long dnsid, char *task)
 
static void dis_insert_request (int conn_id, DIC_PACKET *dic_packet, int size, int status)
 
int execute_service (int req_id)
 
void remove_service (int req_id)
 
void execute_command (SERVICE *servp, DIC_PACKET *packet)
 
void dis_report_service (char *serv_name)
 
int dis_update_service (unsigned service_id)
 
int dis_selective_update_service (unsigned service_id, int *client_ids)
 
int check_client (REQUEST *reqp, int *client_ids)
 
int do_update_service (unsigned service_id, int *client_ids)
 
int dis_get_n_clients (unsigned service_id)
 
int dis_get_timeout (unsigned service_id, int client_id)
 
void dis_set_quality (unsigned serv_id, int quality)
 
int dis_set_timestamp (unsigned serv_id, int secs, int millisecs)
 
int dis_get_timestamp (unsigned serv_id, int *secs, int *millisecs)
 
void dis_send_service (unsigned service_id, int *buffer, int size)
 
int dis_remove_service (unsigned service_id)
 
void do_dis_stop_serving_dns (DIS_DNS_CONN *dnsp)
 
void dis_stop_serving_dns (long dnsid)
 
void dis_stop_serving ()
 
SERVICEfind_service (char *name)
 
CLIENTfind_client (int conn_id)
 
void release_all_requests (int conn_id, CLIENT *clip)
 
CLIENTcheck_delay_delete (int conn_id)
 
char * dis_get_error_services ()
 
char * dis_get_client_services (int conn_id)
 
int find_release_request (int conn_id, int service_id)
 
int release_request (REQUEST *reqp, REQUEST_PTR *reqpp, int remove)
 
static int release_conn (int conn_id, int print_flg, int dns_flag)
 
void std_cmnd_handler (long *tag, int *cmnd_buff, int *size)
 
int dis_get_next_cmnd (long *tag, int *buffer, int *size)
 
int dis_get_conn_id ()
 
int dis_get_client (char *name)
 
void client_info (long *tag, int **bufp, int *size, int *first_time)
 
void append_service (char *service_info_buffer, SERVICE *servp)
 
void service_info (long *tag, int **bufp, int *size, int *first_time)
 
void add_exit_handler (int *tag, int *bufp, int *size)
 
void dis_set_client_exit_handler (int conn_id, int tag)
 
int do_exit_handler (int conn_id)
 
static void exit_handler (int *tag, int *bufp, int *size)
 
static void error_handler (int conn_id, int severity, int errcode, char *reason)
 
int dis_hash_service_init ()
 
int dis_hash_service_insert (SERVICE *servp)
 
int dis_hash_service_registered (int index, SERVICE *servp)
 
int dis_hash_service_remove (SERVICE *servp)
 
SERVICEdis_hash_service_exists (char *name)
 
SERVICEdis_hash_service_get_next (int *curr_index, SERVICE *prevp, int new_entries)
 
DIS_DNS_CONNdis_find_dns (long dnsid)
 
int dis_no_dns ()
 
DIS_DNS_CONNfind_dns_by_conn_id (int conn_id)
 
void dis_print_hash_table ()
 
void dis_hash_print ()
 

Variables

static CLIENTClient_head = (CLIENT *)0
 
static DIS_DNS_CONNDNS_head = (DIS_DNS_CONN *)0
 
static int Dis_first_time = 1
 
static int Protocol
 
static int Port_number
 
static int Dis_conn_id = 0
 
static int Curr_conn_id = 0
 
static int Serving = 0
 
static void(* Client_exit_user_routine )()=0
 
static void(* Exit_user_routine )()=0
 
static void(* Error_user_routine )()=0
 
static int Error_conn_id = 0
 
DIS_DNS_CONNDefault_DNS = 0
 
static EXIT_HExit_h_head = (EXIT_H *)0
 
static int Version_number = DIM_VERSION_NUMBER
 
static int Dis_timer_q = 0
 
static int Threads_off = 0
 
static int Last_client
 
static int Debug_on = 0
 
static DIS_STAMPED_PACKETDis_packet = 0
 
static int Dis_packet_size = 0
 
static DIS_CMNDCmnds_head = (DIS_CMND *)0
 
static SERVICEService_hash_table [MAX_HASH_ENTRIES]
 
static int Service_new_entries [MAX_HASH_ENTRIES]