]> andersk Git - moira.git/blob - gdb/gdb_lib.h
2ffd651c0b50ef8c01282125e8ef5378b8b84272
[moira.git] / gdb / gdb_lib.h
1 /*
2  *      $Source$
3  *      $Header$
4  */
5
6 /************************************************************************/
7 /*      
8 /*                      gdb_lib.h
9 /*      
10 /*      Includes used within the Global Database Facilities library.
11 /*      Should NOT be included by typical users of gdb.
12 /*      
13 /*      Author: Noah Mendelsohn
14 /*      Copyright: 1986 MIT Project Athena
15 /*      
16 /************************************************************************/
17
18 /************************************************************************/
19 /*      
20 /*                          USER IDENTIFICATION
21 /*      
22 /*      gdb_init puts the user's i.d. and hostname as strings here.
23 /*      
24 /************************************************************************/
25
26 char *gdb_uname;                                /* user's string name */
27 char *gdb_host;                                 /* name of local host */
28                                                 /* goes here */
29
30
31 /************************************************************************/
32 /*      
33 /*                          MEMORY MANAGEMENT
34 /*      
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.
38 /*      
39 /************************************************************************/
40
41 char *((*gdb_amv)()) = gdb_am;
42 int  (*gdb_fmv)() = gdb_fm;
43
44
45
46 /************************************************************************/
47 /*      
48 /*      
49 /*                        SYSTEM TYPE DEFINITIONS
50 /*      
51 /*      Declarations used to control the definition and use of 'types'
52 /*      as supported by the global database system.
53 /*      
54 /*      
55 /************************************************************************/
56
57 int     gdb_Debug=0;                            /* debugging flags are */
58                                                 /* stored here */
59 FILE *gdb_log = stderr;                         /* all debugging */
60                                                 /* output goes on stderr*/
61
62 char g_errstr[150];                             /* build emsgs here */
63
64 /*
65  *                      g_type_table
66  * 
67  * This is the table where the actual definitions for the types are
68  * kept.
69  */
70
71 gdb_type_def g_type_table[GDB_MAX_TYPES];
72 int gdb_n_types;                                /* number of entries in */
73                                                 /* table */
74 /*
75  *                      connection failure indicator
76  * 
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.
82  */
83 int gdb_conok;                                  
84 \f
85 /************************************************************************/
86 /*      
87 /*           CONNECTION AND DATA TRANSMISSION SERVICES
88 /*      
89 /*      These are the global data structures used by the routines
90 /*      which maintain connections and do asynchronous data transfer
91 /*      on them.
92 /*      
93 /************************************************************************/
94
95         /*----------------------------------------------------------*/
96         /*      
97         /*                      gdb_cons
98         /*      
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.
110         /*      
111         /*----------------------------------------------------------*/
112
113 int     gdb_mcons;                              /* 0 based index of */
114                                                 /* last connection */
115                                                 /* currently in use */
116
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 */
121                                                 /* is stored here */
122
123         /*----------------------------------------------------------*/
124         /*      
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.
129         /*      
130         /*----------------------------------------------------------*/
131
132 fd_set gdb_crfds, gdb_cwfds, gdb_cefds;         /* connection related file */
133                                                 /* descriptor maps to be */
134                                                 /* used in select */
135         /*----------------------------------------------------------*/
136         /*      
137         /*                      gdb_notime
138         /*      
139         /*      Pass this to select when doing a poll.
140         /*      
141         /*----------------------------------------------------------*/
142
143 struct timeval gdb_notime = {0,0};
144 \f
145 /************************************************************************/
146 /*      
147 /*                     SERVER/CLIENT MANAGEMENT
148 /*      
149 /*      Definitions used in starting and maintaining communication 
150 /*      between servers and clients (as opposed to peers.)
151 /*      
152 /************************************************************************/
153
154 TUPLE_DESCRIPTOR gdb_tosrv;                     /* descriptor for request */
155                                                 /* tuples sent to the */
156                                                 /* server during negotiation*/
157
158 TUPLE_DESCRIPTOR gdb_fmsrv;                     /* descriptor for request */
159                                                 /* tuples sent from the */
160                                                 /* server during negotiation*/
161
162         /*----------------------------------------------------------*/
163         /*      
164         /*      Global variables inherited by a child from a server
165         /*      parent.
166         /*      
167         /*----------------------------------------------------------*/
168
169 TUPLE gdb_client_tuple;                         /* request tuple sent from */
170                                                 /* the client */
171
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 */
176                                                 /* big .h files */
177 int gdb_socklen;                                /* length of above */
178
This page took 0.062797 seconds and 3 git commands to generate.