|  | The FreeRADIUS server $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
    | 
#include <freeradius-devel/io/worker.h>#include <freeradius-devel/util/log.h> Include dependency graph for network.h:
 Include dependency graph for network.h:Go to the source code of this file.
| Data Structures | |
| struct | fr_network_config_t | 
| Typedefs | |
| typedef struct fr_network_s | fr_network_t | 
| Functions | |
| void | fr_network (fr_network_t *nr) | 
| The main network worker function. | |
| 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. | |
| int | fr_network_exit (fr_network_t *nr) | 
| Signal a network thread to exit. | |
| int | fr_network_listen_add (fr_network_t *nr, fr_listen_t *li) | 
| Add a fr_listen_t to a network. | |
| int | fr_network_listen_delete (fr_network_t *nr, fr_listen_t *li) | 
| Delete a socket from a network. | |
| 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. | |
| size_t | fr_network_listen_outstanding (fr_network_t *nr, fr_listen_t *li) | 
| Get the number of outstanding packets. | |
| void | fr_network_listen_read (fr_network_t *nr, fr_listen_t *li) | 
| Signal the network to read from a listener. | |
| 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_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. | |
| 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_stats (fr_network_t const *nr, int num, uint64_t *stats) | 
| void | fr_network_stats_log (fr_network_t const *nr, fr_log_t const *log) | 
| int | fr_network_worker_add (fr_network_t *nr, fr_worker_t *worker) | 
| Add a worker to a network in a different thread. | |
| void | fr_network_worker_add_self (fr_network_t *nr, fr_worker_t *worker) | 
| Add a worker to a network in the same thread. | |
| Variables | |
| fr_cmd_table_t | cmd_network_table [] | 
| struct fr_network_config_t | 
| typedef struct fr_network_s fr_network_t | 
| void fr_network | ( | fr_network_t * | nr | ) | 
| fr_network_t * fr_network_create | ( | TALLOC_CTX * | ctx, | 
| fr_event_list_t * | el, | ||
| char const * | name, | ||
| fr_log_t const * | logger, | ||
| fr_log_lvl_t | lvl, | ||
| fr_network_config_t const * | config | ||
| ) | 
Create a network.
| [in] | ctx | The talloc ctx | 
| [in] | el | The event list | 
| [in] | name | Networker identifier. | 
| [in] | logger | The destination for all logging messages | 
| [in] | lvl | Log level | 
| [in] | config | configuration structure. | 
Definition at line 1903 of file network.c.
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| int fr_network_destroy | ( | fr_network_t * | nr | ) | 
| int fr_network_directory_add | ( | fr_network_t * | nr, | 
| fr_listen_t * | li | ||
| ) | 
| int fr_network_exit | ( | fr_network_t * | nr | ) | 
Signal a network thread to exit.
| [in] | nr | the network data structure to manage | 
Definition at line 1870 of file network.c.
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| int fr_network_listen_add | ( | fr_network_t * | nr, | 
| fr_listen_t * | li | ||
| ) | 
| int fr_network_listen_delete | ( | fr_network_t * | nr, | 
| fr_listen_t * | li | ||
| ) | 
| 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.
| nr | the network | 
| li | the listener where the packet is being injected | 
| packet | the packet to be injected | 
| packet_len | the length of the packet | 
| recv_time | when the packet was received. | 
Definition at line 410 of file network.c.
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| size_t fr_network_listen_outstanding | ( | fr_network_t * | nr, | 
| fr_listen_t * | li | ||
| ) | 
| void fr_network_listen_read | ( | fr_network_t * | nr, | 
| fr_listen_t * | li | ||
| ) | 
| 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.
MUST only be called from the network thread.
| nr | the network | 
| parent | the parent listener | 
| li | the listener that the packet was "read" from. Can be "parent" | 
| buffer | the packet to send | 
| buflen | size of the packet to send | 
| recv_time | of the packet | 
| packet_ctx | for the packet | 
Definition at line 781 of file network.c.
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| 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.
| nr | the network | 
| li | the listener where the packet is being injected | 
| packet | the packet to be written | 
| packet_len | the length of the packet | 
| packet_ctx | The packet context to write | 
| request_time | when the packet was received. | 
Definition at line 362 of file network.c.
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| 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_stats | ( | fr_network_t const * | nr, | 
| int | num, | ||
| uint64_t * | stats | ||
| ) | 
| void fr_network_stats_log | ( | fr_network_t const * | nr, | 
| fr_log_t const * | log | ||
| ) | 
| int fr_network_worker_add | ( | fr_network_t * | nr, | 
| fr_worker_t * | worker | ||
| ) | 
| void fr_network_worker_add_self | ( | fr_network_t * | nr, | 
| fr_worker_t * | worker | ||
| ) | 
| 
 | extern | 
 1.9.8
 1.9.8