FACT++  1.0
dim.h
Go to the documentation of this file.
1 #ifndef __DIMDEFS
2 #define __DIMDEFS
3 /*
4  * DNA (Delphi Network Access) implements the network layer for the DIM
5  * (Delphi Information Managment) System.
6  *
7  * Started : 10-11-91
8  * Last modification : 03-08-94
9  * Written by : C. Gaspar
10  * Adjusted by : G.C. Ballintijn
11  *
12  */
13 
14 #include "dim_common.h"
15 
16 #define DIM_VERSION_NUMBER 2015
17 
18 
19 #define MY_LITTLE_ENDIAN 0x1
20 #define MY_BIG_ENDIAN 0x2
21 
22 #define VAX_FLOAT 0x10
23 #define IEEE_FLOAT 0x20
24 #define AXP_FLOAT 0x30
25 
26 #define MY_OS9 0x100
27 #define IT_IS_FLOAT 0x1000
28 
29 #ifdef VMS
30 #include <ssdef.h>
31 #include <stdio.h>
32 #include <stdlib.h>
33 #include <string.h>
34 #include <starlet.h>
35 #include <time.h>
36 #define DIM_NOSHARE noshare
37 #define RE_ENABLE_AST long int ast_enable = sys$setast(1);
38 #define RE_DISABLE_AST if (ast_enable != SS$_WASSET) sys$setast(0);
39 #define vtohl(l) (l)
40 #define htovl(l) (l)
41 #ifdef __alpha
42 #define MY_FORMAT MY_LITTLE_ENDIAN+AXP_FLOAT
43 #else
44 #define MY_FORMAT MY_LITTLE_ENDIAN+VAX_FLOAT
45 #endif
46 #endif
47 
48 #ifdef __unix__
49 #include <unistd.h>
50 #include <sys/time.h>
51 #include <sys/types.h>
52 #include <netinet/in.h>
53 #include <stdio.h>
54 #include <stdlib.h>
55 #include <string.h>
56 #include <signal.h>
57 #ifdef VxWorks
58 #include <sigLib.h>
59 #endif
60 #define DIM_NOSHARE
61 #define RE_ENABLE_AST sigset_t set, oset;sigemptyset(&set);sigaddset(&set,SIGIO);sigaddset(&set,SIGALRM);sigprocmask(SIG_UNBLOCK,&set,&oset);
62 #define RE_DISABLE_AST sigprocmask(SIG_SETMASK,&oset,0);
63 #ifdef MIPSEL
64 #define vtohl(l) (l)
65 #define htovl(l) (l)
66 #define MY_FORMAT MY_LITTLE_ENDIAN+IEEE_FLOAT
67 #endif
68 #ifdef MIPSEB
69 #define vtohl(l) _swapl(l)
70 #define htovl(l) _swapl(l)
71 #define vtohs(s) _swaps(s)
72 #define htovs(s) _swaps(s)
73 #define MY_FORMAT MY_BIG_ENDIAN+IEEE_FLOAT
74 #endif
75 _DIM_PROTO( int _swapl, (int l) );
76 _DIM_PROTO( short _swaps, (short s) );
77 
78 #endif
79 
80 #ifdef WIN32
81 #include <windows.h>
82 #include <process.h>
83 #include <io.h>
84 #include <fcntl.h>
85 #include <Winsock.h>
86 #include <stddef.h>
87 #include <stdlib.h>
88 #include <stdio.h>
89 #define DIM_NOSHARE
90 #define RE_ENABLE_AST
91 #define RE_DISABLE_AST
92 #ifdef MIPSEL
93 #define vtohl(l) (l)
94 #define htovl(l) (l)
95 #define MY_FORMAT MY_LITTLE_ENDIAN+IEEE_FLOAT
96 #endif
97 #ifdef MIPSEB
98 #define vtohl(l) _swapl(l)
99 #define htovl(l) _swapl(l)
100 #define vtohs(s) _swaps(s)
101 #define htovs(s) _swaps(s)
102 #define MY_FORMAT MY_BIG_ENDIAN+IEEE_FLOAT
103 #endif
104 _DIM_PROTO( int _swapl, (int l) );
105 _DIM_PROTO( short _swaps, (short s) );
106 #endif
107 
108 #ifdef OSK
109 #include <types.h>
110 #ifndef _UCC
111 #include <machine/types.h>
112 #else
113 #define register
114 #endif
115 #include <inet/in.h>
116 #include <time.h>
117 #include <stdio.h>
118 #include <string.h>
119 #define DIM_NOSHARE
120 #define RE_ENABLE_AST sigmask(DEC_LEVEL);
121 #define RE_DISABLE_AST sigmask(INC_LEVEL);
122 #define vtohl(l) _swapl(l)
123 #define htovl(l) _swapl(l)
124 #define vtohs(s) _swaps(s)
125 #define htovs(s) _swaps(s)
126 #define MY_FORMAT MY_BIG_ENDIAN+IEEE_FLOAT+MY_OS9
127 typedef unsigned short ushort;
128 _DIM_PROTO( char *getenv, (char *name) );
129 _DIM_PROTO( void *malloc, (unsigned size) );
130 _DIM_PROTO( void *realloc, (void *ptr, unsigned size) );
131 _DIM_PROTO( int _swapl, (int l) );
132 _DIM_PROTO( short _swaps, (short s) );
133 #endif
134 
135 #define TRUE 1
136 #define FALSE 0
137 
138 #define DNS_TASK "DIM_DNS"
139 #define DNS_PORT 2505 /* Name server port */
140 #define SEEK_PORT 0 /* server should seek a port */
141 
142 #define MIN_BIOCNT 50
143 #ifdef OSK
144 #define DIS_DNS_TMOUT_MIN 5
145 #define DIS_DNS_TMOUT_MAX 10
146 #define DIC_DNS_TMOUT_MIN 5
147 #define DIC_DNS_TMOUT_MAX 10
148 #define MAX_SERVICE_UNIT 32
149 #define MAX_REGISTRATION_UNIT 100
150 #define CONN_BLOCK 32
151 #define MAX_CONNS 32
152 #define ID_BLOCK 64
153 #define TCP_RCV_BUF_SIZE 4096
154 #define TCP_SND_BUF_SIZE 4096
155 #else
156 #define DIS_DNS_TMOUT_MIN 5
157 #define DIS_DNS_TMOUT_MAX 10
158 #define DIC_DNS_TMOUT_MIN 5
159 #define DIC_DNS_TMOUT_MAX 10
160 #define MAX_SERVICE_UNIT 100
161 #define MAX_REGISTRATION_UNIT 100
162 #define CONN_BLOCK 256
163 #define MAX_CONNS 1024
164 #define ID_BLOCK 512
165 #define TCP_RCV_BUF_SIZE /*16384*//*32768*/65536
166 #define TCP_SND_BUF_SIZE /*16384*//*32768*/65536
167 #endif
168 #define DID_DNS_TMOUT_MIN 5
169 #define DID_DNS_TMOUT_MAX 10
170 /*
171 #define WATCHDOG_TMOUT_MIN 120
172 #define WATCHDOG_TMOUT_MAX 180
173 */
174 #define WATCHDOG_TMOUT_MIN 60
175 #define WATCHDOG_TMOUT_MAX 90
176 /*
177 #define WATCHDOG_TMOUT_MIN 15
178 #define WATCHDOG_TMOUT_MAX 25
179 */
180 #define MAX_NODE_NAME 40
181 #define MAX_TASK_NAME 40
182 #define MAX_NAME 132
183 /*
184 #define MAX_CMND 16384
185 #define MAX_IO_DATA 65535
186 #define MAX_IO_DATA (TCP_SND_BUF_SIZE - 16)
187 */
190 typedef enum { RD_HDR, RD_DATA, RD_DUMMY } CONN_STATE;
191 typedef enum { NOSWAP, SWAPS, SWAPL, SWAPD} SWAP_TYPE;
192 
193 #define DECNET 0 /* Decnet as transport layer */
194 #define TCPIP 1 /* Tcpip as transport layer */
195 #define BOTH 2 /* Both protocols allowed */
196 
197 #define STA_DISC (-1) /* Connection lost */
198 #define STA_DATA 0 /* Data received */
199 #define STA_CONN 1 /* Connection made */
200 
201 #define START_PORT_RANGE 5100 /* Lowest port to use */
202 #define STOP_PORT_RANGE 10000 /* Highest port to use */
203 #define TEST_TIME_OSK 15 /* Interval to test conn. */
204 #define TEST_TIME_VMS 30 /* Interval to test conn. */
205 #define TEST_WRITE_TAG 25 /* DTQ tag for test writes */
206 #define WRITE_TMOUT 5 /* Interval to wait while writing. */
207 
208 #define OPN_MAGIC 0xc0dec0de /* Magic value 1st packet */
209 #define HDR_MAGIC 0xfeadfead /* Magic value in header */
210 #define LONG_HDR_MAGIC 0xfeadc0de /* Magic value in long header*/
211 #define TST_MAGIC 0x11131517 /* Magic value, test write */
212 #define TRP_MAGIC 0x71513111 /* Magic value, test reply */
213 
214 /* String Format */
215 
216 typedef struct{
217  int par_num;
218  short par_bytes;
219  short flags; /* bits 0-1 is type of swap, bit 4 id float conversion */
220 }FORMAT_STR;
221 
222 /* Packet sent by the client to the server inside DNA */
223 typedef struct{
224  int code;
226  char task[MAX_TASK_NAME];
227 } DNA_NET;
228 
229 /* Packet sent by the client to the server */
230 typedef struct{
231  int size;
232  char service_name[MAX_NAME];
234  int type;
235  int timeout;
236  int format;
237  int buffer[1];
238 } DIC_PACKET;
239 
240 #define DIC_HEADER (MAX_NAME + 20)
241 
242 /* Packets sent by the server to the client */
243 typedef struct{
244  int size;
246  int buffer[1];
247 } DIS_PACKET;
248 
249 #define DIS_HEADER 8
250 
251 typedef struct{
252  int size;
254  int time_stamp[2];
255  int quality;
256  int reserved[3];
257  int buffer[1];
259 
260 #define DIS_STAMPED_HEADER 32
261 
262 /* Packet sent by the server to the name_server */
263 typedef struct{
264  char service_name[MAX_NAME];
266  char service_def[MAX_NAME];
267 } SERVICE_REG;
268 
269 typedef struct{
270  int size;
272  char node_name[MAX_NODE_NAME];
273  char task_name[MAX_TASK_NAME-4];
274  char node_addr[4];
275  int pid;
276  int port;
277  int protocol;
278  int format;
282 
283 #define DIS_DNS_HEADER (MAX_NODE_NAME + MAX_TASK_NAME + 28)
284 
285 /* Packet sent by the name_server to the server */
286 typedef struct {
287  int size;
288  int type;
290 
291 #define DNS_DIS_HEADER 8
292 
293 /* Packet sent by the client to the name_server */
294 typedef struct{
295  char service_name[MAX_NAME];
297 } SERVICE_REQ;
298 
299 typedef struct{
300  int size;
304 
305 /* Packet sent by the name_server to the client */
306 typedef struct {
307  int size;
309  char service_def[MAX_NAME];
310  char node_name[MAX_NODE_NAME];
311  char task_name[MAX_TASK_NAME-4];
312  char node_addr[4];
313  int pid;
314  int port;
315  int protocol;
316  int format;
318 
319 #define DNS_DIC_HEADER (MAX_NODE_NAME + MAX_TASK_NAME + MAX_NAME + 24)
320 
321 typedef struct {
322  char name[MAX_NAME];
324  char task[MAX_TASK_NAME];
325  int type;
326  int status;
328 } DNS_SERV_INFO;
329 
330 typedef struct {
331  char name[MAX_NAME];
332  int type;
333  int status;
336 
337 typedef struct {
339  char task[MAX_TASK_NAME];
340  int pid;
343 
344 typedef struct {
346  DNS_SERVICE_INFO services[1];
347 } DNS_DID;
348 
349 typedef struct {
351  char task[MAX_TASK_NAME];
353 
354 typedef struct {
358 } DNA_HEADER;
359 
360 typedef struct {
364  int time_stamp[2];
365  int quality;
367 
368 /* Connection handling */
369 
370 typedef struct timer_entry{
371  struct timer_entry *next;
372  struct timer_entry *prev;
374  int time;
376  void (*user_routine)();
378 } TIMR_ENT;
379 
380 typedef struct {
381  int busy;
382  void (*read_ast)();
383  void (*error_ast)();
384  int *buffer;
386  char *curr_buffer;
389  int protocol;
390  CONN_STATE state;
391  int writing;
392  int saw_init;
394 
395 extern DllExp DIM_NOSHARE DNA_CONNECTION *Dna_conns;
396 
397 typedef struct {
398  int channel;
400  void (*read_rout)();
401  char *buffer;
402  int size;
403 /*
404  unsigned short *iosb_r;
405  unsigned short *iosb_w;
406 */
408  char task[MAX_TASK_NAME];
409  int port;
410  int reading;
411  int timeout;
414  time_t last_used;
416 
417 extern DllExp DIM_NOSHARE NET_CONNECTION *Net_conns;
418 
419 typedef struct {
420  char node_name[MAX_NODE_NAME];
421  char task_name[MAX_TASK_NAME];
422  int port;
423  int pid;
426 
427 extern DIM_NOSHARE DIC_CONNECTION *Dic_conns;
428 
429 typedef struct {
431  char node_name[MAX_NODE_NAME];
432  char task_name[MAX_TASK_NAME-4];
433  char node_addr[4];
434  int pid;
435  int port;
437  char *node_head;
438  int protocol;
439  int validity;
443  int already;
444  char long_task_name[MAX_NAME];
446 
447 extern DllExp DIM_NOSHARE DNS_CONNECTION *Dns_conns;
448 
449 extern DllExp DIM_NOSHARE int Curr_N_Conns;
450 
451 /* Client definitions needed by dim_jni.c (from H.Essel GSI) */
452 typedef enum {
456 
457 typedef struct dic_serv {
458  struct dic_serv *next;
459  struct dic_serv *prev;
461  int serv_id;
463  char def[MAX_NAME];
464  int format;
465  int type;
466  int timeout;
472  void (*user_routine)();
475  int conn_id;
476  PENDING_STATES pending;
478  int stamped;
479  int time_stamp[2];
480  int quality;
481  int tid;
482 } DIC_SERVICE;
483 
484 /* PROTOTYPES */
485 #ifdef __cplusplus
486 extern "C" {
487 #define __CXX_CONST const
488 #else
489 #define __CXX_CONST
490 #endif
491 
492 /* DNA */
493 _DIM_PROTOE( int dna_start_read, (int conn_id, int size) );
494 _DIM_PROTOE( void dna_test_write, (int conn_id) );
495 _DIM_PROTOE( int dna_write, (int conn_id, __CXX_CONST void *buffer, int size) );
496 _DIM_PROTOE( int dna_write_nowait, (int conn_id, __CXX_CONST void *buffer, int size) );
497 _DIM_PROTOE( int dna_open_server, (__CXX_CONST char *task, void (*read_ast)(), int *protocol,
498  int *port, void (*error_ast)()) );
499 _DIM_PROTOE( int dna_get_node_task, (int conn_id, char *node, char *task) );
500 _DIM_PROTOE( int dna_open_client, (__CXX_CONST char *server_node, __CXX_CONST char *server_task, int port,
501  int server_protocol, void (*read_ast)(), void (*error_ast)(), SRC_TYPES src_type ));
502 _DIM_PROTOE( int dna_close, (int conn_id) );
503 _DIM_PROTOE( void dna_report_error, (int conn_id, int code, char *routine_name) );
504 
505 
506 /* TCPIP */
507 _DIM_PROTOE( int tcpip_open_client, (int conn_id, char *node, char *task,
508  int port) );
509 _DIM_PROTOE( int tcpip_open_server, (int conn_id, char *task, int *port) );
510 _DIM_PROTOE( int tcpip_open_connection, (int conn_id, int channel) );
511 _DIM_PROTOE( int tcpip_start_read, (int conn_id, char *buffer, int size,
512  void (*ast_routine)()) );
513 _DIM_PROTOE( int tcpip_start_listen, (int conn_id, void (*ast_routine)()) );
514 _DIM_PROTOE( int tcpip_write, (int conn_id, char *buffer, int size) );
515 _DIM_PROTOE( void tcpip_get_node_task, (int conn_id, char *node, char *task) );
516 _DIM_PROTOE( int tcpip_close, (int conn_id) );
517 _DIM_PROTOE( int tcpip_failure, (int code) );
518 _DIM_PROTOE( void tcpip_report_error, (int code) );
519 
520 
521 /* DTQ */
522 _DIM_PROTOE( int dtq_create, (void) );
523 _DIM_PROTOE( int dtq_delete, (int queue_id) );
525  void (*user_routine)(), dim_long tag) );
526 _DIM_PROTOE( int dtq_clear_entry, (TIMR_ENT *entry) );
527 _DIM_PROTOE( int dtq_rem_entry, (int queue_id, TIMR_ENT *entry) );
528 
529 /* UTIL */
530 typedef struct dll {
531  struct dll *next;
532  struct dll *prev;
533  char user_info[1];
534 } DLL;
535 
536 typedef struct sll {
537  struct sll *next;
538  char user_info[1];
539 } SLL;
540 
541 _DIM_PROTO( void DimDummy, () );
543 _DIM_PROTOE( int conn_get, (void) );
544 _DIM_PROTOE( void conn_free, (int conn_id) );
545 _DIM_PROTOE( void *arr_increase, (void *conn_ptr, int conn_size, int n_conns) );
546 _DIM_PROTOE( void id_arr_create, () );
547 _DIM_PROTOE( void *id_arr_increase,(void *id_ptr, int id_size, int n_ids) );
548 
549 _DIM_PROTOE( void dll_init, ( DLL *head ) );
550 _DIM_PROTOE( void dll_insert_queue, ( DLL *head, DLL *item ) );
551 _DIM_PROTOE( void dll_insert_after, ( DLL *after, DLL *item ) );
552 _DIM_PROTOE( DLL *dll_search, ( DLL *head, char *data, int size ) );
553 _DIM_PROTOE( DLL *dll_get_next, ( DLL *head, DLL *item ) );
554 _DIM_PROTOE( DLL *dll_get_prev, ( DLL *head, DLL *item ) );
555 _DIM_PROTOE( int dll_empty, ( DLL *head ) );
556 _DIM_PROTOE( void dll_remove, ( DLL *item ) );
557 
558 _DIM_PROTOE( void sll_init, ( SLL *head ) );
559 _DIM_PROTOE( int sll_insert_queue, ( SLL *head, SLL *item ) );
560 _DIM_PROTOE( SLL *sll_search, ( SLL *head, char *data, int size ) );
562 _DIM_PROTOE( int sll_empty, ( SLL *head ) );
563 _DIM_PROTOE( int sll_remove, ( SLL *head, SLL *item ) );
564 _DIM_PROTOE( SLL *sll_remove_head, ( SLL *head ) );
565 _DIM_PROTOE( SLL *sll_search_next_remove, ( SLL *item, int offset, char *data, int size ) );
566 _DIM_PROTOE( SLL *sll_get_head, ( SLL *head ) );
567 
568 _DIM_PROTOE( int HashFunction, ( char *name, int max ) );
569 
570 _DIM_PROTOE( int copy_swap_buffer_out, (int format, FORMAT_STR *format_data,
571  void *buff_out, void *buff_in, int size) );
572 _DIM_PROTOE( int copy_swap_buffer_in, (FORMAT_STR *format_data, void *buff_out,
573  void *buff_in, int size) );
574 _DIM_PROTOE( int get_node_name, (char *node_name) );
575 
577 
578 _DIM_PROTOE( int get_dns_node_name, ( char *node_name ) );
579 
580 _DIM_PROTOE( int get_dns_accepted_domains, ( char *domains ) );
581 _DIM_PROTOE( int get_dns_accepted_nodes, ( char *nodes ) );
582 
583 _DIM_PROTO( double _swapd_by_addr, (double *d) );
584 _DIM_PROTO( int _swapl_by_addr, (int *l) );
585 _DIM_PROTO( short _swaps_by_addr, (short *s) );
586 _DIM_PROTO( void _swapd_buffer, (double *dout, double *din, int n) );
587 _DIM_PROTO( void _swapl_buffer, (int *lout, int *lin, int n) );
588 _DIM_PROTO( void _swaps_buffer, (short *sout, short *sin, int n) );
589 
590 #ifdef __cplusplus
591 #undef __CXX_CONST
592 }
593 #endif
594 
595 
596 #define SIZEOF_CHAR 1
597 #define SIZEOF_SHORT 2
598 #define SIZEOF_LONG 4
599 #define SIZEOF_FLOAT 4
600 #define SIZEOF_DOUBLE 8
601 
602 #if defined(OSK) && !defined(_UCC)
603 # define inc_pter(p,i) (char *)p += (i)
604 #else
605 # define inc_pter(p,i) p = (void *)((char *)p + (i))
606 #endif
607 
608 #endif
Definition: dim.h:191
struct sll * next
Definition: dim.h:537
#define MAX_NAME
Definition: dim.h:182
SWAP_TYPE
Definition: dim.h:191
Definition: dns.c:26
int * fill_address
Definition: dim.h:470
int protocol
Definition: dim.h:438
int tcpip_start_listen(int conn_id, void(*ast_routine)())
Definition: tcpip.c:1308
int type
Definition: dim.h:325
DIM_NOSHARE DIC_CONNECTION * Dic_conns
Definition: conn_handler.c:30
_DIM_PROTOE(int dna_start_read,(int conn_id, int size))
void dna_test_write(int conn_id)
Definition: dna.c:335
int dtq_delete(int queue_id)
Definition: dtq.c:378
Definition: dim.h:454
int stamped
Definition: dim.h:478
DllExp DIM_NOSHARE int Curr_N_Conns
Definition: conn_handler.c:33
SLL * sll_get_head(SLL *head)
Definition: sll.c:107
void _swaps_buffer(short *s2, short *s1, int n)
Definition: swap.c:92
DLL * dll_get_prev(DLL *head, DLL *item)
Definition: dll.c:77
int type
Definition: dim.h:234
dim_long tag
Definition: dim.h:377
struct dll * prev
Definition: dim.h:532
int dna_write(int conn_id, void *buffer, int size)
Definition: dna.c:455
void dll_insert_after(DLL *atitem, DLL *item)
Definition: dll.c:36
int tmout_done
Definition: dim.h:477
int copy_swap_buffer_in(FORMAT_STR *format_data, void *buff_out, void *buff_in, int size)
Definition: copy_swap.c:270
#define __CXX_CONST
Definition: dim.h:489
TIMR_ENT * timr_ent
Definition: dim.h:442
int protocol
Definition: dim.h:389
TIMR_ENT * timr_ent
Definition: dim.h:413
int time_stamp[2]
Definition: dim.h:479
SERVICE_REQ service
Definition: dim.h:302
char * buffer
Definition: dim.h:401
DllExp DIM_NOSHARE DNS_CONNECTION * Dns_conns
Definition: conn_handler.c:29
int header_magic
Definition: dim.h:357
int header_size
Definition: dim.h:361
Definition: did.h:42
struct dic_serv * next
Definition: dim.h:458
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)
Definition: dna.c:733
void * arr_increase(void *conn_ptr, int conn_size, int n_conns)
Definition: conn_handler.c:126
int header_magic
Definition: dim.h:363
int service_id
Definition: dim.h:233
DllExp DIM_NOSHARE NET_CONNECTION * Net_conns
Definition: conn_handler.c:32
char * service_head
Definition: dim.h:424
struct dll DLL
int size
Definition: dim.h:402
void dll_insert_queue(DLL *head, DLL *item)
Definition: dll.c:23
int busy
Definition: dim.h:381
int header_size
Definition: dim.h:355
char * service_head
Definition: dim.h:436
short flags
Definition: dim.h:219
int timeout
Definition: dim.h:235
int dna_close(int conn_id)
Definition: dna.c:835
int dtq_create()
Definition: dtq.c:353
int type
Definition: dim.h:288
int copy_swap_buffer_out(int format, FORMAT_STR *format_data, void *buff_out, void *buff_in, int size)
Definition: copy_swap.c:170
Definition: dim.h:191
int n_clients
Definition: dim.h:334
int service_id
Definition: dim.h:296
void conn_free(int conn_id)
Definition: conn_handler.c:118
void * malloc()
Definition: EventBuilder.cc:99
SRC_TYPES
Definition: dim_common.h:19
Definition: dim.h:191
Definition: dim.h:370
Definition: dim.h:190
char def[MAX_NAME]
Definition: dim.h:463
void dll_init(DLL *head)
Definition: dll.c:14
int quality
Definition: dim.h:480
int protocol
Definition: dim.h:277
int service_id
Definition: dim.h:265
int _swapl_by_addr(int *l)
Definition: swap.c:64
struct dic_serv DIC_SERVICE
short _swaps(short s)
Definition: swap.c:38
void dll_remove(DLL *item)
Definition: dll.c:100
CONN_STATE state
Definition: dim.h:390
int n_services
Definition: dim.h:279
int protocol
Definition: dim.h:315
SLL * sll_get_next(SLL *item)
Definition: sll.c:50
PENDING_STATES pending
Definition: dim.h:476
DNS_SERVER_INFO server
Definition: dim.h:345
short par_bytes
Definition: dim.h:218
#define ushort
Definition: test_tcp.c:50
int format
Definition: dim.h:278
SRC_TYPES src_type
Definition: dim.h:301
int _swapl(int l)
Definition: swap.c:23
struct dll * next
Definition: dim.h:531
int mbx_channel
Definition: dim.h:399
int format
Definition: dim.h:316
void conn_arr_create(SRC_TYPES type)
Definition: conn_handler.c:49
#define DllExp
Definition: dim_common.h:93
SRC_TYPES src_type
Definition: dim.h:271
int get_dns_node_name(char *node_name)
Definition: utilities.c:204
PENDING_STATES
Definition: dim.h:452
int status
Definition: dim.h:326
Definition: dim.h:223
dim_long tag
Definition: dim.h:473
Definition: dim.h:536
int pid
Definition: dim.h:434
int channel
Definition: dim.h:398
int curr_size
Definition: dim.h:387
int port
Definition: dim.h:409
int * serv_address
Definition: dim.h:468
int type
Definition: dim.h:465
Definition: dim.h:530
time_t last_used
Definition: dim.h:414
struct dic_serv * prev
Definition: dim.h:459
SLL * sll_remove_head(SLL *head)
Definition: sll.c:94
struct sll SLL
int writing
Definition: dim.h:391
int time_left
Definition: dim.h:375
int type
int size
Definition: dim.h:287
void sll_init(SLL *head)
Definition: sll.c:14
int sll_insert_queue(SLL *head, SLL *item)
Definition: sll.c:20
int dtq_clear_entry(TIMR_ENT *entry)
Definition: dtq.c:490
int dtq_rem_entry(int queue_id, TIMR_ENT *entry)
Definition: dtq.c:503
int conn_id
Definition: dim.h:475
Definition: dim.h:457
#define MAX_TASK_NAME
Definition: dim.h:181
int tcpip_start_read(int conn_id, char *buffer, int size, void(*ast_routine)())
Definition: tcpip.c:949
int par_num
Definition: dim.h:217
int size
Definition: dim.h:244
long dim_long
Definition: dim_common.h:57
int validity
Definition: dim.h:439
SLL * sll_search_next_remove(SLL *item, int offset, char *data, int size)
Definition: sll.c:118
int get_dns_accepted_nodes(char *nodes)
Definition: utilities.c:275
int n_clients
Definition: dim.h:327
int service_id
Definition: dim.h:245
int tcpip_close(int conn_id)
Definition: tcpip.c:1510
int dna_get_node_task(int conn_id, char *node, char *task)
Definition: dna.c:594
int size
Definition: dim.h:300
void dna_report_error(int conn_id, int code, char *routine_name, int severity, int errcode)
Definition: dna.c:903
int port
Definition: dim.h:422
int pid
Definition: dim.h:423
int size
Definition: dim.h:270
FORMAT_STR format_data[MAX_NAME/4]
Definition: dim.h:462
int sll_remove(SLL *head, SLL *item)
Definition: sll.c:74
int serv_id
Definition: dim.h:461
void _swapl_buffer(int *s2, int *s1, int n)
Definition: swap.c:115
int dna_write_nowait(int conn_id, void *buffer, int size)
Definition: dna.c:412
int n_services
Definition: dim.h:440
int buffer[BUFFSIZE]
Definition: db_dim_client.c:14
int dll_empty(DLL *head)
Definition: dll.c:88
int status
Definition: dim.h:333
int size
Definition: dim.h:231
void _swapd_buffer(double *s2, double *s1, int n)
Definition: swap.c:143
int get_dns_port_number()
Definition: utilities.c:216
struct timer_entry TIMR_ENT
struct timer_entry * next_done
Definition: dim.h:373
double _swapd_by_addr(double *d)
Definition: swap.c:51
int port
Definition: dim.h:435
int dna_open_server(char *task, void(*read_ast)(), int *protocol, int *port, void(*error_ast)())
Definition: dna.c:551
int size
Definition: db_dim_server.c:17
int tcpip_write(int conn_id, char *buffer, int size)
Definition: tcpip.c:1389
float data[4 *1440]
int port
Definition: dim.h:276
int format
Definition: dim.h:236
int data_size
Definition: dim.h:356
TIMR_ENT * dtq_add_entry(int queue_id, int time, void(*user_routine)(), dim_long tag)
Definition: dtq.c:399
int saw_init
Definition: dim.h:392
CONN_STATE
Definition: dim.h:190
DllExp DIM_NOSHARE DNA_CONNECTION * Dna_conns
Definition: conn_handler.c:31
int quality
Definition: dim.h:365
short _swaps_by_addr(short *s)
Definition: swap.c:79
DLL * dll_get_next(DLL *head, DLL *item)
Definition: dll.c:66
int curr_timeout
Definition: dim.h:467
int tcpip_open_client(int conn_id, char *node, char *task, int port)
Definition: tcpip.c:1014
#define MAX_NODE_NAME
Definition: dim.h:180
TIMR_ENT * timer_ent
Definition: dim.h:474
int time
Definition: dim.h:374
char serv_name[MAX_NAME]
Definition: dim.h:460
void * id_arr_increase(void *id_ptr, int id_size, int n_ids)
Definition: conn_handler.c:143
Definition: dim.h:344
int HashFunction(char *name, int max)
Definition: hash.c:22
void tcpip_get_node_task(int conn_id, char *node, char *task)
Definition: tcpip.c:1383
struct timer_entry * next
Definition: dim.h:371
int full_size
Definition: dim.h:388
SRC_TYPES src_type
Definition: dim.h:430
char user_info[1]
Definition: dim.h:533
static int queue_id
Definition: tcpip.c:93
int * buffer
Definition: dim.h:384
char * node_head
Definition: dim.h:437
int timeout
Definition: dim.h:411
int format
Definition: dim.h:464
int timeout
Definition: dim.h:466
int fill_size
Definition: dim.h:471
int n_services
Definition: dim.h:341
void id_arr_create()
Definition: conn_handler.c:135
int tcpip_open_server(int conn_id, char *task, int *port)
Definition: tcpip.c:1182
char user_info[1]
Definition: dim.h:538
Definition: dim.h:190
int service_id
Definition: dim.h:308
Definition: dim.h:190
int dna_start_read(int conn_id, int size)
Definition: dna.c:234
int write_timedout
Definition: dim.h:412
int pid
Definition: dim.h:275
int already
Definition: dim.h:443
int serv_size
Definition: dim.h:469
int buffer_size
Definition: dim.h:385
int data_size
Definition: dim.h:362
int get_node_name(char *node_name)
Definition: utilities.c:33
int code
Definition: dim.h:224
int pid
Definition: dim.h:313
int sll_empty(SLL *head)
Definition: sll.c:60
int tid
Definition: dim.h:481
int tcpip_failure(int code)
Definition: tcpip.c:1540
void(* user_routine)()
Definition: dim.h:376
SLL * sll_search(SLL *head, char *data, int size)
Definition: sll.c:35
int old_n_services
Definition: dim.h:441
int reading
Definition: dim.h:410
_DIM_PROTO(void DimDummy,())
int get_dns_accepted_domains(char *domains)
Definition: utilities.c:249
DLL * dll_search(DLL *head, char *data, int size)
Definition: dll.c:49
int tcpip_open_connection(int conn_id, int path)
Definition: tcpip.c:1332
struct timer_entry * prev
Definition: dim.h:372
Definition: dim.h:191
int service_id
Definition: dim.h:253
int port
Definition: dim.h:314
char * curr_buffer
Definition: dim.h:386
int conn_get()
Definition: conn_handler.c:79
DNS_DIS_TYPES
Definition: dim.h:188
int size
Definition: dim.h:307
#define MAX_SERVICE_UNIT
Definition: dim.h:160
void tcpip_report_error(int code)
Definition: tcpip.c:1552