Listener ids.
More...
#include <freeradius-devel/io/listen.h>
#include <freeradius-devel/util/debug.h>
#include <freeradius-devel/util/rb.h>
#include <pthread.h>
Go to the source code of this file.
|
| static int | _listen_free (fr_listen_t *listen) |
| | Take a listener out of the table, as it is being freed.
|
| |
| int | fr_io_listen_free (fr_listen_instance_t *li) |
| | Free a socket's thread instance along with it.
|
| |
| fr_listen_t * | fr_listen_alloc (TALLOC_CTX *ctx, CONF_SECTION *listen_cs, CONF_SECTION *server_cs, fr_app_t const *app, void const *app_instance, fr_app_io_t const *app_io, void const *app_io_instance) |
| | Allocate a listener, and give it its id.
|
| |
| fr_listen_t * | fr_listen_by_id (uint32_t id) |
| | Find a listener by its id.
|
| |
| fr_listen_instance_t * | fr_listen_instance_alloc (TALLOC_CTX *ctx, fr_listen_t *listen) |
| | Allocate a socket of a listener.
|
| |
| static void | listen_by_id_init (void) |
| |
| static fr_cmp_ret_t | listen_id_cmp (void const *one, void const *two) |
| |
Listener ids.
- Id
- ec6b4205d319c3b7557436c0c96477806c617a69
- Copyright
- 2026 Arran Cudbard-Bell (a.cud.nosp@m.bard.nosp@m.b@fre.nosp@m.erad.nosp@m.ius.o.nosp@m.rg)
Definition in file listen.c.
◆ _listen_free()
Take a listener out of the table, as it is being freed.
The id itself is not reused: the counter only goes up.
Definition at line 60 of file listen.c.
◆ fr_io_listen_free()
Free a socket's thread instance along with it.
For sockets whose thread instance is not a talloc child of the socket. Set as the destructor by whoever made the socket.
Definition at line 126 of file listen.c.
◆ fr_listen_alloc()
Allocate a listener, and give it its id.
- Parameters
-
| [in] | ctx | to allocate the listener in. |
| [in] | listen_cs | the listen section it came from. |
| [in] | server_cs | the virtual server it is bound to. |
| [in] | app | the application it belongs to, which encodes and decodes. |
| [in] | app_instance | the application's instance data. |
| [in] | app_io | the I/O path, which reads and writes. |
| [in] | app_io_instance | the I/O path's instance data. |
- Returns
- the listener.
Definition at line 78 of file listen.c.
◆ fr_listen_by_id()
Find a listener by its id.
- Parameters
-
- Returns
- NULL if no listener has that id.
- the listener otherwise.
Definition at line 141 of file listen.c.
◆ fr_listen_instance_alloc()
Allocate a socket of a listener.
- Parameters
-
| [in] | ctx | to allocate the socket in. |
| [in] | listen | it is a socket of. |
- Returns
- the socket.
Definition at line 111 of file listen.c.
◆ listen_by_id_init()
| static void listen_by_id_init |
( |
void |
| ) |
|
|
static |
◆ listen_id_cmp()
| static fr_cmp_ret_t listen_id_cmp |
( |
void const * |
one, |
|
|
void const * |
two |
|
) |
| |
|
static |
◆ listen_by_id
◆ listen_by_id_once
| pthread_once_t listen_by_id_once = PTHREAD_ONCE_INIT |
|
static |
◆ listen_next_id