27665b92763292570554a7a19d225021c80e9232
[openafs.git] / src / aklog / aklog.h
1 /*
2  * $Id$
3  *
4  * Copyright 1990,1991 by the Massachusetts Institute of Technology
5  * For distribution and copying rights, see the file "mit-copyright.h"
6  */
7
8 #ifndef __AKLOG_H__
9 #define __AKLOG_H__
10
11 #include <krb5.h>
12 #include "linked_list.h"
13 #include <afsconfig.h>
14
15 #ifdef __STDC__
16 #define ARGS(x) x
17 #else
18 #define ARGS(x) ()
19 #endif /* __STDC__ */
20
21 void aklog ARGS((int, char *[]));
22
23 /*
24  * If we have krb.h, use the definition of CREDENTIAL from there.  Otherwise,
25  * inline it.  When we inline it we're using the inline definition from the
26  * Heimdal sources (since Heimdal doesn't include a definition of struct
27  * credentials with the sources
28  */
29
30 #ifdef HAVE_KERBEROSIV_KRB_H
31 #include <kerberosIV/krb.h>
32 #else /* HAVE_KERBEROSIV_KRB_H */
33
34 #ifndef MAX_KTXT_LEN
35 #define MAX_KTXT_LEN 1250
36 #endif /* MAX_KTXT_LEN */
37 #ifndef ANAME_SZ
38 #define ANAME_SZ 40
39 #endif /* ANAME_SZ */
40 #ifndef REALM_SZ
41 #define REALM_SZ 40
42 #endif /* REALM_SZ */
43 #ifndef SNAME_SZ
44 #define SNAME_SZ 40
45 #endif /* SNAME_SZ */
46 #ifndef INST_SZ
47 #define INST_SZ 40
48 #endif /* INST_SZ */
49
50 #ifndef u_int32_t
51 #define u_int32_t uint32_t
52 #endif
53
54 struct ktext {
55     unsigned int length;
56     unsigned char dat[MAX_KTXT_LEN];
57     afs_uint32 mbz;
58 };
59
60 struct credentials {
61     char    service[ANAME_SZ];
62     char    instance[INST_SZ];
63     char    realm[REALM_SZ];
64     char    session[8];
65     int     lifetime;
66     int     kvno;
67     struct ktext ticket_st;
68     int32_t    issue_date;
69     char    pname[ANAME_SZ];
70     char    pinst[INST_SZ];
71 };
72
73 typedef struct credentials CREDENTIALS;
74 #endif /* ! HAVE_KERBEROSIV_KRB_H */
75
76 #endif /* __AKLOG_H__ */