26 RCSIDH(io_h,
"$Id: 3f474654c8765c470f1a7e26ce285ef2033e0472 $")
28 #include <freeradius-devel/io/channel.h>
29 #include <freeradius-devel/server/request.h>
30 #include <freeradius-devel/util/socket.h>
31 #include <freeradius-devel/util/time.h>
32 #include <freeradius-devel/util/talloc.h>
149 uint8_t *reply,
size_t reply_len);
static int const char char buffer[256]
A full channel, which consists of two ends.
int(* fr_io_open_t)(fr_listen_t *li)
Open an I/O path.
ssize_t(* fr_io_data_read_t)(fr_listen_t *li, void **packet_ctx, fr_time_t *recv_time, uint8_t *buffer, size_t buffer_len, size_t *leftover)
Read from a socket.
fr_socket_t socket
src/dst ip and port.
int(* fr_io_track_cmp_t)(void const *instance, void *thread_instance, fr_client_t *client, void const *one, void const *two)
Compare two tracking structures for storing in a duplicate detection tree.
void(* fr_io_data_vnode_t)(fr_listen_t *li, uint32_t fflags)
Tell the IO handler that a VNODE has changed.
int(* fr_io_decode_t)(void const *instance, request_t *request, uint8_t *const data, size_t data_len)
Decode a raw packet and convert it into a request.
ssize_t(* fr_io_data_write_t)(fr_listen_t *li, void *packet_ctx, fr_time_t request_time, uint8_t *buffer, size_t buffer_len, size_t written)
Write a socket.
int(* fr_io_set_fd_t)(fr_listen_t *li, int fd)
Set a selectable file descriptor for this I/O path.
int(* fr_io_connection_set_t)(fr_listen_t *li, fr_io_address_t *connection)
int(* fr_io_get_fd_t)(fr_listen_t const *li)
Return a selectable file descriptor for this I/O path.
size_t(* fr_io_nak_t)(fr_listen_t *li, void *packet_ctx, uint8_t *const packet, size_t packet_len, uint8_t *reply, size_t reply_len)
NAK a packet.
ssize_t(* fr_io_encode_t)(void const *instance, request_t *request, uint8_t *buffer, size_t buffer_len)
Encode data from a request_t into a raw packet.
int(* fr_io_data_inject_t)(fr_listen_t *li, uint8_t const *buffer, size_t buffer_len, fr_time_t recv_time)
Inject data into a socket.
void(* fr_io_network_get_t)(int *ipproto, bool *dynamic_clients, fr_trie_t const **trie, void *instance)
Callback to return network properties.
int(* fr_io_close_t)(fr_listen_t *li)
Handle a close on the socket.
int(* fr_io_signal_t)(fr_listen_t *li)
Handle an error on the socket.
fr_client_t const * radclient
old-style client definition
fr_ipaddr_t ipaddr
IPv4/IPv6 address of the host.
Describes a host allowed to send packets to the server.
uint8_t * packet
really a tracking structure, not a packet
fr_io_client_t * client
client handling this packet.
Holds information necessary for binding or connecting to a socket.