/*
*
* Copyright 1991 by the Massachusetts Institute of Technology.
* All Rights Reserved.
*
* Export of this software from the United States of America may
* require a specific license from the United States Government.
* It is the responsibility of any person or organization contemplating
* export to obtain such a license before exporting.
*
* WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
* distribute this software and its documentation for any purpose and
* without fee is hereby granted, provided that the above copyright
* notice appear in all copies and that both that copyright notice and
* this permission notice appear in supporting documentation, and that
* the name of M.I.T. not be used in advertising or publicity pertaining
* to distribution of the software without specific, written prior
* permission. Furthermore if you modify this software you must label
* your software as modified software and not distribute it in such a
* fashion that it might be confused with the original M.I.T. software.
* M.I.T. makes no representations about the suitability of
* this software for any purpose. It is provided "as is" without express
* or implied warranty.
*
*
* Replay lookaside cache for the KDC, to avoid extra work.
*
*/
#include "k5-int.h"
#include "kdc_util.h"
#include "extern.h"
#ifndef NOCACHE
typedef struct _krb5_kdc_replay_ent {
int num_hits;
static int hits = 0;
static int calls = 0;
static int max_hits_per_entry = 0;
static int num_entries = 0;
/* XXX
Todo: quench the size of the queue...
*/
/* return TRUE if outpkt is filled in with a packet to reply with,
FALSE if the caller should do the work */
{
return FALSE;
calls++;
/* search for a replay entry in the queue, possibly removing
stale entries while we're here */
eptr;
hits++;
return FALSE;
else
return TRUE;
/* return here, don't bother flushing even if it is stale.
if we just matched, we may get another retransmit... */
}
/* flush it and collect stats */
} else {
/* this isn't it, just move along */
}
}
}
return FALSE;
}
/* insert a request & reply into the lookaside queue. assumes it's not
already there, and can fail softly due to other weird errors. */
void
{
return;
/* this is a new entry */
if (!eptr)
return;
/*
* This is going to hurt a lot malloc()-wise due to the need to
* allocate memory for the krb5_data and krb5_address elements.
* ARGH!
*/
return;
}
return;
}
num_entries++;
return;
}
/* frees memory associated with the lookaside queue for memory profiling */
void
{
}
}
}
#endif /* NOCACHE */