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