17c478bdstevel@tonic-gate/*
2159d09aMark Phalan * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
37c478bdstevel@tonic-gate * Use is subject to license terms.
47c478bdstevel@tonic-gate */
57c478bdstevel@tonic-gate
67c478bdstevel@tonic-gate#ifndef	_KRB5_RC_MEM_H
77c478bdstevel@tonic-gate#define	_KRB5_RC_MEM_H
87c478bdstevel@tonic-gate
97c478bdstevel@tonic-gate
10505d05cgtb#include "rc-int.h"
11505d05cgtb
127c478bdstevel@tonic-gate#ifdef __cplusplus
137c478bdstevel@tonic-gateextern "C" {
147c478bdstevel@tonic-gate#endif
157c478bdstevel@tonic-gate
167c478bdstevel@tonic-gate/*
177c478bdstevel@tonic-gate * mech_krb5/krb5/rcache/rc_mem.h
187c478bdstevel@tonic-gate *
197c478bdstevel@tonic-gate * This file of the Kerberos V5 software is derived from public-domain code
207c478bdstevel@tonic-gate * contributed by Daniel J. Bernstein, <brnstnd@acf10.nyu.edu>.
217c478bdstevel@tonic-gate */
227c478bdstevel@tonic-gate
237c478bdstevel@tonic-gate/*
2465d0d3dsemery * Solaris Kerberos:
257c478bdstevel@tonic-gate * Declarations for the memory replay cache implementation.
267c478bdstevel@tonic-gate */
277c478bdstevel@tonic-gate
287c478bdstevel@tonic-gatestruct mem_data {
297c478bdstevel@tonic-gate	char *name;
307c478bdstevel@tonic-gate	krb5_deltat lifespan;
317c478bdstevel@tonic-gate	int hsize;
327c478bdstevel@tonic-gate	struct authlist **h;
337c478bdstevel@tonic-gate};
347c478bdstevel@tonic-gate
3565d0d3dsemerystruct global_rcache {
3665d0d3dsemery	k5_mutex_t lock;
3765d0d3dsemery	struct mem_data *data;
3865d0d3dsemery};
3965d0d3dsemery
4065d0d3dsemeryextern struct global_rcache grcache;
4165d0d3dsemery
42159d09aMark Phalanextern const krb5_rc_ops krb5_rc_mem_ops;
437c478bdstevel@tonic-gate
447c478bdstevel@tonic-gatekrb5_error_code KRB5_CALLCONV krb5_rc_mem_init
45505d05cgtb	(krb5_context, krb5_rcache, krb5_deltat);
467c478bdstevel@tonic-gatekrb5_error_code KRB5_CALLCONV krb5_rc_mem_recover
47505d05cgtb	(krb5_context, krb5_rcache);
48505d05cgtbkrb5_error_code KRB5_CALLCONV krb5_rc_mem_recover_or_init
49505d05cgtb	(krb5_context, krb5_rcache, krb5_deltat);
507c478bdstevel@tonic-gatekrb5_error_code KRB5_CALLCONV krb5_rc_mem_destroy
51505d05cgtb	(krb5_context, krb5_rcache);
527c478bdstevel@tonic-gatekrb5_error_code KRB5_CALLCONV krb5_rc_mem_close
53505d05cgtb	(krb5_context, krb5_rcache);
547c478bdstevel@tonic-gatekrb5_error_code KRB5_CALLCONV krb5_rc_mem_store
55505d05cgtb	(krb5_context, krb5_rcache, krb5_donot_replay *);
567c478bdstevel@tonic-gatekrb5_error_code KRB5_CALLCONV krb5_rc_mem_expunge
57505d05cgtb	(krb5_context, krb5_rcache);
587c478bdstevel@tonic-gatekrb5_error_code KRB5_CALLCONV krb5_rc_mem_get_span
59505d05cgtb	(krb5_context, krb5_rcache, krb5_deltat *);
607c478bdstevel@tonic-gatechar *KRB5_CALLCONV krb5_rc_mem_get_name
61505d05cgtb	(krb5_context, krb5_rcache);
627c478bdstevel@tonic-gatekrb5_error_code KRB5_CALLCONV krb5_rc_mem_resolve
63505d05cgtb	(krb5_context, krb5_rcache, char *);
647c478bdstevel@tonic-gatevoid krb5_rc_free_entry
65505d05cgtb	(krb5_context, krb5_donot_replay **);
667c478bdstevel@tonic-gate
677c478bdstevel@tonic-gate#ifdef __cplusplus
687c478bdstevel@tonic-gate}
697c478bdstevel@tonic-gate#endif
707c478bdstevel@tonic-gate
717c478bdstevel@tonic-gate#endif /* !_KRB5_RC_MEM_H */
72