1 /*
2  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
3  * Use is subject to license terms.
4  */
5 
6 #ifndef	_KRB5_RC_MEM_H
7 #define	_KRB5_RC_MEM_H
8 
9 #pragma ident	"%Z%%M%	%I%	%E% SMI"
10 
11 #include "rc-int.h"
12 
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
16 
17 /*
18  * mech_krb5/krb5/rcache/rc_mem.h
19  *
20  * This file of the Kerberos V5 software is derived from public-domain code
21  * contributed by Daniel J. Bernstein, <brnstnd@acf10.nyu.edu>.
22  */
23 
24 /*
25  * Solaris Kerberos:
26  * Declarations for the memory replay cache implementation.
27  */
28 
29 struct mem_data {
30 	char *name;
31 	krb5_deltat lifespan;
32 	int hsize;
33 	struct authlist **h;
34 };
35 
36 struct global_rcache {
37 	k5_mutex_t lock;
38 	struct mem_data *data;
39 };
40 
41 extern struct global_rcache grcache;
42 
43 extern krb5_rc_ops krb5_rc_mem_ops;
44 
45 krb5_error_code KRB5_CALLCONV krb5_rc_mem_init
46 	(krb5_context, krb5_rcache, krb5_deltat);
47 krb5_error_code KRB5_CALLCONV krb5_rc_mem_recover
48 	(krb5_context, krb5_rcache);
49 krb5_error_code KRB5_CALLCONV krb5_rc_mem_recover_or_init
50 	(krb5_context, krb5_rcache, krb5_deltat);
51 krb5_error_code KRB5_CALLCONV krb5_rc_mem_destroy
52 	(krb5_context, krb5_rcache);
53 krb5_error_code KRB5_CALLCONV krb5_rc_mem_close
54 	(krb5_context, krb5_rcache);
55 krb5_error_code KRB5_CALLCONV krb5_rc_mem_store
56 	(krb5_context, krb5_rcache, krb5_donot_replay *);
57 krb5_error_code KRB5_CALLCONV krb5_rc_mem_expunge
58 	(krb5_context, krb5_rcache);
59 krb5_error_code KRB5_CALLCONV krb5_rc_mem_get_span
60 	(krb5_context, krb5_rcache, krb5_deltat *);
61 char *KRB5_CALLCONV krb5_rc_mem_get_name
62 	(krb5_context, krb5_rcache);
63 krb5_error_code KRB5_CALLCONV krb5_rc_mem_resolve
64 	(krb5_context, krb5_rcache, char *);
65 void krb5_rc_free_entry
66 	(krb5_context, krb5_donot_replay **);
67 
68 #ifdef __cplusplus
69 }
70 #endif
71 
72 #endif /* !_KRB5_RC_MEM_H */
73