Include afsconfig.h before anything else
[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 <afsconfig.h>
12
13 #include <krb5.h>
14 #include "linked_list.h"
15
16 #ifdef __STDC__
17 #define ARGS(x) x
18 #else
19 #define ARGS(x) ()
20 #endif /* __STDC__ */
21
22 void aklog ARGS((int, char *[]));
23
24 /*
25  * If we have krb.h, use the definition of CREDENTIAL from there.  Otherwise,
26  * inline it.  When we inline it we're using the inline definition from the
27  * Heimdal sources (since Heimdal doesn't include a definition of struct
28  * credentials with the sources
29  */
30
31 #ifdef HAVE_KERBEROSIV_KRB_H
32 #include <kerberosIV/krb.h>
33 #else /* HAVE_KERBEROSIV_KRB_H */
34
35 #ifndef MAX_KTXT_LEN
36 #define MAX_KTXT_LEN 1250
37 #endif /* MAX_KTXT_LEN */
38 #ifndef ANAME_SZ
39 #define ANAME_SZ 40
40 #endif /* ANAME_SZ */
41 #ifndef REALM_SZ
42 #define REALM_SZ 40
43 #endif /* REALM_SZ */
44 #ifndef SNAME_SZ
45 #define SNAME_SZ 40
46 #endif /* SNAME_SZ */
47 #ifndef INST_SZ
48 #define INST_SZ 40
49 #endif /* INST_SZ */
50
51 #ifndef u_int32_t
52 #define u_int32_t uint32_t
53 #endif
54
55 struct ktext {
56     unsigned int length;
57     unsigned char dat[MAX_KTXT_LEN];
58     afs_uint32 mbz;
59 };
60
61 struct credentials {
62     char    service[ANAME_SZ];
63     char    instance[INST_SZ];
64     char    realm[REALM_SZ];
65     char    session[8];
66     int     lifetime;
67     int     kvno;
68     struct ktext ticket_st;
69     int32_t    issue_date;
70     char    pname[ANAME_SZ];
71     char    pinst[INST_SZ];
72 };
73
74 typedef struct credentials CREDENTIALS;
75 #endif /* ! HAVE_KERBEROSIV_KRB_H */
76
77 #endif /* __AKLOG_H__ */