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