32 RCSIDH(lib_bio_dedup_h,
"$Id: 56f6a2bcd2b6ffceda8078890a81606720dd37b9 $")
34 #include <freeradius-devel/util/event.h>
44 #ifndef _BIO_DEDUP_PRIVATE
ssize_t fr_bio_dedup_respond(fr_bio_t *bio, fr_bio_dedup_entry_t *item)
Resend a reply when we receive a duplicate request.
void * uctx
user-writable context
void(* fr_bio_dedup_release_t)(fr_bio_t *bio, fr_bio_dedup_entry_t *dedup_ctx, fr_bio_dedup_release_reason_t reason)
Callback on release the packet (timeout, or cancelled by the application)
fr_event_list_t * el
event list
fr_bio_t * fr_bio_dedup_alloc(TALLOC_CTX *ctx, size_t max_saved, fr_bio_dedup_receive_t receive, fr_bio_dedup_release_t release, fr_bio_dedup_get_item_t get_item, fr_bio_dedup_config_t const *cfg, fr_bio_t *next))
Allocate a fr_bio_dedup_t.
fr_time_delta_t lifetime
default lifetime of dedup entry
void fr_bio_dedup_entry_cancel(fr_bio_t *bio, fr_bio_dedup_entry_t *dedup_ctx)
Cancel one item.
size_t packet_size
size of the cached packet data
int fr_bio_dedup_entry_extend(fr_bio_t *bio, fr_bio_dedup_entry_t *dedup_ctx, fr_time_t expires)
Extend the expiry time for an entry.
void * packet_ctx
packet_ctx for dedup purposes
uint8_t * reply
reply cached by the application
size_t reply_size
size of the cached reply
void * reply_ctx
reply ctx
uint8_t * packet
cached packet data for finding duplicates
fr_bio_dedup_entry_t *(* fr_bio_dedup_get_item_t)(fr_bio_t *bio, void *packet_ctx)
fr_rb_node_t dedup
user managed dedup node
bool(* fr_bio_dedup_receive_t)(fr_bio_t *bio, fr_bio_dedup_entry_t *dedup_ctx, void *packet_ctx)
Callback on read to see if we should receive the packet.
fr_bio_dedup_release_reason_t
@ FR_BIO_DEDUP_WRITE_ERROR
@ FR_BIO_DEDUP_INTERNAL_ERROR
Stores all information relating to an event list.
A time delta, a difference in time measured in nanoseconds.