26 #include <freeradius-devel/server/dl_module.h>
27 #include <freeradius-devel/util/value.h>
29 #define FR_PROTO_STACK_MAX 10
static int const char char buffer[256]
fr_proto_opt_app_t
Application options.
@ PROTO_OPT_PAIRS
Attribute Value Pairs belonging to the application.
fr_proto_opt_group_t
Option contexts.
@ PROTO_OPT_GROUP_L4
Generic layer 4 options.
@ PROTO_OPT_GROUP_APPLICATION
Generic application options.
@ PROTO_OPT_GROUP_L3
Generic layer 3 options.
@ PROTO_OPT_GROUP_L2
Generic layer 2 options.
@ PROTO_OPT_GROUP_CUSTOM
Custom options exported by the library.
void * proto_ctx
Packet ctx produced by the decoder, or populated for consumption by the encoder.
int opt_group
Option groups implemented by proto lib.
fr_proto_encode_t encode
Function to encode a protocol/header.
fr_proto_set_option_t set_option
Set data in the proto_ctx.
ssize_t(* fr_proto_decode_t)(void *proto_ctx, uint8_t const *data, size_t data_len)
Decode a packet header.
fr_proto_get_option_t get_option
Get data from the proto_ctx.
DL_MODULE_COMMON
Common fields to all loadable modules.
fr_proto_opt_l4_t
Layer 4 options, such as port number.
@ PROTO_OPT_L4_DST_PORT
Destination port.
@ PROTO_OPT_L4_PAYLOAD_LEN
The size of payload data.
@ PROTO_OPT_L4_SRC_PORT
Source port.
void(* fr_proto_invert_t)(void *proto_ctx)
Invert the src and address fields of a proto_ctx.
size_t proto_ctx_size
Size required for the packet ctx structure.
fr_proto_opt_l2_t
Layer 2 options such as Media addresses.
@ PROTO_OPT_L2_NEXT_PROTOCOL
Next protocol (if available).
@ PROTO_OPT_L2_SRC_ADDRESS
Source address.
@ PROTO_OPT_L2_DST_ADDRESS
Destination address.
@ PROTO_OPT_L2_PAYLOAD_LEN
ssize_t(* fr_proto_encode_t)(void *proto_ctx, uint8_t *buffer, size_t buffer_len)
Encode a packet header.
fr_proto_lib_t const * proto
Protocol library.
#define FR_PROTO_STACK_MAX
fr_proto_decode_t decode
Function to decode a protocol/header.
int(* fr_proto_set_option_t)(void *proto_ctx, fr_proto_opt_group_t opt_group, int opt, fr_value_box_t *in)
Set a protocol option.
int(* fr_proto_get_option_t)(fr_value_box_t *out, void const *proto_ctx, fr_proto_opt_group_t opt_group, int opt)
Retrieve a protocol option.
fr_proto_opt_l3_t
Layer 3 options, such as IP address.
@ PROTO_OPT_L3_NEXT_PROTOCOL
Next protocol (if available).
@ PROTO_OPT_L3_PAYLOAD_LEN
The size of payload data.
@ PROTO_OPT_L3_SRC_ADDRESS
Source address.
@ PROTO_OPT_L3_DST_ADDRESS
Destination address.
The public structure exported by protocol encoding/decoding libraries.
A protocol transcoder stack frame.
Protocol transcoder stack.
static size_t char ** out