* This should be used to add any additional I/O events for the file descriptor
* to call other code if it becomes readable or writable.
*
- * @param[in] fd That was successfully opened.
* @param[in] el to use for inserting I/O events.
+ * @param[in] fd That was successfully opened.
* @param[in] uctx User context.
* @return
* - #FR_CONNECTION_STATE_CONNECTED if the file descriptor is useable.
* - #FR_CONNECTION_STATE_FAILED if the file descriptor is unusable.
*/
-typedef fr_connection_state_t (*fr_connection_open_t)(int fd, fr_event_list_t *el, void *uctx);
+typedef fr_connection_state_t (*fr_connection_open_t)(fr_event_list_t *el, int fd, void *uctx);
/** Notification that a connection attempt has failed
*
fr_event_timer_delete(conn->el, &conn->connection_timer);
fr_event_fd_delete(conn->el, conn->fd);
- ret = conn->open(conn->fd, conn->el, conn->uctx);
+ ret = conn->open(conn->el, conn->fd, conn->uctx);
switch (ret) {
case FR_CONNECTION_STATE_CONNECTED:
DEBUG2("Connection established");
/** Process notification that fd is open
*
*/
-static fr_connection_state_t mod_radius_conn_open(int fd, fr_event_list_t *el, void *uctx)
+static fr_connection_state_t mod_radius_conn_open(fr_event_list_t *el, int fd, void *uctx)
{
rlm_radius_connection_t *c = talloc_get_type_abort(uctx, rlm_radius_connection_t);
rlm_radius_thread_t *t = c->thread;
/*
* Tell the underlying transport that it's now open.
*/
- state = inst->client_io->open(fd, el, c->client_io_ctx);
+ state = inst->client_io->open(el, fd, c->client_io_ctx);
if (state != FR_CONNECTION_STATE_CONNECTED) {
return state;
}
#include "rlm_radius.h"
typedef struct rlm_radius_udp_t {
- fr_ipaddr_t dst_ipaddr; //!< IP of the home server
- fr_ipaddr_t src_ipaddr; //!< IP we open our socket on
- uint16_t dst_port; //!< port of the home server
- char const *secret; //!< shared secret
+ fr_ipaddr_t dst_ipaddr; //!< IP of the home server
+ fr_ipaddr_t src_ipaddr; //!< IP we open our socket on
+ uint16_t dst_port; //!< port of the home server
+ char const *secret; //!< shared secret
- char const *interface; //!< Interface to bind to.
+ char const *interface; //!< Interface to bind to.
- uint32_t recv_buff; //!< How big the kernel's receive buffer should be.
- uint32_t send_buff; //!< How big the kernel's send buffer should be.
+ uint32_t recv_buff; //!< How big the kernel's receive buffer should be.
+ uint32_t send_buff; //!< How big the kernel's send buffer should be.
- uint32_t max_packet_size; //!< maximum packet size
+ uint32_t max_packet_size; //!< maximum packet size
- bool recv_buff_is_set; //!< Whether we were provided with a recv_buf
- bool send_buff_is_set; //!< Whether we were provided with a send_buf
+ bool recv_buff_is_set; //!< Whether we were provided with a recv_buf
+ bool send_buff_is_set; //!< Whether we were provided with a send_buf
- bool dst_ipaddr_is_set; //!< ipaddr config item is set.
- bool dst_ipv4addr_is_set; //!< ipv4addr config item is set.
- bool dst_ipv6addr_is_set; //!< ipv6addr config item is set.
+ bool dst_ipaddr_is_set; //!< ipaddr config item is set.
+ bool dst_ipv4addr_is_set; //!< ipv4addr config item is set.
+ bool dst_ipv6addr_is_set; //!< ipv6addr config item is set.
- bool src_ipaddr_is_set; //!< src_ipaddr config item is set.
- bool src_ipv4addr_is_set; //!< src_ipv4addr config item is set.
- bool src_ipv6addr_is_set; //!< src_ipv6addr config item is set.
+ bool src_ipaddr_is_set; //!< src_ipaddr config item is set.
+ bool src_ipv4addr_is_set; //!< src_ipv4addr config item is set.
+ bool src_ipv6addr_is_set; //!< src_ipv6addr config item is set.
} rlm_radius_udp_t;
/** Do more setup once the connection has been opened
*
*/
-static fr_connection_state_t mod_open(UNUSED int fd, UNUSED fr_event_list_t *el, UNUSED void *io_ctx)
+static fr_connection_state_t mod_open(UNUSED fr_event_list_t *el, UNUSED int fd, UNUSED void *io_ctx)
{
// udp_io_ctx_t_t *io = talloc_get_type_abort(io_ctx, udp_io_ctx_t);