]> andersk Git - moira.git/blob - server/mr_server.h
added definition of ARGLEN
[moira.git] / server / mr_server.h
1 /*
2  *      $Source$
3  *      $Author$
4  *      $Header$
5  *
6  *      Copyright (C) 1987 by the Massachusetts Institute of Technology
7  *
8  *      $Log$
9  *      Revision 1.8  1988-01-14 13:12:06  mar
10  *      added definition of ARGLEN
11  *
12  * Revision 1.7  87/07/29  16:03:30  wesommer
13  * Added last_time_used field to client structure.
14  * 
15  * Revision 1.6  87/07/14  00:36:40  wesommer
16  * Added debugging options.
17  * 
18  * Revision 1.5  87/06/30  20:05:14  wesommer
19  * Added parsed kerberos principal name.
20  * 
21  * Revision 1.4  87/06/21  16:42:07  wesommer
22  * Performance work, rearrangement of include files.
23  * 
24  * Revision 1.3  87/06/03  16:07:59  wesommer
25  * Fixes for lint.
26  * 
27  * Revision 1.2  87/06/01  03:35:10  wesommer
28  * added stuff for authentication.
29  * 
30  */
31
32 #include <sys/types.h>
33 #include <sys/uio.h>
34 #include <sys/socket.h>
35 #include <netinet/in.h>
36 #include "sms_proto.h"
37 #include <krb.h>
38
39 typedef struct returned_tuples {
40         struct returned_tuples *next;
41         OPERATION op;
42         sms_params *retval;
43 } returned_tuples;
44
45 /*
46  * This should be in the kerberos header file.
47  */
48
49 struct krbname {
50         char name[ANAME_SZ];
51         char inst[INST_SZ];
52         char realm[REALM_SZ];
53 };
54
55 /*
56  * This structure holds all per-client information; one of these is
57  * allocated for each active client.
58  */
59    
60 typedef struct _client {
61         OPERATION pending_op;   /* Primary pending operation */
62         CONNECTION con;         /* Connection to the client */
63         int state;              /* XXX this is really superfluous and should */
64                                 /* be removed */
65         int action;             /* what action is pending? */
66         sms_params *args, reply;
67         int id;                 /* Unique id of client */
68         struct sockaddr_in haddr; /* IP address of client */
69         char *clname;           /* Name client authenticated to */
70         struct krbname kname;   /* Parsed version of the above */
71         returned_tuples *first, *last;
72         time_t last_time_used;  /* Last time connection used */
73 } client;
74
75 /*
76  * States
77  */
78
79 #define CL_DEAD 0
80 #define CL_STARTING 1
81
82 /*
83  * Actions.
84  */
85
86 #define CL_ACCEPT 0
87 #define CL_RECEIVE 1
88 #define CL_SEND 2
89
90 extern char *krb_realm;
91
92 /*
93  * Debugging options.
94  */
95
96 extern int log_flags;
97
98 #define LOG_CONNECT             0x0001
99 #define LOG_REQUESTS            0x0002
100 #define LOG_ARGS                0x0004
101 #define LOG_RESP                0x0008
102 #define LOG_RES                 0x0010
103
104
105 /* max length of query argument allowed */
106 #define ARGLEN  128
This page took 0.04374 seconds and 5 git commands to generate.