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>
14 #include "sms_proto.h"
17 typedef struct returned_tuples {
18 struct returned_tuples *next;
24 * This should be in the kerberos header file.
34 * This structure holds all per-client information; one of these is
35 * allocated for each active client.
38 typedef struct _client {
39 OPERATION pending_op; /* Primary pending operation */
40 CONNECTION con; /* Connection to the client */
41 int state; /* XXX this is really superfluous and should */
43 int action; /* what action is pending? */
44 sms_params *args, reply;
45 int id; /* Unique id of client */
46 struct sockaddr_in haddr; /* IP address of client */
47 char *clname; /* Name client authenticated to */
48 int users_id; /* SMS internal ID of authenticated user */
49 struct krbname kname; /* Parsed version of the above */
50 returned_tuples *first, *last;
51 time_t last_time_used; /* Last time connection used */
52 char *entity; /* 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
86 /* max length of query argument allowed */
89 /* statistics on number of queries by version number */
90 extern int newqueries, oldqueries;
92 /* Maximum and minimum values that will ever be chosen for IDs */
93 #define MAX_ID_VALUE 32765
94 #define MIN_ID_VALUE 100