*** empty log message ***
[arla.git] / rxkad / krb4.h
blobfd16fbfe045e9f89bc9b4cdf85f5e8b133aa870c
1 /*
2 * Copyright (c) 1995-2000 Kungliga Tekniska Högskolan
3 * (Royal Institute of Technology, Stockholm, Sweden).
4 * All rights reserved.
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the
15 * documentation and/or other materials provided with the distribution.
17 * 3. Neither the name of the Institute nor the names of its contributors
18 * may be used to endorse or promote products derived from this software
19 * without specific prior written permission.
21 * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
22 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
34 /* @(#)$Id$ */
36 #ifndef __KRB4_H
37 #define __KRB4_H
39 /* General definitions */
40 #define KSUCCESS 0
41 #define KFAILURE 255
43 /* The maximum sizes for aname, realm, sname, and instance +1 */
44 #define ANAME_SZ 40
45 #define REALM_SZ 40
46 #define SNAME_SZ 40
47 #define INST_SZ 40
48 /* Leave space for quoting */
49 #define MAX_K_NAME_SZ (2*ANAME_SZ + 2*INST_SZ + 2*REALM_SZ - 3)
50 #define KKEY_SZ 100
51 #define VERSION_SZ 1
52 #define MSG_TYPE_SZ 1
53 #define DATE_SZ 26 /* RTI date output */
55 #define MAX_HSTNM 100 /* for compatibility */
57 typedef struct krb_principal{
58 char name[ANAME_SZ];
59 char instance[INST_SZ];
60 char realm[REALM_SZ];
61 }krb_principal;
63 #ifndef DEFAULT_TKT_LIFE /* allow compile-time override */
64 /* default lifetime for krb_mk_req & co., 10 hrs */
65 #define DEFAULT_TKT_LIFE 120
66 #endif
68 #define KRB_TICKET_GRANTING_TICKET "krbtgt"
70 /* Definition of text structure used to pass text around */
71 #define MAX_KTXT_LEN 1250
73 struct ktext {
74 unsigned int length; /* Length of the text */
75 unsigned char dat[MAX_KTXT_LEN]; /* The data itself */
76 u_int32_t mbz; /* zero to catch runaway strings */
79 typedef struct ktext *KTEXT;
80 typedef struct ktext KTEXT_ST;
82 #include "krb4-protos.h"
84 #endif /* __KRB4_H */