Convert DEBUG_REFERRALS to TRACE_* framework
[krb5.git] / src / include / adm_proto.h
1 /* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */
2 /* include/adm_proto.h */
3 /*
4  * Copyright 1995, 2007,2008,2009 by the Massachusetts Institute of Technology.
5  * All Rights Reserved.
6  *
7  * Export of this software from the United States of America may
8  *   require a specific license from the United States Government.
9  *   It is the responsibility of any person or organization contemplating
10  *   export to obtain such a license before exporting.
11  *
12  * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
13  * distribute this software and its documentation for any purpose and
14  * without fee is hereby granted, provided that the above copyright
15  * notice appear in all copies and that both that copyright notice and
16  * this permission notice appear in supporting documentation, and that
17  * the name of M.I.T. not be used in advertising or publicity pertaining
18  * to distribution of the software without specific, written prior
19  * permission.  Furthermore if you modify this software you must label
20  * your software as modified software and not distribute it in such a
21  * fashion that it might be confused with the original M.I.T. software.
22  * M.I.T. makes no representations about the suitability of
23  * this software for any purpose.  It is provided "as is" without express
24  * or implied warranty.
25  */
26
27 #ifndef KRB5_ADM_PROTO_H__
28 #define KRB5_ADM_PROTO_H__
29
30 /*
31  * This is ugly, but avoids having to include k5-int or kdb.h for this.
32  */
33 #ifndef KRB5_KDB5__
34 struct _krb5_db_entry;
35 typedef struct _krb5_db_entry krb5_db_entry;
36 #endif  /* KRB5_KDB5__ */
37
38 /* Ditto for adm.h */
39
40 /*
41  * XXXX krb5_realm params is defined in two header files!!!!
42  * This really needs to be fixed!!!
43  */
44 #if !defined(KRB5_ADM_H__) && !defined(__KADM5_ADMIN_H__)
45 struct ___krb5_realm_params;
46 typedef struct ___krb5_realm_params krb5_realm_params;
47 #endif  /* KRB5_ADM_H__ */
48
49 #ifndef KRB5_KDB5__
50 struct ___krb5_key_salt_tuple;
51 typedef struct ___krb5_key_salt_tuple krb5_key_salt_tuple;
52 #endif  /* KRB5_KDB5__ */
53
54 /*
55  * Function prototypes.
56  */
57
58 /* logger.c */
59 krb5_error_code krb5_klog_init(krb5_context, char *, char *, krb5_boolean);
60 void krb5_klog_close(krb5_context);
61 int krb5_klog_syslog(int, const char *, ...)
62 #if !defined(__cplusplus) && (__GNUC__ > 2)
63     __attribute__((__format__(__printf__, 2, 3)))
64 #endif
65     ;
66 void krb5_klog_reopen (krb5_context);
67
68 /* alt_prof.c */
69 krb5_error_code krb5_aprof_init(char *, char *, krb5_pointer *);
70 krb5_error_code krb5_aprof_getvals(krb5_pointer, const char **, char ***);
71 krb5_error_code krb5_aprof_get_boolean(krb5_pointer, const char **, int,
72                                        krb5_boolean *);
73 krb5_error_code krb5_aprof_get_deltat(krb5_pointer, const char **,
74                                       krb5_boolean, krb5_deltat *);
75 krb5_error_code krb5_aprof_get_string(krb5_pointer, const char **,
76                                       krb5_boolean, char **);
77 krb5_error_code krb5_aprof_get_string_all(krb5_pointer, const char **,
78                                           char **);
79 krb5_error_code krb5_aprof_get_int32(krb5_pointer, const char **,
80                                      krb5_boolean, krb5_int32 *);
81 krb5_error_code krb5_aprof_finish(krb5_pointer);
82
83 krb5_error_code krb5_read_realm_params(krb5_context, char *,
84                                        krb5_realm_params **);
85 krb5_error_code krb5_free_realm_params(krb5_context, krb5_realm_params *);
86 krb5_boolean krb5_match_config_pattern(const char *, const char *);
87
88 /* str_conv.c */
89 krb5_error_code krb5_string_to_flags(char *, const char *, const char *,
90                                      krb5_flags *);
91 krb5_error_code krb5_flags_to_string(krb5_flags, const char *, char *, size_t);
92 krb5_error_code krb5_input_flag_to_string (int, char *, size_t);
93
94 /* keysalt.c */
95 krb5_boolean krb5_keysalt_is_present(krb5_key_salt_tuple *, krb5_int32,
96                                      krb5_enctype, krb5_int32);
97 krb5_error_code krb5_keysalt_iterate(krb5_key_salt_tuple *, krb5_int32,
98                                      krb5_boolean,
99                                      krb5_error_code (*)(krb5_key_salt_tuple *,
100                                                          krb5_pointer),
101                                      krb5_pointer);
102
103 krb5_error_code krb5_string_to_keysalts(char *, const char *, const char *,
104                                         krb5_boolean, krb5_key_salt_tuple **,
105                                         krb5_int32 *);
106 #endif  /* KRB5_ADM_PROTO_H__ */