OpenAFS
OpenAFS distributed network file system
/cygdrive/c/src/openafs/openafs.git/repo/src/aklog/aklog.h
00001 /*
00002  * $Id$
00003  *
00004  * Copyright 1990,1991 by the Massachusetts Institute of Technology
00005  * For distribution and copying rights, see the file "mit-copyright.h"
00006  */
00007 
00008 #ifndef __AKLOG_H__
00009 #define __AKLOG_H__
00010 
00011 #include <afsconfig.h>
00012 
00013 #include <krb5.h>
00014 #include "linked_list.h"
00015 
00016 #ifdef __STDC__
00017 #define ARGS(x) x
00018 #else
00019 #define ARGS(x) ()
00020 #endif /* __STDC__ */
00021 
00022 void aklog ARGS((int, char *[]));
00023 
00024 /*
00025  * If we have krb.h, use the definition of CREDENTIAL from there.  Otherwise,
00026  * inline it.  When we inline it we're using the inline definition from the
00027  * Heimdal sources (since Heimdal doesn't include a definition of struct
00028  * credentials with the sources
00029  */
00030 
00031 #ifdef HAVE_KERBEROSIV_KRB_H
00032 #include <kerberosIV/krb.h>
00033 #else /* HAVE_KERBEROSIV_KRB_H */
00034 
00035 #ifndef MAX_KTXT_LEN
00036 #define MAX_KTXT_LEN 1250
00037 #endif /* MAX_KTXT_LEN */
00038 #ifndef ANAME_SZ
00039 #define ANAME_SZ 40
00040 #endif /* ANAME_SZ */
00041 #ifndef REALM_SZ
00042 #define REALM_SZ 40
00043 #endif /* REALM_SZ */
00044 #ifndef SNAME_SZ
00045 #define SNAME_SZ 40
00046 #endif /* SNAME_SZ */
00047 #ifndef INST_SZ
00048 #define INST_SZ 40
00049 #endif /* INST_SZ */
00050 
00051 #ifndef u_int32_t
00052 #define u_int32_t uint32_t
00053 #endif
00054 
00055 struct ktext {
00056     unsigned int length;
00057     unsigned char dat[MAX_KTXT_LEN];
00058     afs_uint32 mbz;
00059 };
00060 
00061 struct credentials {
00062     char    service[ANAME_SZ];
00063     char    instance[INST_SZ];
00064     char    realm[REALM_SZ];
00065     char    session[8];
00066     int     lifetime;
00067     int     kvno;
00068     struct ktext ticket_st;
00069     int32_t    issue_date;
00070     char    pname[ANAME_SZ];
00071     char    pinst[INST_SZ];
00072 };
00073 
00074 typedef struct credentials CREDENTIALS;
00075 #endif /* ! HAVE_KERBEROSIV_KRB_H */
00076 
00077 #endif /* __AKLOG_H__ */
 All Data Structures Files Functions Variables