11 static void ast_conn_h(
int handle,
int svr_conn_id,
int protocol)
14 register int tcpip_code;
152 register int tcpip_code, read_size;
165 (
int *) realloc(dna_connp->
buffer, (
size_t)
size);
166 memset(dna_connp->
buffer, 0, (
size_t)size);
171 read_size = (size > max_io_data) ? max_io_data :
size ;
194 sscanf(ports,
"%d",&port);
199 int web_open_server(
char *task,
void (*read_ast)(),
int *protocol,
int *port,
void (*error_ast)())
202 register int tcpip_code;
203 register int conn_id;
215 *protocol = PROTOCOL;
282 unsigned char ipaddr_buff[4];
283 unsigned char *ipaddr = ipaddr_buff;
284 struct hostent *host;
289 sscanf(node,
"%d.%d.%d.%d",&a, &b, &c, &d);
290 ipaddr[0] = (
unsigned char)a;
291 ipaddr[1] = (
unsigned char)b;
292 ipaddr[2] = (
unsigned char)c;
293 ipaddr[3] = (
unsigned char)d;
294 if( (host = gethostbyaddr(ipaddr,
sizeof(ipaddr), AF_INET)) == (
struct hostent *)0 )
300 strcpy(name,host->h_name);
int web_open_server(char *task, void(*read_ast)(), int *protocol, int *port, void(*error_ast)())
int tcpip_start_listen(int conn_id, void(*ast_routine)())
void web_write(int conn_id, char *buffer, int size)
static void ast_conn_h(int handle, int svr_conn_id, int protocol)
int Tcpip_max_io_data_read
static void read_data(int conn_id)
int dna_open_client(char *server_node, char *server_task, int port, int server_protocol, void(*read_ast)(), void(*error_ast)(), SRC_TYPES src_type)
dim_get_env_var("EXTRA_DNS_NODE", extra_dns, sizeof(extra_dns))
int dna_close(int conn_id)
void conn_free(int conn_id)
int web_close(int conn_id)
int Tcpip_max_io_data_write
int tcpip_start_read(int conn_id, char *buffer, int size, void(*ast_routine)())
int tcpip_close(int conn_id)
void dna_report_error(int conn_id, int code, char *routine_name, int severity, int errcode)
int tcpip_write(int conn_id, char *buffer, int size)
DllExp DIM_NOSHARE DNA_CONNECTION * Dna_conns
int web_get_node_name(char *node, char *name)
int web_start_read(int conn_id, int size)
int tcpip_open_server(int conn_id, char *task, int *port)
int dna_start_read(int conn_id, int size)
static void ast_read_h(int conn_id, int status, int size)
static void release_conn(int conn_id)
int tcpip_failure(int code)
int tcpip_open_connection(int conn_id, int path)