|  | The FreeRADIUS server $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
    | 
DHCPv4 handler for UDP. More...
#include <netdb.h>#include <freeradius-devel/arp/arp.h>#include <freeradius-devel/server/protocol.h>#include <freeradius-devel/util/udp.h>#include <freeradius-devel/util/trie.h>#include <freeradius-devel/io/application.h>#include <freeradius-devel/io/listen.h>#include <freeradius-devel/io/schedule.h>#include <freeradius-devel/protocol/dhcpv4/freeradius.internal.h>#include <freeradius-devel/util/pcap.h>#include "proto_dhcpv4.h" Include dependency graph for proto_dhcpv4_udp.c:
 Include dependency graph for proto_dhcpv4_udp.c:Go to the source code of this file.
| Data Structures | |
| struct | proto_dhcpv4_udp_t | 
| struct | proto_dhcpv4_udp_thread_t | 
| Macros | |
| #define | LOG_PREFIX "proto_dhcpv4_udp" | 
| Functions | |
| static fr_client_t * | mod_client_find (fr_listen_t *li, fr_ipaddr_t const *ipaddr, int ipproto) | 
| static int | mod_connection_set (fr_listen_t *li, fr_io_address_t *connection) | 
| static int | mod_fd_set (fr_listen_t *li, int fd) | 
| Set the file descriptor for this socket. | |
| static int | mod_instantiate (module_inst_ctx_t const *mctx) | 
| static char const * | mod_name (fr_listen_t *li) | 
| static void | mod_network_get (int *ipproto, bool *dynamic_clients, fr_trie_t const **trie, void *instance) | 
| static int | mod_open (fr_listen_t *li) | 
| Open a UDP listener for DHCPV4. | |
| static ssize_t | mod_read (fr_listen_t *li, void **packet_ctx, fr_time_t *recv_time_p, uint8_t *buffer, size_t buffer_len, size_t *leftover) | 
| static int | mod_track_compare (UNUSED void const *instance, UNUSED void *thread_instance, UNUSED fr_client_t *client, void const *one, void const *two) | 
| static void * | mod_track_create (UNUSED void const *instance, UNUSED void *thread_instance, UNUSED fr_client_t *client, fr_io_track_t *track, uint8_t const *packet, size_t packet_len) | 
| static ssize_t | mod_write (fr_listen_t *li, void *packet_ctx, UNUSED fr_time_t request_time, uint8_t *buffer, size_t buffer_len, UNUSED size_t written) | 
| Variables | |
| static fr_dict_attr_t const * | attr_dhcp_server_identifier | 
| static fr_dict_attr_t const * | attr_message_type | 
| static fr_dict_t const * | dict_dhcpv4 | 
| static const conf_parser_t | networks_config [] | 
| fr_app_io_t | proto_dhcpv4_udp | 
| fr_dict_autoload_t | proto_dhcpv4_udp_dict [] | 
| fr_dict_attr_autoload_t | proto_dhcpv4_udp_dict_attr [] | 
| static const conf_parser_t | udp_listen_config [] | 
DHCPv4 handler for UDP.
Definition in file proto_dhcpv4_udp.c.
| struct proto_dhcpv4_udp_t | 
Definition at line 62 of file proto_dhcpv4_udp.c.
 Collaboration diagram for proto_dhcpv4_udp_t:
 Collaboration diagram for proto_dhcpv4_udp_t:| Data Fields | ||
|---|---|---|
| fr_ipaddr_t * | allow | allowed networks for dynamic clients | 
| bool | broadcast | whether we listen for broadcast packets | 
| uint16_t | client_port | Client port to reply to. | 
| fr_client_list_t * | clients | local clients | 
| CONF_SECTION * | cs | our configuration | 
| fr_client_t * | default_client | default 0/0 client | 
| fr_ipaddr_t * | deny | denied networks for dynamic clients | 
| bool | dynamic_clients | whether we have dynamic clients | 
| char const * | interface | Interface to bind to. | 
| fr_ipaddr_t | ipaddr | IP address to listen on. | 
| uint32_t | max_attributes | Limit maximum decodable attributes. | 
| uint32_t | max_packet_size | for message ring buffer. | 
| uint16_t | port | Port to listen on. | 
| char const * | port_name | Name of the port for getservent(). | 
| uint32_t | recv_buff | How big the kernel's receive buffer should be. | 
| bool | recv_buff_is_set | Whether we were provided with a receive buffer value. | 
| fr_ipaddr_t | src_ipaddr | IP address to source replies. | 
| fr_trie_t * | trie | for parsed networks | 
| struct proto_dhcpv4_udp_thread_t | 
Definition at line 49 of file proto_dhcpv4_udp.c.
 Collaboration diagram for proto_dhcpv4_udp_thread_t:
 Collaboration diagram for proto_dhcpv4_udp_thread_t:| Data Fields | ||
|---|---|---|
| fr_io_address_t * | connection | for connected sockets. | 
| char const * | name | socket name | 
| int | sockfd | |
| fr_stats_t | stats | statistics for this socket | 
| #define LOG_PREFIX "proto_dhcpv4_udp" | 
Definition at line 25 of file proto_dhcpv4_udp.c.
| 
 | static | 
| 
 | static | 
Definition at line 640 of file proto_dhcpv4_udp.c.
| 
 | static | 
Set the file descriptor for this socket.
Definition at line 757 of file proto_dhcpv4_udp.c.
 Here is the call graph for this function:
 Here is the call graph for this function:| 
 | static | 
| 
 | static | 
Definition at line 842 of file proto_dhcpv4_udp.c.
| 
 | static | 
Definition at line 649 of file proto_dhcpv4_udp.c.
| 
 | static | 
Open a UDP listener for DHCPV4.
Definition at line 662 of file proto_dhcpv4_udp.c.
 Here is the call graph for this function:
 Here is the call graph for this function:| 
 | static | 
Definition at line 813 of file proto_dhcpv4_udp.c.
| 
 | static | 
| 
 | static | 
Definition at line 143 of file proto_dhcpv4_udp.c.
| 
 | static | 
Definition at line 142 of file proto_dhcpv4_udp.c.
| 
 | static | 
Definition at line 134 of file proto_dhcpv4_udp.c.
| 
 | static | 
Definition at line 99 of file proto_dhcpv4_udp.c.
| fr_app_io_t proto_dhcpv4_udp | 
Definition at line 1001 of file proto_dhcpv4_udp.c.
| fr_dict_autoload_t proto_dhcpv4_udp_dict | 
Definition at line 137 of file proto_dhcpv4_udp.c.
| fr_dict_attr_autoload_t proto_dhcpv4_udp_dict_attr | 
Definition at line 146 of file proto_dhcpv4_udp.c.
| 
 | static | 
Definition at line 107 of file proto_dhcpv4_udp.c.
 1.9.8
 1.9.8