6 * Copyright (C) 1987 by the Massachusetts Institute of Technology
10 #include <sys/types.h>
12 #include <sys/socket.h>
13 #include <netinet/in.h>
15 #include <moira_site.h>
18 typedef struct returned_tuples {
19 struct returned_tuples *next;
25 * This should be in the kerberos header file.
35 * This structure holds all per-client information; one of these is
36 * allocated for each active client.
39 typedef struct _client {
40 OPERATION pending_op; /* Primary pending operation */
41 CONNECTION con; /* Connection to the client */
42 int action; /* what action is pending? */
43 mr_params *args, reply;
44 int id; /* Unique id of client */
45 struct sockaddr_in haddr; /* IP address of client */
46 char clname[MAX_K_NAME_SZ];/* Name client authenticated to */
47 struct krbname kname; /* Parsed version of the above */
48 int users_id; /* MR internal ID of authenticated user */
49 int client_id; /* MR internal ID of client for modby field */
50 returned_tuples *first, *last;
51 time_t last_time_used; /* Last time connection used */
52 char entity[9]; /* entity on other end of the connection */
70 extern char *krb_realm;
78 #define LOG_CONNECT 0x0001
79 #define LOG_REQUESTS 0x0002
80 #define LOG_ARGS 0x0004
81 #define LOG_RESP 0x0008
82 #define LOG_RES 0x0010
83 #define LOG_VALID 0x0020
84 #define LOG_SQL 0x0040
85 #define LOG_GDSS 0x0080
88 /* max length of query argument allowed */
90 /* Used to setup static argv, maximum argc */
93 /* statistics on number of queries by version number */
94 extern int newqueries, oldqueries;
96 /* Maximum and minimum values that will ever be chosen for IDs */
97 #define MAX_ID_VALUE 31999
98 #define MIN_ID_VALUE 100
100 /* Sleepy states for the server! */
107 /* state for the incremental update system */
108 extern int inc_running, inc_pid;
109 extern time_t inc_started, now;
110 #define INC_TIMEOUT (3 * 60) /* 3 minutes */