rc_file.h revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* Copyright 2004 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* lib/krb5/rcache/rc_file.h
*
* This file of the Kerberos V5 software is derived from public-domain code
* contributed by Daniel J. Bernstein, <brnstnd@acf10.nyu.edu>.
*/
/*
* Declarations for the file replay cache implementation.
*/
#ifndef _KRB5_RC_FILE_H
#define _KRB5_RC_FILE_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
#include "rc_common.h"
#include "rc_io.h"
#ifndef EXCESSREPS
#define EXCESSREPS 30
#endif
/*
* The rcache will be automatically expunged when the number of expired
* krb5_donot_replays encountered incidentally in searching exceeds the number
* of live krb5_donot_replays by EXCESSREPS. With the defaults here, a typical
* cache might build up some 10K of expired krb5_donot_replays before an
* automatic expunge, with the waste basically independent of the number of
* stores per minute.
* The rcache will also automatically be expunged when it encounters more
* than EXCESSREPS expired entries when recovering a cache in
* file_recover.
*/
struct file_data {
char *name;
krb5_deltat lifespan;
int hsize;
int numhits;
int nummisses;
struct authlist **h;
struct authlist *a;
krb5_rc_iostuff d;
char recovering;
};
extern krb5_rc_ops krb5_rc_file_ops;
krb5_error_code KRB5_CALLCONV krb5_rc_file_init
PROTOTYPE((krb5_context,
krb5_rcache,
krb5_deltat));
krb5_error_code KRB5_CALLCONV krb5_rc_file_recover
PROTOTYPE((krb5_context,
krb5_rcache));
krb5_error_code KRB5_CALLCONV krb5_rc_file_destroy
PROTOTYPE((krb5_context,
krb5_rcache));
krb5_error_code KRB5_CALLCONV krb5_rc_file_close
PROTOTYPE((krb5_context,
krb5_rcache));
krb5_error_code KRB5_CALLCONV krb5_rc_file_store
PROTOTYPE((krb5_context,
krb5_rcache,
krb5_donot_replay *));
krb5_error_code KRB5_CALLCONV krb5_rc_file_expunge
PROTOTYPE((krb5_context,
krb5_rcache));
krb5_error_code KRB5_CALLCONV krb5_rc_file_get_span
PROTOTYPE((krb5_context,
krb5_rcache,
krb5_deltat *));
char * KRB5_CALLCONV krb5_rc_file_get_name
PROTOTYPE((krb5_context,
krb5_rcache));
krb5_error_code KRB5_CALLCONV krb5_rc_file_resolve
PROTOTYPE((krb5_context,
krb5_rcache,
char *));
krb5_error_code krb5_rc_file_close_no_free
PROTOTYPE((krb5_context,
krb5_rcache));
void krb5_rc_free_entry
PROTOTYPE((krb5_context,
krb5_donot_replay **));
#ifdef __cplusplus
}
#endif
#endif /* !_KRB5_RC_FILE_H */