30RCSIDH(lib_bio_protocol_h,
"$Id: 58cd02456522ff3b1f9b465afc43e133df91565e $")
32#include <freeradius-devel/util/talloc.h>
33#include <freeradius-devel/util/time.h>
34#include <freeradius-devel/util/misc.h>
35#include <freeradius-devel/util/pair.h>
65typedef void *(*fr_protocol_dedup_ctx_t)(TALLOC_CTX *ctx,
uint8_t const *packet,
size_t packet_len,
void *uctx);
82 uint8_t const *packet,
size_t packet_len,
83 uint8_t const *original,
size_t original_len,
void *uctx);
98 uint8_t const *original,
size_t original_len,
void *uctx);
static size_t min(size_t x, size_t y)
fr_cmp_ret_t(* fr_cmp_t)(void const *a, void const *b)
fr_bio_protocol_decode_t decode
decode a packet into pairs
char const * name
protocol name, e.g. "radius"
size_t min_packet_size
smallest valid packet
int(* fr_bio_protocol_validate_t)(void *uctx, size_t *want, uint8_t const *data, size_t data_len)
Check whether a packet is well-formed.
fr_cmp_t dedup_cmp
compare the dedup contexts of two fr_bio_dedup_entry_t
size_t max_packet_size
largest valid packet
fr_cmp_t duplicate_cmp
0 if two entries with the same key hold the same packet
fr_bio_protocol_validate_t validate
check whether a packet is well-formed
fr_bio_protocol_encode_t encode
encode pairs into a packet
fr_protocol_dedup_ctx_t dedup_ctx
create the dedup context of a packet
ssize_t(* fr_bio_protocol_decode_t)(TALLOC_CTX *ctx, fr_pair_list_t *out, uint8_t const *packet, size_t packet_len, uint8_t const *original, size_t original_len, void *uctx)
Decode a packet into pairs.
void *(* fr_protocol_dedup_ctx_t)(TALLOC_CTX *ctx, uint8_t const *packet, size_t packet_len, void *uctx)
Create the dedup context of a packet.
ssize_t(* fr_bio_protocol_encode_t)(uint8_t *out, size_t outlen, fr_pair_list_t *list, uint8_t const *original, size_t original_len, void *uctx)
Encode pairs into a packet.
The settings and functions which define transport for a protocol.
A time delta, a difference in time measured in nanoseconds.
static fr_sbuff_err_t char size_t fr_sbuff_t size_t max
static fr_sbuff_err_t char ** out