krb5_config_get_strings
[heimdal.git] / lib / krb5 / krb5_locl.h
blobc4a3a45e121a26c5f60887eccdedbe048025ee78
1 /*
2 * Copyright (c) 1997 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. All advertising materials mentioning features or use of this software
18 * must display the following acknowledgement:
19 * This product includes software developed by Kungliga Tekniska
20 * Högskolan and its contributors.
22 * 4. Neither the name of the Institute nor the names of its contributors
23 * may be used to endorse or promote products derived from this software
24 * without specific prior written permission.
26 * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
27 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
29 * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
30 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36 * SUCH DAMAGE.
39 /* $Id$ */
41 #ifndef __KRB5_LOCL_H__
42 #define __KRB5_LOCL_H__
44 #ifdef HAVE_CONFIG_H
45 #include <config.h>
46 #endif
48 #include <errno.h>
49 #include <ctype.h>
50 #include <string.h>
51 #include <stdio.h>
52 #include <stdlib.h>
54 #ifdef HAVE_SYS_TYPES_H
55 #include <sys/types.h>
56 #endif
57 #ifdef HAVE_UNISTD_H
58 #include <unistd.h>
59 #endif
60 #ifdef HAVE_FCNTL_H
61 #include <fcntl.h>
62 #endif
64 #if defined(HAVE_SYS_IOCTL_H) && SunOS != 4
65 #include <sys/ioctl.h>
66 #endif
67 #ifdef HAVE_PWD_H
68 #include <pwd.h>
69 #endif
71 #ifdef HAVE_SYS_PARAM_H
72 #include <sys/param.h>
73 #endif
74 #include <time.h>
75 #ifdef HAVE_SYS_TIME_H
76 #include <sys/time.h>
77 #endif
78 #ifdef HAVE_SYS_SELECT_H
79 #include <sys/select.h>
80 #endif
81 #ifdef HAVE_SYS_SOCKET_H
82 #include <sys/socket.h>
83 #endif
84 #ifdef HAVE_NETINET_IN_H
85 #include <netinet/in.h>
86 #endif
87 #ifdef HAVE_NETINET_IN6_H
88 #include <netinet/in6.h>
89 #endif
90 #ifdef HAVE_NETDB_H
91 #include <netdb.h>
92 #endif
93 #ifdef HAVE_SYS_UIO_H
94 #include <sys/uio.h>
95 #endif
96 #ifdef HAVE_SYS_FILIO_H
97 #include <sys/filio.h>
98 #endif
99 #include <roken.h>
101 #include <des.h>
102 #include <md4.h>
103 #include <md5.h>
104 #include <sha.h>
106 #include <krb5.h>
107 #include <krb5_err.h>
108 #include <asn1_err.h>
109 #include <hdb_err.h>
110 #include <error.h>
112 /* data.c */
114 krb5_error_code krb5_data_alloc(krb5_data *, int);
115 krb5_error_code krb5_data_realloc(krb5_data *, int);
116 krb5_error_code krb5_data_copy(krb5_data *, void *, size_t);
118 /* set_default_realm.c */
120 krb5_error_code
121 krb5_set_default_realm(krb5_context context,
122 char *realm);
124 /* get_default_realm.c */
126 krb5_error_code
127 krb5_get_default_realm(krb5_context context,
128 char **realm);
130 /* config_file.c */
132 krb5_error_code krb5_config_parse_file (const char *fname,
133 krb5_config_section **res);
134 const void *krb5_config_get_next (krb5_config_section *c,
135 krb5_config_binding **pointer,
136 int type,
137 ...);
138 const void *krb5_config_vget_next (krb5_config_section *c,
139 krb5_config_binding **pointer,
140 int type,
141 va_list args);
143 const void *krb5_config_get (krb5_config_section *c,
144 int type,
145 ...);
147 const void *krb5_config_vget (krb5_config_section *c,
148 int type,
149 va_list args);
151 const char *krb5_config_get_string (krb5_config_section *c,
152 ...);
153 const char *krb5_config_vget_string (krb5_config_section *c,
154 va_list args);
156 char **krb5_config_vget_strings(krb5_config_section *c, va_list args);
157 char **krb5_config_get_strings(krb5_config_section *c, ...);
158 void krb5_config_free_strings(char **strings);
160 krb5_boolean krb5_config_vget_bool (krb5_config_section *c, va_list args);
162 krb5_boolean krb5_config_get_bool (krb5_config_section *c, ...);
164 int krb5_config_vget_time (krb5_config_section *c, va_list args);
166 int krb5_config_get_time (krb5_config_section *c, ...);
168 const krb5_config_binding *krb5_config_get_list (krb5_config_section *c,
169 ...);
170 const krb5_config_binding *krb5_config_vget_list (krb5_config_section *c,
171 va_list args);
173 krb5_error_code
174 krb5_config_file_free (krb5_config_section *s);
177 krb5_getportbyname (const char *service,
178 const char *proto,
179 int default_port);
181 krb5_error_code
182 krb5_sendto_kdc (krb5_context context,
183 const krb5_data *send,
184 const krb5_realm *realm,
185 krb5_data *receive);
187 krb5_error_code
188 krb5_build_ap_req (krb5_context context,
189 krb5_creds *cred,
190 krb5_flags ap_options,
191 krb5_data authenticator,
192 krb5_data *ret);
194 krb5_error_code
195 krb5_build_authenticator (krb5_context context,
196 krb5_auth_context auth_context,
197 krb5_creds *cred,
198 Checksum *cksum,
199 Authenticator **auth,
200 krb5_data *result);
202 void
203 krb5_generate_random_block(void *buf, size_t len);
205 #define ALLOC(X, N) (X) = calloc((N), sizeof(*(X)))
208 extract_ticket(krb5_context context,
209 krb5_kdc_rep *rep,
210 krb5_creds *creds,
211 krb5_keyblock *key,
212 krb5_const_pointer keyseed,
213 krb5_addresses *addr,
214 unsigned nonce,
215 krb5_decrypt_proc decrypt_proc,
216 krb5_const_pointer decryptarg);
218 krb5_error_code
219 krb5_init_etype (krb5_context context,
220 unsigned *len,
221 unsigned **val,
222 const krb5_enctype *etypes);
224 PA_DATA *krb5_find_padata(PA_DATA*, unsigned, int, int*);
226 #endif /* __KRB5_LOCL_H__ */