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_Options=0; /* GDB options are set here */
59 int gdb_Debug=0; /* debugging flags are */
61 FILE *gdb_log = stderr; /* all debugging */
62 /* output goes on stderr*/
64 char g_errstr[150]; /* build emsgs here */
69 * This is the table where the actual definitions for the types are
73 gdb_type_def g_type_table[GDB_MAX_TYPES];
74 int gdb_n_types; /* number of entries in */
77 * connection failure indicator
79 * This variable is used to communicate between gdb_move_data and
80 * g_con_progress without passing an extra parameter through lots
81 * of procedure calls. When set to FALSE, it indicates that the
82 * connection currently being processed has encountered a fatal error
83 * and should be severed.
87 /************************************************************************/
89 /* CONNECTION AND DATA TRANSMISSION SERVICES
91 /* These are the global data structures used by the routines
92 /* which maintain connections and do asynchronous data transfer
95 /************************************************************************/
97 /*----------------------------------------------------------*/
101 /* This is the array of connection control data
102 /* structures for gdb. Every connection has its
103 /* structure stored here, but they are in no
104 /* particular order. Because the connection data
105 /* itself cannot be moved (due to possible dangling
106 /* pointers), there may be some unused connections
107 /* in the middle of this array. gdb_mcons is the
108 /* 1 based number of the highest connection which is
109 /* actually in use at this time. This is a considerable
110 /* optimization for the typical case where very few
111 /* are in use, and turnover is low.
113 /*----------------------------------------------------------*/
115 int gdb_mcons; /* 0 based index of */
116 /* last connection */
117 /* currently in use */
119 int gdb_mfd; /* number of the highest */
120 /* file descriptor in use */
121 /* for a connection */
122 struct con_data gdb_cons[GDB_MAX_CONNECTIONS]; /* actual connection data */
125 /*----------------------------------------------------------*/
127 /* Bit maps of the file descriptors involved in connections.
128 /* Technically, this is redundant with the information in
129 /* the connection descriptors above, but it makes select
130 /* preparation much faster.
132 /*----------------------------------------------------------*/
134 fd_set gdb_crfds, gdb_cwfds, gdb_cefds; /* connection related file */
135 /* descriptor maps to be */
137 fd_set last_crfds, last_cwfds, last_cefds; /* these file desc. bit */
138 /* masks are set up */
139 /* for each select call */
140 /* to include the user */
141 /* supplied and the */
142 /* connection related */
145 /*----------------------------------------------------------*/
149 /* Pass this to select when doing a poll.
151 /*----------------------------------------------------------*/
153 struct timeval gdb_notime = {0,0};
155 /************************************************************************/
157 /* SERVER/CLIENT MANAGEMENT
159 /* Definitions used in starting and maintaining communication
160 /* between servers and clients (as opposed to peers.)
162 /************************************************************************/
164 TUPLE_DESCRIPTOR gdb_tosrv; /* descriptor for request */
165 /* tuples sent to the */
166 /* server during negotiation*/
168 TUPLE_DESCRIPTOR gdb_fmsrv; /* descriptor for request */
169 /* tuples sent from the */
170 /* server during negotiation*/
172 /*----------------------------------------------------------*/
174 /* Global variables inherited by a child from a server
177 /*----------------------------------------------------------*/
179 TUPLE gdb_client_tuple; /* request tuple sent from */
182 char gdb_sockaddr_of_client[100]; /* this should really be */
183 /* sockaddr_in, but I don't */
184 /* want everyone to have */
185 /* to include all those */
187 int gdb_socklen; /* length of above */