26 RCSIDH(network_h,
"$Id: 89545a6bcac09bdd98a7a59b50aab282ac656ced $")
38 #include <freeradius-devel/io/worker.h>
39 #include <freeradius-devel/util/log.h>
static int const char char buffer[256]
fr_cmd_table_t cmd_network_table[]
size_t fr_network_listen_outstanding(fr_network_t *nr, fr_listen_t *li)
Get the number of outstanding packets.
int fr_network_listen_add(fr_network_t *nr, fr_listen_t *li)
Add a fr_listen_t to a network.
int fr_network_worker_add(fr_network_t *nr, fr_worker_t *worker)
Add a worker to a network in a different thread.
fr_network_t * fr_network_create(TALLOC_CTX *ctx, fr_event_list_t *el, char const *nr, fr_log_t const *logger, fr_log_lvl_t lvl, fr_network_config_t const *config))
Create a network.
int fr_network_destroy(fr_network_t *nr)
Stop a network thread in an orderly way.
int fr_network_directory_add(fr_network_t *nr, fr_listen_t *li)
Add a "watch directory" call to a network.
void fr_network(fr_network_t *nr)
The main network worker function.
int fr_network_listen_delete(fr_network_t *nr, fr_listen_t *li)
Delete a socket from a network.
void fr_network_worker_add_self(fr_network_t *nr, fr_worker_t *worker)
Add a worker to a network in the same thread.
int fr_network_sendto_worker(fr_network_t *nr, fr_listen_t *li, void *packet_ctx, uint8_t const *data, size_t data_len, fr_time_t recv_time)
int fr_network_exit(fr_network_t *nr)
Signal a network thread to exit.
int fr_network_listen_inject(fr_network_t *nr, fr_listen_t *li, uint8_t const *packet, size_t packet_len, fr_time_t recv_time)
Inject a packet for a listener to read.
int fr_network_listen_send_packet(fr_network_t *nr, fr_listen_t *parent, fr_listen_t *li, const uint8_t *buffer, size_t buflen, fr_time_t recv_time, void *packet_ctx))
Send a packet to the worker.
void fr_network_stats_log(fr_network_t const *nr, fr_log_t const *log)
int fr_network_stats(fr_network_t const *nr, int num, uint64_t *stats)
void fr_network_listen_read(fr_network_t *nr, fr_listen_t *li)
Signal the network to read from a listener.
void fr_network_listen_write(fr_network_t *nr, fr_listen_t *li, uint8_t const *packet, size_t packet_len, void *packet_ctx, fr_time_t request_time)
Inject a packet for a listener to write.
Stores all information relating to an event list.
static const conf_parser_t config[]
static fr_event_list_t * el
A worker which takes packets from a master, and processes them.