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