]> andersk Git - moira.git/blame - gdb/gdb_lib.h
lint
[moira.git] / gdb / gdb_lib.h
CommitLineData
5580185e 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
26char *gdb_uname; /* user's string name */
27char *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
41char *((*gdb_amv)()) = gdb_am;
42int (*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
57int gdb_Debug=0; /* debugging flags are */
58 /* stored here */
59FILE *gdb_log = stderr; /* all debugging */
60 /* output goes on stderr*/
61
62char 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
71gdb_type_def g_type_table[GDB_MAX_TYPES];
72int 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 */
83int 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
113int gdb_mcons; /* 0 based index of */
114 /* last connection */
115 /* currently in use */
116
117int gdb_mfd; /* number of the highest */
118 /* file descriptor in use */
119 /* for a connection */
120struct 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
132fd_set gdb_crfds, gdb_cwfds, gdb_cefds; /* connection related file */
133 /* descriptor maps to be */
134 /* used in select */
24582af9 135fd_set last_crfds, last_cwfds, last_cefds; /* these file desc. bit */
136 /* masks are set up */
137 /* for each select call */
138 /* to include the user */
139 /* supplied and the */
140 /* connection related */
141 /* fd's */
142
5580185e 143 /*----------------------------------------------------------*/
144 /*
145 /* gdb_notime
146 /*
147 /* Pass this to select when doing a poll.
148 /*
149 /*----------------------------------------------------------*/
150
151struct timeval gdb_notime = {0,0};
152\f
153/************************************************************************/
154/*
155/* SERVER/CLIENT MANAGEMENT
156/*
157/* Definitions used in starting and maintaining communication
158/* between servers and clients (as opposed to peers.)
159/*
160/************************************************************************/
161
162TUPLE_DESCRIPTOR gdb_tosrv; /* descriptor for request */
163 /* tuples sent to the */
164 /* server during negotiation*/
165
166TUPLE_DESCRIPTOR gdb_fmsrv; /* descriptor for request */
167 /* tuples sent from the */
168 /* server during negotiation*/
169
170 /*----------------------------------------------------------*/
171 /*
172 /* Global variables inherited by a child from a server
173 /* parent.
174 /*
175 /*----------------------------------------------------------*/
176
177TUPLE gdb_client_tuple; /* request tuple sent from */
178 /* the client */
179
180char gdb_sockaddr_of_client[100]; /* this should really be */
181 /* sockaddr_in, but I don't */
182 /* want everyone to have */
183 /* to include all those */
184 /* big .h files */
185int gdb_socklen; /* length of above */
186
This page took 0.087793 seconds and 5 git commands to generate.