6 /************************************************************************/
10 /* Includes used within the Global Database Facilities library.
11 /* Should NOT be included by typical users of gdb.
13 /* Author: Noah Mendelsohn
14 /* Copyright: 1986 MIT Project Athena
16 /************************************************************************/
18 /************************************************************************/
20 /* USER IDENTIFICATION
22 /* gdb_init puts the user's i.d. and hostname as strings here.
24 /************************************************************************/
26 char *gdb_uname; /* user's string name */
27 char *gdb_host; /* name of local host */
31 /************************************************************************/
35 /* These vectors point to the memory allocation and free routines.
36 /* The standard routines supplied with the system are gdb_am and
37 /* gdb_fm, but users may supply their own by clobbering the vectors.
39 /************************************************************************/
41 char *((*gdb_amv)()) = gdb_am;
42 int (*gdb_fmv)() = gdb_fm;
46 /************************************************************************/
49 /* SYSTEM TYPE DEFINITIONS
51 /* Declarations used to control the definition and use of 'types'
52 /* as supported by the global database system.
55 /************************************************************************/
57 int gdb_Debug=0; /* debugging flags are */
59 FILE *gdb_log = stderr; /* all debugging */
60 /* output goes on stderr*/
62 char g_errstr[150]; /* build emsgs here */
67 * This is the table where the actual definitions for the types are
71 gdb_type_def g_type_table[GDB_MAX_TYPES];
72 int gdb_n_types; /* number of entries in */
75 * connection failure indicator
77 * This variable is used to communicate between gdb_move_data and
78 * g_con_progress without passing an extra parameter through lots
79 * of procedure calls. When set to FALSE, it indicates that the
80 * connection currently being processed has encountered a fatal error
81 * and should be severed.
85 /************************************************************************/
87 /* CONNECTION AND DATA TRANSMISSION SERVICES
89 /* These are the global data structures used by the routines
90 /* which maintain connections and do asynchronous data transfer
93 /************************************************************************/
95 /*----------------------------------------------------------*/
99 /* This is the array of connection control data
100 /* structures for gdb. Every connection has its
101 /* structure stored here, but they are in no
102 /* particular order. Because the connection data
103 /* itself cannot be moved (due to possible dangling
104 /* pointers), there may be some unused connections
105 /* in the middle of this array. gdb_mcons is the
106 /* 1 based number of the highest connection which is
107 /* actually in use at this time. This is a considerable
108 /* optimization for the typical case where very few
109 /* are in use, and turnover is low.
111 /*----------------------------------------------------------*/
113 int gdb_mcons; /* 0 based index of */
114 /* last connection */
115 /* currently in use */
117 int gdb_mfd; /* number of the highest */
118 /* file descriptor in use */
119 /* for a connection */
120 struct con_data gdb_cons[GDB_MAX_CONNECTIONS]; /* actual connection data */
123 /*----------------------------------------------------------*/
125 /* Bit maps of the file descriptors involved in connections.
126 /* Technically, this is redundant with the information in
127 /* the connection descriptors above, but it makes select
128 /* preparation much faster.
130 /*----------------------------------------------------------*/
132 fd_set gdb_crfds, gdb_cwfds, gdb_cefds; /* connection related file */
133 /* descriptor maps to be */
135 /*----------------------------------------------------------*/
139 /* Pass this to select when doing a poll.
141 /*----------------------------------------------------------*/
143 struct timeval gdb_notime = {0,0};
145 /************************************************************************/
147 /* SERVER/CLIENT MANAGEMENT
149 /* Definitions used in starting and maintaining communication
150 /* between servers and clients (as opposed to peers.)
152 /************************************************************************/
154 TUPLE_DESCRIPTOR gdb_tosrv; /* descriptor for request */
155 /* tuples sent to the */
156 /* server during negotiation*/
158 TUPLE_DESCRIPTOR gdb_fmsrv; /* descriptor for request */
159 /* tuples sent from the */
160 /* server during negotiation*/
162 /*----------------------------------------------------------*/
164 /* Global variables inherited by a child from a server
167 /*----------------------------------------------------------*/
169 TUPLE gdb_client_tuple; /* request tuple sent from */
172 char gdb_sockaddr_of_client[100]; /* this should really be */
173 /* sockaddr_in, but I don't */
174 /* want everyone to have */
175 /* to include all those */
177 int gdb_socklen; /* length of above */