]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Add an app IO callback to set the read / write hexdump option
authorNick Porter <nick@portercomputing.co.uk>
Mon, 3 Nov 2025 11:52:58 +0000 (11:52 +0000)
committerNick Porter <nick@portercomputing.co.uk>
Mon, 3 Nov 2025 11:56:10 +0000 (11:56 +0000)
src/lib/io/app_io.h
src/lib/io/base.h
src/lib/io/master.c

index 16d0a9c7908acf98ba574962ecf79249fde23316..910736a031acc96f4e40cd0664fda8132d7c5aa4 100644 (file)
@@ -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;
index 3f474654c8765c470f1a7e26ce285ef2033e0472..70382e122641bbdabe20d01e69b8b7e10b2c1ab9 100644 (file)
@@ -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).
index a4af92b29dd06576966257ef581463a29c1f2a4d..2908d6744173c5ec757684f50e6bfbe9b3cf742d 100644 (file)
@@ -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.