From: Nick Porter Date: Mon, 3 Nov 2025 11:52:58 +0000 (+0000) Subject: Add an app IO callback to set the read / write hexdump option X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=262ffffe28529e4e2cd5a922af26ea957664483d;p=thirdparty%2Ffreeradius-server.git Add an app IO callback to set the read / write hexdump option --- diff --git a/src/lib/io/app_io.h b/src/lib/io/app_io.h index 16d0a9c7908..910736a031a 100644 --- a/src/lib/io/app_io.h +++ b/src/lib/io/app_io.h @@ -68,6 +68,7 @@ typedef struct { fr_io_network_get_t network_get; //!< get dynamic network information fr_io_client_find_t client_find; //!< find radclient fr_io_name_t get_name; //!< get the socket name + fr_io_hexdump_set_t hexdump_set; //!< set the hexdump options void *private; //!< any private APIs it needs to export. } fr_app_io_t; diff --git a/src/lib/io/base.h b/src/lib/io/base.h index 3f474654c87..70382e12264 100644 --- a/src/lib/io/base.h +++ b/src/lib/io/base.h @@ -344,6 +344,8 @@ typedef struct fr_client_s fr_client_t; typedef fr_client_t *(*fr_io_client_find_t)(fr_listen_t *li, fr_ipaddr_t const *ipaddr, int ipproto); +typedef void (*fr_io_hexdump_set_t)(fr_listen_t *li, void *inst); + /** Callback to return network properties * * @param[out] ipproto IP protocol (AF_INET or AF_INET6). diff --git a/src/lib/io/master.c b/src/lib/io/master.c index a4af92b29dd..2908d674417 100644 --- a/src/lib/io/master.c +++ b/src/lib/io/master.c @@ -3140,6 +3140,7 @@ int fr_master_io_listen(fr_io_instance_t *inst, fr_schedule_t *sc, li->thread_instance = thread; li->app_io_instance = inst; li->track_duplicates = inst->app_io->track_duplicates; + if (inst->app_io->hexdump_set) inst->app_io->hexdump_set(li, inst->app_io_instance); /* * The child listener points to the *actual* IO path.