MeterLogger
|
Go to the source code of this file.
Data Structures | |
struct | dhcps_state |
struct | dhcps_msg |
struct | dhcps_pool |
struct | _list_node |
Typedefs | |
typedef struct dhcps_state | dhcps_state |
typedef struct dhcps_msg | dhcps_msg |
typedef struct _list_node | list_node |
Functions | |
void | dhcps_start (struct ip_info *info) |
void | dhcps_stop (void) |
void | dhcps_set_DNS (struct ip_addr *dns_ip) ICACHE_FLASH_ATTR |
struct dhcps_pool * | dhcps_get_mapping (uint16_t no) ICACHE_FLASH_ATTR |
void | dhcps_set_mapping (struct ip_addr *addr, uint8 *mac, uint32 lease_time) ICACHE_FLASH_ATTR |
Variables | |
uint32 | dhcps_lease_time |
#define BOOTP_BROADCAST 0x8000 |
Definition at line 53 of file dhcpserver.h.
Referenced by create_msg().
#define DHCP_HLEN_ETHERNET 6 |
Definition at line 58 of file dhcpserver.h.
#define DHCP_HTYPE_ETHERNET 1 |
Definition at line 57 of file dhcpserver.h.
Referenced by create_msg().
#define DHCP_MSG_LEN 236 |
Definition at line 59 of file dhcpserver.h.
#define DHCP_OPTION_BROADCAST_ADDRESS 28 |
Definition at line 81 of file dhcpserver.h.
Referenced by add_offer_options().
#define DHCP_OPTION_DNS_SERVER 6 |
Definition at line 74 of file dhcpserver.h.
Referenced by add_offer_options().
#define DHCP_OPTION_END 255 |
Definition at line 83 of file dhcpserver.h.
Referenced by add_end(), and parse_options().
#define DHCP_OPTION_INTERFACE_MTU 26 |
Definition at line 79 of file dhcpserver.h.
Referenced by add_offer_options().
#define DHCP_OPTION_LEASE_TIME 51 |
Definition at line 76 of file dhcpserver.h.
Referenced by add_offer_options().
#define DHCP_OPTION_MSG_TYPE 53 |
Definition at line 77 of file dhcpserver.h.
Referenced by add_msg_type(), and parse_options().
#define DHCP_OPTION_PERFORM_ROUTER_DISCOVERY 31 |
Definition at line 80 of file dhcpserver.h.
Referenced by add_offer_options().
#define DHCP_OPTION_REQ_IPADDR 50 |
Definition at line 75 of file dhcpserver.h.
Referenced by parse_options().
#define DHCP_OPTION_REQ_LIST 55 |
Definition at line 82 of file dhcpserver.h.
#define DHCP_OPTION_ROUTER 3 |
Definition at line 73 of file dhcpserver.h.
Referenced by add_offer_options().
#define DHCP_OPTION_SERVER_ID 54 |
Definition at line 78 of file dhcpserver.h.
Referenced by add_offer_options().
#define DHCP_OPTION_SUBNET_MASK 1 |
Definition at line 72 of file dhcpserver.h.
Referenced by add_offer_options().
#define DHCP_REPLY 2 |
Definition at line 56 of file dhcpserver.h.
Referenced by create_msg().
#define DHCP_REQUEST 1 |
Definition at line 55 of file dhcpserver.h.
#define DHCPACK 5 |
Definition at line 68 of file dhcpserver.h.
Referenced by send_ack().
#define DHCPDECLINE 4 |
Definition at line 67 of file dhcpserver.h.
Referenced by parse_options().
#define DHCPDISCOVER 1 |
Definition at line 64 of file dhcpserver.h.
Referenced by parse_options().
#define DHCPNAK 6 |
Definition at line 69 of file dhcpserver.h.
Referenced by send_nak().
#define DHCPOFFER 2 |
Definition at line 65 of file dhcpserver.h.
Referenced by send_offer().
#define DHCPRELEASE 7 |
Definition at line 70 of file dhcpserver.h.
Referenced by parse_options().
#define DHCPREQUEST 3 |
Definition at line 66 of file dhcpserver.h.
Referenced by parse_options().
#define DHCPS_CLIENT_PORT 68 |
Definition at line 62 of file dhcpserver.h.
Referenced by send_ack(), send_nak(), and send_offer().
#define DHCPS_DEBUG 0 |
Definition at line 86 of file dhcpserver.h.
#define DHCPS_LEASE_TIMER dhcps_lease_time |
Definition at line 51 of file dhcpserver.h.
Referenced by add_offer_options(), and parse_msg().
#define DHCPS_MAX_LEASE 0x64 |
Definition at line 52 of file dhcpserver.h.
Referenced by wifi_softap_init_dhcps_lease(), and wifi_softap_set_dhcps_lease().
#define dhcps_router_enabled | ( | offer | ) | ((offer & OFFER_ROUTER) != 0) |
Definition at line 96 of file dhcpserver.h.
Referenced by add_offer_options().
#define DHCPS_SERVER_PORT 67 |
Definition at line 61 of file dhcpserver.h.
Referenced by dhcps_start().
#define DHCPS_STATE_ACK 3 |
Definition at line 91 of file dhcpserver.h.
Referenced by handle_dhcp(), and parse_options().
#define DHCPS_STATE_DECLINE 2 |
Definition at line 90 of file dhcpserver.h.
#define DHCPS_STATE_IDLE 5 |
Definition at line 93 of file dhcpserver.h.
Referenced by parse_options().
#define DHCPS_STATE_NAK 4 |
Definition at line 92 of file dhcpserver.h.
Referenced by handle_dhcp(), and parse_options().
#define DHCPS_STATE_OFFER 1 |
Definition at line 89 of file dhcpserver.h.
Referenced by handle_dhcp(), and parse_options().
#define DHCPS_STATE_RELEASE 6 |
Definition at line 94 of file dhcpserver.h.
Referenced by parse_msg(), and parse_options().
#define MAX_STATION_NUM 8 |
Definition at line 87 of file dhcpserver.h.
Referenced by dhcps_coarse_tmr().
#define USE_DNS |
Definition at line 4 of file dhcpserver.h.
typedef struct dhcps_state dhcps_state |
typedef struct _list_node list_node |
struct dhcps_pool* dhcps_get_mapping | ( | uint16_t | no | ) |
Definition at line 1160 of file dhcpserver.c.
References NULL, _list_node::pnext, and _list_node::pnode.
void dhcps_set_DNS | ( | struct ip_addr * | dns_ip | ) |
Definition at line 1155 of file dhcpserver.c.
References dns_ip.
Referenced by wifi_softap_ip_config().
Definition at line 1170 of file dhcpserver.c.
References ip_addr::addr, dhcps_pool::ip, dhcps_pool::lease_timer, dhcps_pool::mac, node_insert_to_list(), NULL, os_memcpy, os_zalloc, _list_node::pnext, and _list_node::pnode.
void dhcps_start | ( | struct ip_info * | info | ) |
Definition at line 886 of file dhcpserver.c.
References ip_addr::addr, broadcast_dhcps, client_address_plus, DHCPS_SERVER_PORT, eagle_lwip_getif(), handle_dhcp(), ip_info::ip, IP4_ADDR, NULL, os_printf, pcb_dhcps, server_address, dhcps_lease::start_ip, and wifi_softap_init_dhcps_lease().
void dhcps_stop | ( | void | ) |
Definition at line 919 of file dhcpserver.c.
References eagle_lwip_getif(), node_remove_from_list(), NULL, os_free, pcb_dhcps, plist, _list_node::pnext, and _list_node::pnode.
uint32 dhcps_lease_time |
Definition at line 38 of file dhcpserver.c.
Referenced by wifi_softap_get_dhcps_lease_time(), wifi_softap_reset_dhcps_lease_time(), and wifi_softap_set_dhcps_lease_time().