2 * Copyright (c) 1997, 1998 Kungliga Tekniska H
\9agskolan
3 * (Royal Institute of Technology, Stockholm, Sweden).
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
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
\9agskolan 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
39 /* $Id: krb-protos.h,v 1.2 2001/12/04 02:06:08 rjs3 Exp $ */
41 #ifndef __krb_protos_h__
42 #define __krb_protos_h__
44 #if defined (__STDC__) || defined (_MSC_VER)
61 #ifndef KRB_LIB_FUNCTION
62 #if defined(__BORLANDC__)
63 #define KRB_LIB_FUNCTION /* not-ready-definition-yet */
64 #elif defined(_MSC_VER)
65 #define KRB_LIB_FUNCTION /* not-ready-definition-yet2 */
67 #define KRB_LIB_FUNCTION
72 afs_string_to_key __P((
80 unsigned char *session,
103 unsigned char *flags,
108 unsigned char *session,
114 des_key_schedule schedule));
117 dest_tkt __P((void));
138 k_get_all_addrs __P((struct in_addr **l));
146 k_getportbyname __P((
158 k_isinst __P((char *s));
161 k_isname __P((char *s));
164 k_isrealm __P((char *s));
166 struct tm * KRB_LIB_FUNCTION
167 k_localtime __P((u_int32_t *tp));
177 krb_atime_to_life __P((char *atime));
185 struct des_ks_struct *schedule,
186 struct sockaddr_in *laddr,
187 struct sockaddr_in *faddr));
190 krb_check_tm __P((struct tm tm));
192 KTEXT KRB_LIB_FUNCTION
193 krb_create_death_packet __P((char *a_name));
196 krb_create_ticket __P((
211 krb_decode_as_rep __P((
218 decrypt_proc_t decrypt_proc,
224 krb_enable_debug __P((void));
232 krb_get_address __P((
243 krb_get_config_bool __P((const char *variable));
245 const char * KRB_LIB_FUNCTION
246 krb_get_config_string __P((const char *variable));
256 krb_get_default_principal __P((
261 char * KRB_LIB_FUNCTION
262 krb_get_default_realm __P((void));
264 const char * KRB_LIB_FUNCTION
265 krb_get_err_text __P((int code));
267 struct krb_host* KRB_LIB_FUNCTION
282 decrypt_proc_t decrypt_proc,
293 krb_get_kdc_time_diff __P((void));
296 krb_get_krbconf __P((
302 krb_get_krbextra __P((
314 krb_get_krbrealms __P((
331 char * KRB_LIB_FUNCTION
332 krb_get_phost __P((const char *alias));
335 krb_get_pw_in_tkt __P((
345 krb_get_pw_in_tkt2 __P((
362 krb_get_svc_in_tkt __P((
372 krb_get_tf_fullname __P((
379 krb_get_tf_realm __P((
383 void KRB_LIB_FUNCTION
384 krb_kdctimeofday __P((struct timeval *tv));
398 char * KRB_LIB_FUNCTION
399 krb_life_to_atime __P((int life));
401 u_int32_t KRB_LIB_FUNCTION
402 krb_life_to_time __P((
407 krb_lsb_antinet_ulong_cmp __P((
412 krb_lsb_antinet_ushort_cmp __P((
437 int32_t KRB_LIB_FUNCTION
443 int32_t KRB_LIB_FUNCTION
448 struct des_ks_struct *schedule,
450 struct sockaddr_in *sender,
451 struct sockaddr_in *receiver));
461 int32_t KRB_LIB_FUNCTION
467 struct sockaddr_in *sender,
468 struct sockaddr_in *receiver));
484 const char *fullname,
485 krb_principal *principal));
488 krb_put_address __P((
521 int32_t KRB_LIB_FUNCTION
525 struct des_ks_struct *schedule,
527 struct sockaddr_in *sender,
528 struct sockaddr_in *receiver,
540 int32_t KRB_LIB_FUNCTION
545 struct sockaddr_in *sender,
546 struct sockaddr_in *receiver,
550 krb_realm_parse __P((
554 char * KRB_LIB_FUNCTION
555 krb_realmofhost __P((const char *host));
564 struct sockaddr_in *faddr,
565 struct sockaddr_in *laddr,
568 struct des_ks_struct *schedule,
582 struct des_ks_struct *schedule,
583 struct sockaddr_in *laddr,
584 struct sockaddr_in *faddr,
587 void KRB_LIB_FUNCTION
588 krb_set_kdc_time_diff __P((int diff));
596 krb_set_lifetime __P((int newval));
598 void KRB_LIB_FUNCTION
599 krb_set_tkt_string __P((const char *val));
601 const char * KRB_LIB_FUNCTION
602 krb_stime __P((time_t *t));
605 krb_time_to_life __P((
609 char * KRB_LIB_FUNCTION
610 krb_unparse_name __P((krb_principal *pr));
612 char * KRB_LIB_FUNCTION
613 krb_unparse_name_long __P((
618 char * KRB_LIB_FUNCTION
619 krb_unparse_name_long_r __P((
625 char * KRB_LIB_FUNCTION
626 krb_unparse_name_r __P((
631 krb_use_admin_server __P((int flag));
634 krb_verify_user __P((
643 krb_verify_user_srvtab __P((
657 u_int32_t KRB_LIB_FUNCTION
660 struct sockaddr_in *src,
661 struct sockaddr_in *dst));
663 const char * KRB_LIB_FUNCTION
664 month_sname __P((int n));
675 passwd_to_afskey __P((
691 read_service_key __P((
700 save_credentials __P((
704 unsigned char *session,
708 int32_t issue_date));
724 void KRB_LIB_FUNCTION
725 tf_close __P((void));
728 tf_create __P((char *tf_name));
731 tf_get_cred __P((CREDENTIALS *c));
734 tf_get_pinst __P((char *inst));
737 tf_get_pname __P((char *p));
745 tf_put_pinst __P((char *inst));
748 tf_put_pname __P((char *p));
755 unsigned char *session,
759 u_int32_t issue_date));
767 char * KRB_LIB_FUNCTION
768 tkt_string __P((void));
770 #endif /* __krb_protos_h__ */