FACT++  1.0
dic.c File Reference
#include <dim.h>
#include <dic.h>
+ Include dependency graph for dic.c:

Go to the source code of this file.

Classes

struct  bad_conn
 
struct  CMNDCB_ITEM
 

Macros

#define DIMLIB
 
#define BAD_CONN_TIMEOUT   2
 

Typedefs

typedef struct bad_conn DIC_BAD_CONNECTION
 

Functions

 _DIM_PROTO (unsigned request_service,(char *service_name, int req_type, int req_timeout, void *service_address, int service_size, void(*usr_routine)(void *, void *, int *), dim_long tag, void *fill_addr, int fill_size, int stamped))
 
 _DIM_PROTO (int request_command,(char *service_name, void *service_address, int service_size, void(*usr_routine)(void *, int *), dim_long tag, int stamped))
 
 _DIM_PROTO (DIC_SERVICE *insert_service,(int type, int timeout, char *name, int *address, int size, void(*routine)(), dim_long tag, int *fill_addr, int fill_size, int pending, int stamped))
 
 _DIM_PROTO (void modify_service,(DIC_SERVICE *servp, int timeout, int *address, int size, void(*routine)(), dim_long tag, int *fill_addr, int fill_size, int stamped))
 
 _DIM_PROTO (DIC_SERVICE *locate_command,(char *serv_name))
 
 _DIM_PROTO (DIC_BAD_CONNECTION *locate_bad,(char *node, char *task, int port))
 
 _DIM_PROTO (void service_tmout,(int serv_id))
 
 _DIM_PROTO (static void request_dns_info,(int retry))
 
 _DIM_PROTO (static int handle_dns_info,(DNS_DIC_PACKET *))
 
 _DIM_PROTO (void close_dns_conn,(void))
 
 _DIM_PROTO (static void release_conn,(int conn_id))
 
 _DIM_PROTO (static void get_format_data,(int format, FORMAT_STR *format_data, char *def))
 
 _DIM_PROTO (static void execute_service,(DIS_PACKET *packet, DIC_SERVICE *servp, int size))
 
void print_packet (DIS_PACKET *packet)
 
void dic_set_debug_on ()
 
void dic_set_debug_off ()
 
void dic_no_threads ()
 
void dic_add_error_handler (void(*user_routine)())
 
static void error_handler (int conn_id, int severity, int errcode, char *reason)
 
static void recv_rout (int conn_id, DIS_PACKET *packet, int size, int status)
 
static void execute_service (DIS_PACKET *packet, DIC_SERVICE *servp, int size)
 
static void recv_dns_dic_rout (int conn_id, DNS_DIC_PACKET *packet, int size, int status)
 
void service_tmout (int serv_id)
 
unsigned dic_info_service (char *serv_name, int req_type, int req_timeout, void *serv_address, int serv_size, void(*usr_routine)(), dim_long tag, void *fill_addr, int fill_size)
 
unsigned dic_info_service_stamped (char *serv_name, int req_type, int req_timeout, void *serv_address, int serv_size, void(*usr_routine)(), dim_long tag, void *fill_addr, int fill_size)
 
unsigned request_service (char *serv_name, int req_type, int req_timeout, void *serv_address, int serv_size, void(*usr_routine)(), dim_long tag, void *fill_addr, int fill_size, int stamped)
 
int dic_cmnd_service (char *serv_name, void *serv_address, int serv_size)
 
int dic_cmnd_service_stamped (char *serv_name, void *serv_address, int serv_size)
 
int dic_cmnd_callback (char *serv_name, void *serv_address, int serv_size, void(*usr_routine)(), dim_long tag)
 
int dic_cmnd_callback_stamped (char *serv_name, void *serv_address, int serv_size, void(*usr_routine)(), dim_long tag)
 
int request_command (char *serv_name, void *serv_address, int serv_size, void(*usr_routine)(), dim_long tag, int stamped)
 
DIC_SERVICEinsert_service (int type, int timeout, char *name, int *address, int size, void(*routine)(), dim_long tag, int *fill_addr, int fill_size, int pending, int stamped)
 
void modify_service (DIC_SERVICE *servp, int timeout, int *address, int size, void(*routine)(), dim_long tag, int *fill_addr, int fill_size, int stamped)
 
void dic_change_address (unsigned serv_id, void *serv_address, int serv_size)
 
int dic_get_quality (unsigned serv_id)
 
char * dic_get_format (unsigned serv_id)
 
int dic_get_timestamp (unsigned serv_id, int *secs, int *milisecs)
 
void dic_release_service (unsigned service_id)
 
int release_service (DIC_SERVICE *servicep)
 
int locate_service (DIC_SERVICE *servp)
 
DIC_SERVICElocate_command (char *serv_name)
 
DIC_SERVICElocate_pending (char *serv_name)
 
DIC_BAD_CONNECTIONlocate_bad (char *node, char *task, int port)
 
static void request_dns_info (int id)
 
int request_dns_single_info (DIC_SERVICE *servp)
 
static int handle_dns_info (DNS_DIC_PACKET *packet)
 
void retry_bad_connection (DIC_BAD_CONNECTION *bad_connp)
 
void move_to_ok_service (DIC_SERVICE *servp, int conn_id)
 
void move_to_bad_service (DIC_SERVICE *servp, DIC_BAD_CONNECTION *bad_connp)
 
void move_to_cmnd_service (DIC_SERVICE *servp)
 
void move_to_notok_service (DIC_SERVICE *servp)
 
static void get_format_data (int format, FORMAT_STR *format_data, char *def)
 
int end_command (DIC_SERVICE *servp, int ret)
 
int send_service_command (DIC_SERVICE *servp)
 
int send_service (int conn_id, DIC_SERVICE *servp)
 
void do_cmnd_callback (CMNDCB_ITEM *itemp)
 
int send_command (int conn_id, DIC_SERVICE *servp)
 
int find_connection (char *node, char *task, int port)
 
int dic_get_id (char *name)
 
static void release_conn (int conn_id)
 
void dic_close_dns ()
 
char * dic_get_error_services ()
 
char * dic_get_server_services (int conn_id)
 
int dic_get_conn_id ()
 
int dic_get_server (char *name)
 
int dic_get_server_pid (int *pid)
 
void dic_stop ()
 
int dic_find_server_conns ()
 

Variables

static DIC_SERVICEService_pend_head = 0
 
static DIC_SERVICECmnd_head = 0
 
static DIC_SERVICECurrent_server = 0
 
static DIC_BAD_CONNECTIONBad_connection_head = 0
 
static int Dic_timer_q = 0
 
static int Dns_dic_conn_id = 0
 
static TIMR_ENTDns_dic_timr = NULL
 
static int Tmout_max = 0
 
static int Tmout_min = 0
 
static int Threads_off = 0
 
static void(* Error_user_routine )()=0
 
static int Error_conn_id = 0
 
static int Curr_conn_id = 0
 
static int Debug_on = 0