2 * Copyright (c) 1997, 1998, 1999 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. 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
34 /* $Id: krb-protos.h,v 1.2 2001/12/04 02:06:05 rjs3 Exp $ */
36 #ifndef __krb_protos_h__
37 #define __krb_protos_h__
39 #if defined (__STDC__) || defined (_MSC_VER)
56 #ifndef KRB_LIB_FUNCTION
57 #if defined(__BORLANDC__)
58 #define KRB_LIB_FUNCTION /* not-ready-definition-yet */
59 #elif defined(_MSC_VER)
60 #define KRB_LIB_FUNCTION /* not-ready-definition-yet2 */
62 #define KRB_LIB_FUNCTION
67 afs_string_to_key __P((
75 unsigned char *session,
103 unsigned char *session,
109 des_key_schedule schedule));
112 dest_tkt __P((void));
133 k_get_all_addrs __P((struct in_addr **l));
141 k_getportbyname __P((
153 k_isinst __P((char *s));
156 k_isname __P((char *s));
159 k_isrealm __P((char *s));
161 struct tm * KRB_LIB_FUNCTION
162 k_localtime __P((u_int32_t *tp));
172 krb_atime_to_life __P((char *atime));
180 struct des_ks_struct *schedule,
181 struct sockaddr_in *laddr,
182 struct sockaddr_in *faddr));
185 krb_check_tm __P((struct tm tm));
187 KTEXT KRB_LIB_FUNCTION
188 krb_create_death_packet __P((char *a_name));
191 krb_create_ticket __P((
206 krb_decode_as_rep __P((
208 char *instance, /* INOUT parameter */
211 const char *sinstance,
213 decrypt_proc_t decrypt_proc,
219 krb_disable_debug __P((void));
222 krb_enable_debug __P((void));
230 krb_get_address __P((
241 krb_get_config_bool __P((const char *variable));
243 const char * KRB_LIB_FUNCTION
244 krb_get_config_string __P((const char *variable));
254 krb_get_default_principal __P((
259 char * KRB_LIB_FUNCTION
260 krb_get_default_realm __P((void));
262 const char * KRB_LIB_FUNCTION
263 krb_get_default_tkt_root __P((void));
265 const char * KRB_LIB_FUNCTION
266 krb_get_default_keyfile __P((void));
268 const char * KRB_LIB_FUNCTION
269 krb_get_err_text __P((int code));
271 struct krb_host* KRB_LIB_FUNCTION
286 decrypt_proc_t decrypt_proc,
297 krb_get_kdc_time_diff __P((void));
300 krb_get_krbconf __P((
306 krb_get_krbextra __P((
318 krb_get_krbrealms __P((
335 char * KRB_LIB_FUNCTION
336 krb_get_phost __P((const char *alias));
339 krb_get_pw_in_tkt __P((
341 const char *instance,
344 const char *sinstance,
346 const char *password));
349 krb_get_pw_in_tkt2 __P((
351 const char *instance,
354 const char *sinstance,
356 const char *password,
366 krb_get_svc_in_tkt __P((
376 krb_get_tf_fullname __P((
383 krb_get_tf_realm __P((
387 void KRB_LIB_FUNCTION
388 krb_kdctimeofday __P((struct timeval *tv));
402 char * KRB_LIB_FUNCTION
403 krb_life_to_atime __P((int life));
405 u_int32_t KRB_LIB_FUNCTION
406 krb_life_to_time __P((
411 krb_lsb_antinet_ulong_cmp __P((
416 krb_lsb_antinet_ushort_cmp __P((
423 const char *instance,
426 const char *sinstance,
441 int32_t KRB_LIB_FUNCTION
447 int32_t KRB_LIB_FUNCTION
452 struct des_ks_struct *schedule,
454 struct sockaddr_in *sender,
455 struct sockaddr_in *receiver));
465 int32_t KRB_LIB_FUNCTION
471 struct sockaddr_in *sender,
472 struct sockaddr_in *receiver));
488 const char *fullname,
489 krb_principal *principal));
492 krb_put_address __P((
507 const char *instance,
525 int32_t KRB_LIB_FUNCTION
529 struct des_ks_struct *schedule,
531 struct sockaddr_in *sender,
532 struct sockaddr_in *receiver,
544 int32_t KRB_LIB_FUNCTION
549 struct sockaddr_in *sender,
550 struct sockaddr_in *receiver,
554 krb_realm_parse __P((
558 char * KRB_LIB_FUNCTION
559 krb_realmofhost __P((const char *host));
568 struct sockaddr_in *faddr,
569 struct sockaddr_in *laddr,
572 struct des_ks_struct *schedule,
586 struct des_ks_struct *schedule,
587 struct sockaddr_in *laddr,
588 struct sockaddr_in *faddr,
591 void KRB_LIB_FUNCTION
592 krb_set_kdc_time_diff __P((int diff));
600 krb_set_lifetime __P((int newval));
602 void KRB_LIB_FUNCTION
603 krb_set_tkt_string __P((const char *val));
605 const char * KRB_LIB_FUNCTION
606 krb_stime __P((time_t *t));
609 krb_time_to_life __P((
613 char * KRB_LIB_FUNCTION
614 krb_unparse_name __P((krb_principal *pr));
616 char * KRB_LIB_FUNCTION
617 krb_unparse_name_long __P((
622 char * KRB_LIB_FUNCTION
623 krb_unparse_name_long_r __P((
629 char * KRB_LIB_FUNCTION
630 krb_unparse_name_r __P((
635 krb_use_admin_server __P((int flag));
638 krb_verify_user __P((
647 krb_verify_user_srvtab __P((
661 u_int32_t KRB_LIB_FUNCTION
664 struct sockaddr_in *src,
665 struct sockaddr_in *dst));
667 const char * KRB_LIB_FUNCTION
668 month_sname __P((int n));
673 const char *instance,
679 passwd_to_afskey __P((
681 const char *instance,
689 const char *instance,
695 read_service_key __P((
704 save_credentials __P((
708 unsigned char *session,
712 int32_t issue_date));
723 char *instance, /* INOUT parameter */
728 void KRB_LIB_FUNCTION
729 tf_close __P((void));
732 tf_create __P((char *tf_name));
735 tf_get_cred __P((CREDENTIALS *c));
738 tf_get_cred_addr __P((char *realm, size_t realm_sz, struct in_addr *addr));
741 tf_get_pinst __P((char *inst));
744 tf_get_pname __P((char *p));
752 tf_put_pinst __P((const char *inst));
755 tf_put_pname __P((const char *p));
762 unsigned char *session,
766 u_int32_t issue_date));
777 struct in_addr *addr));
780 tf_store_addr __P((const char *realm, struct in_addr *addr));
782 char * KRB_LIB_FUNCTION
783 tkt_string __P((void));
786 krb_add_our_ip_for_realm __P((const char *user, const char *instance,
787 const char *realm, const char *password));
789 #endif /* __krb_protos_h__ */