next up previous contents
Next: Per-type functions Up: Replay cache functions Previous: Replay cache functions   Contents

The krb5_rc_ops structure

In order to implement a new replay cache type, the programmer should declare a krb5_rc_ops structure, and fill in the elements of the structure appropriately, by implementing each of the replay cache functions for the new replay cache type.

The prefix element specifies the prefix bf name of the the new replay cache type. For example, if the prefix name is ``dfl'', then if the program calls krb5_rc_resolve with a credential cache name such as ``dfl:host'', then krb5_rc_resolve will call the resolve function (as defined by the krb5_rc_ops structure where the prefix element is ``dfl'') and pass it the argument ``host''.

Before a new replay cache type can be recognized by krb5_rc_resolve, it must be registered with the Kerberos library by calling krb5_rc_register.

typedef struct _krb5_rc_ops {
    char *type;
    krb5_error_code (*init)((krb5_rcache,krb5_deltat));
    krb5_error_code (*recover)((krb5_rcache));
    krb5_error_code (*destroy)((krb5_rcache));
    krb5_error_code (*close)((krb5_rcache));
    krb5_error_code (*store)((krb5_rcache,krb5_donot_replay *));
    krb5_error_code (*expunge)((krb5_rcache));
    krb5_error_code (*get_span)((krb5_rcache,krb5_deltat *));
    char *(*get_name)((krb5_rcache));
    krb5_error_code (*resolve)((krb5_rcache, char *));
} krb5_rc_ops;



Autobuild 2006-06-16