Change __signed to signed.
[dragonfly.git] / crypto / kerberosIV / lib / krb / krb_locl.h
1 /*
2  * Copyright (c) 1995, 1996, 1997 Kungliga Tekniska Högskolan
3  * (Royal Institute of Technology, Stockholm, Sweden).
4  * All rights reserved.
5  * 
6  * Redistribution and use in source and binary forms, with or without
7  * modification, are permitted provided that the following conditions
8  * are met:
9  * 
10  * 1. Redistributions of source code must retain the above copyright
11  *    notice, this list of conditions and the following disclaimer.
12  * 
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.
16  * 
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.
20  * 
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.
32  */
33
34 /* $Id: krb_locl.h,v 1.50 1999/12/02 16:58:42 joda Exp $ */
35
36 #ifndef __krb_locl_h
37 #define __krb_locl_h
38
39 #ifdef HAVE_CONFIG_H
40 #include <config.h>
41 #endif
42
43 #include "protos.h"
44
45 #include <stdio.h>
46 #include <stdlib.h>
47 #include <string.h>
48 #include <ctype.h>
49 #include <assert.h>
50 #include <stdarg.h>
51
52 #include <errno.h>
53
54 #ifdef HAVE_PWD_H
55 #include <pwd.h>
56 #endif
57 #ifdef HAVE_UNISTD_H
58 #include <unistd.h>
59 #endif
60 #ifdef HAVE_SYS_TYPES_H
61 #include <sys/types.h>
62 #endif
63
64 #ifdef HAVE_IO_H
65 #include <io.h>
66 #endif
67
68 #ifdef TIME_WITH_SYS_TIME
69 #include <sys/time.h>
70 #include <time.h>
71 #elif defined(HAVE_SYS_TIME_H)
72 #include <sys/time.h>
73 #else
74 #include <time.h>
75 #endif
76
77 #ifdef HAVE_SYS_STAT_H
78 #include <sys/stat.h>
79 #endif
80 #ifdef HAVE_FCNTL_H
81 #include <fcntl.h>
82 #endif
83 #ifdef HAVE_SYS_FILE_H
84 #include <sys/file.h>
85 #endif
86 #ifdef HAVE_SYS_SELECT_H
87 #include <sys/select.h>
88 #endif
89
90 #ifdef HAVE_SYS_SOCKET_H
91 #include <sys/socket.h>
92 #endif
93 #ifdef HAVE_NETINET_IN_H
94 #include <netinet/in.h>
95 #endif
96
97 #ifdef HAVE_WINSOCK_H
98 #include <winsock.h>
99 #endif
100
101 #ifdef HAVE_ARPA_INET_H
102 #include <arpa/inet.h>
103 #endif
104 #ifdef HAVE_NETDB_H
105 #include <netdb.h>
106 #endif
107
108 #ifdef HAVE_ARPA_NAMESER_H
109 #include <arpa/nameser.h>
110 #endif
111 #ifdef HAVE_RESOLV_H
112 #include <resolv.h>
113 #endif
114
115 #ifdef SOCKS
116 #include <socks.h>
117
118 /* This doesn't belong here. */
119 struct tm *localtime(const time_t *);
120 struct hostent  *gethostbyname(const char *);
121
122 #endif
123
124 #include <roken.h>
125
126 #include <krb.h>
127 #include <prot.h>
128
129 #include "resolve.h"
130 #include "krb_log.h"
131
132 /* --- */
133
134 /* Utils */
135 int
136 krb_name_to_name __P((
137         const char *host,
138         char *phost,
139         size_t phost_size));
140
141 void
142 encrypt_ktext __P((
143         KTEXT cip,
144         des_cblock *key,
145         int encrypt));
146
147 int
148 kdc_reply_cipher __P((
149         KTEXT reply,
150         KTEXT cip));
151
152 int
153 kdc_reply_cred __P((
154         KTEXT cip,
155         CREDENTIALS *cred));
156
157 void
158 k_ricercar __P((char *name));
159
160
161 /* used in rd_safe.c and mk_safe.c */
162
163 void
164 fixup_quad_cksum __P((
165         void *start,
166         size_t len,
167         des_cblock *key,
168         void *new_checksum,
169         void *old_checksum,
170         int little));
171
172 void
173 krb_kdctimeofday __P((struct timeval *tv));
174
175 #endif /*  __krb_locl_h */