MeterLogger
|
#include "lwip/netif.h"
#include "lwip/inet.h"
#include "netif/etharp.h"
#include "lwip/tcp.h"
#include "lwip/ip.h"
#include "lwip/init.h"
#include "ets_sys.h"
#include "os_type.h"
#include "lwip/mem.h"
#include "lwip/app/espconn_tcp.h"
#include "lwip/app/espconn_udp.h"
#include "lwip/app/espconn.h"
#include "user_interface.h"
Go to the source code of this file.
Variables | |
espconn_msg * | plink_active = NULL |
espconn_msg * | pserver_list = NULL |
remot_info | premot [linkMax] |
struct espconn_packet | pktinfo [2] |
sint8 ICACHE_FLASH_ATTR espconn_abort | ( | struct espconn * | espconn | ) |
Definition at line 972 of file espconn.c.
References ESPCONN_ARG, ESPCONN_CLOSE, espconn_find_connection(), ESPCONN_INPROGRESS, ESPCONN_OK, ESPCONN_TCP, espconn_tcp_disconnect(), ICACHE_FLASH_ATTR, NULL, and espconn::state.
Referenced by mqtt_tcpclient_delete().
sint8 ICACHE_FLASH_ATTR espconn_accept | ( | struct espconn * | espconn | ) |
Definition at line 875 of file espconn.c.
References ESPCONN_ARG, ESPCONN_ISCONN, ESPCONN_OK, ESPCONN_TCP, espconn_tcp_server(), _esp_tcp::local_port, NULL, _espconn_msg::pespconn, plist, _espconn_msg::pnext, espconn::proto, espconn::tcp, and espconn::type.
Referenced by httpdInit().
sint8 ICACHE_FLASH_ATTR espconn_clear_opt | ( | struct espconn * | espconn, |
uint8 | opt | ||
) |
Definition at line 1092 of file espconn.c.
References ESPCONN_ARG, espconn_delay_enabled, espconn_find_connection(), espconn_keepalive_disable, espconn_keepalive_enabled, ESPCONN_OK, _comon_pkt::espconn_opt, ESPCONN_TCP, NULL, _comon_pkt::pcb, _espconn_msg::pcommon, and espconn::type.
sint8 ICACHE_FLASH_ATTR espconn_connect | ( | struct espconn * | espconn | ) |
Definition at line 260 of file espconn.c.
References ip_addr::addr, AP_NETIF, ESPCONN_AP, ESPCONN_AP_STA, ESPCONN_ARG, espconn_get_acticve_num(), ESPCONN_ISCONN, ESPCONN_OK, espconn_printf, ESPCONN_RTE, ESPCONN_STA, ESPCONN_TCP, espconn_tcp_client(), espconn_tcp_get_max_con(), ICACHE_FLASH_ATTR, ip_info::ip, IP4_ADDR, _esp_tcp::local_port, NULL, _espconn_msg::pespconn, plist, _espconn_msg::pnext, espconn::proto, _esp_tcp::remote_ip, STA_NETIF, STATION_GOT_IP, STATION_IDLE, espconn::tcp, espconn::type, wifi_get_ip_info(), wifi_get_opmode(), and wifi_station_get_connect_status().
Referenced by MQTT_Connect(), and mqtt_dns_found().
void ICACHE_FLASH_ATTR espconn_copy_partial | ( | struct espconn * | pesp_dest, |
struct espconn * | pesp_source | ||
) |
Definition at line 46 of file espconn.c.
References _esp_tcp::connect_callback, _esp_tcp::disconnect_callback, ESPCONN_TCP, espconn::link_cnt, _esp_tcp::local_ip, _esp_udp::local_ip, _esp_tcp::local_port, _esp_udp::local_port, os_memcpy, espconn::proto, _esp_tcp::reconnect_callback, espconn::recv_callback, _esp_tcp::remote_ip, _esp_udp::remote_ip, _esp_tcp::remote_port, _esp_udp::remote_port, espconn::reverse, espconn::sent_callback, espconn::state, espconn::tcp, espconn::type, and espconn::udp.
Referenced by espconn_tcp_accept(), espconn_tcp_disconnect_successful(), and espconn_tcp_reconnect().
sint8 ICACHE_FLASH_ATTR espconn_create | ( | struct espconn * | espconn | ) |
Definition at line 334 of file espconn.c.
References ESPCONN_ARG, ESPCONN_ISCONN, ESPCONN_OK, ESPCONN_UDP, espconn_udp_server(), ICACHE_FLASH_ATTR, _esp_udp::local_port, NULL, _espconn_msg::pespconn, plist, _espconn_msg::pnext, espconn::proto, espconn::type, and espconn::udp.
Referenced by captdnsInit().
sint8 ICACHE_FLASH_ATTR espconn_delete | ( | struct espconn * | espconn | ) |
Definition at line 1217 of file espconn.c.
References ESPCONN_ARG, espconn_find_connection(), ESPCONN_OK, espconn_tcp_delete(), ESPCONN_UDP, espconn_udp_disconnect(), ICACHE_FLASH_ATTR, and NULL.
Referenced by captdnsStop(), httpdStop(), and mqtt_tcpclient_delete().
sint8 ICACHE_FLASH_ATTR espconn_disconnect | ( | struct espconn * | espconn | ) |
Definition at line 942 of file espconn.c.
References ESPCONN_ARG, ESPCONN_CLOSE, espconn_find_connection(), ESPCONN_INPROGRESS, ESPCONN_OK, ESPCONN_TCP, espconn_tcp_disconnect(), ICACHE_FLASH_ATTR, NULL, and espconn::state.
Referenced by httpdConnectCb(), httpdSentCb(), httpdStop(), MQTT_Task(), and mqtt_tcpclient_recv().
void ICACHE_FLASH_ATTR espconn_dns_setserver | ( | u8_t | numdns, |
ip_addr_t * | dnsserver | ||
) |
Definition at line 1302 of file espconn.c.
Referenced by wifi_softap_ip_config().
bool ICACHE_FLASH_ATTR espconn_find_connection | ( | struct espconn * | pespconn, |
espconn_msg ** | pnode | ||
) |
Definition at line 186 of file espconn.c.
References ip_addr::addr, ICACHE_FLASH_ATTR, IP4_ADDR, IPADDR_ANY, NULL, _espconn_msg::pcommon, _espconn_msg::pespconn, plist, _espconn_msg::pnext, espconn::proto, _esp_tcp::remote_ip, _comon_pkt::remote_ip, _esp_tcp::remote_port, _comon_pkt::remote_port, and espconn::tcp.
Referenced by espconn_abort(), espconn_clear_opt(), espconn_delete(), espconn_disconnect(), espconn_get_keepalive(), espconn_get_packet_info(), espconn_recv_hold(), espconn_recv_unhold(), espconn_regist_time(), espconn_sendto(), espconn_sent(), espconn_set_keepalive(), and espconn_set_opt().
|
static |
Definition at line 239 of file espconn.c.
References ICACHE_FLASH_ATTR, NULL, _espconn_msg::pespconn, plist, _espconn_msg::pnext, and espconn::type.
Referenced by espconn_connect().
sint8 ICACHE_FLASH_ATTR espconn_get_connection_info | ( | struct espconn * | pespconn, |
remot_info ** | pcon_info, | ||
uint8 | typeflags | ||
) |
Definition at line 825 of file espconn.c.
References ESPCONN_ARG, ESPCONN_OK, ESPCONN_TCP, ESPCONN_UDP, ICACHE_FLASH_ATTR, espconn::link_cnt, NULL, os_memcpy, os_memset, _espconn_msg::pcommon, _espconn_msg::pespconn, plink_active, plist, _espconn_msg::pnext, premot, _espconn_msg::preverse, _remot_info::remote_ip, _comon_pkt::remote_ip, _remot_info::remote_port, _comon_pkt::remote_port, _remot_info::state, espconn::state, and espconn::type.
Referenced by captdnsRecv(), espconn_tcp_accept(), and espconn_tcp_delete().
sint8 ICACHE_FLASH_ATTR espconn_get_keepalive | ( | struct espconn * | espconn, |
uint8 | level, | ||
void * | optarg | ||
) |
Definition at line 1173 of file espconn.c.
References ESPCONN_ARG, espconn_find_connection(), espconn_keepalive_disabled, ESPCONN_KEEPCNT, ESPCONN_KEEPIDLE, ESPCONN_KEEPINTVL, ESPCONN_OK, ESPCONN_TCP, ICACHE_FLASH_ATTR, NULL, _comon_pkt::pcb, _espconn_msg::pcommon, and espconn::type.
sint8 ICACHE_FLASH_ATTR espconn_get_packet_info | ( | struct espconn * | espconn, |
struct espconn_packet * | infoarg | ||
) |
Definition at line 1004 of file espconn.c.
References ESPCONN_ARG, ESPCONN_CLOSE, espconn_find_connection(), ESPCONN_NONE, ESPCONN_OK, ESPCONN_TCP, ICACHE_FLASH_ATTR, NULL, os_memcpy, _comon_pkt::packet_info, espconn_packet::packseq_nxt, espconn_packet::packseqno, _comon_pkt::pcb, _espconn_msg::pcommon, pktinfo, espconn_packet::snd_buf_size, espconn_packet::snd_queuelen, espconn::state, TCP_SND_QUEUELEN, espconn_packet::total_queuelen, and espconn::type.
err_t ICACHE_FLASH_ATTR espconn_gethostbyname | ( | struct espconn * | pespconn, |
const char * | hostname, | ||
ip_addr_t * | addr, | ||
dns_found_callback | found | ||
) |
Definition at line 1288 of file espconn.c.
References ICACHE_FLASH_ATTR.
Referenced by MQTT_Connect().
void ICACHE_FLASH_ATTR espconn_list_creat | ( | espconn_msg ** | phead, |
espconn_msg * | pinsert | ||
) |
Definition at line 76 of file espconn.c.
References NULL, plist, and _espconn_msg::pnext.
Referenced by espconn_tcp_accept(), espconn_tcp_client(), espconn_tcp_server(), and espconn_udp_server().
void ICACHE_FLASH_ATTR espconn_list_delete | ( | espconn_msg ** | phead, |
espconn_msg * | pdelete | ||
) |
Definition at line 104 of file espconn.c.
References NULL, plist, and _espconn_msg::pnext.
Referenced by espconn_Task(), espconn_tcp_client(), espconn_tcp_delete(), and espconn_udp_disconnect().
void ICACHE_FLASH_ATTR espconn_pbuf_create | ( | espconn_buf ** | phead, |
espconn_buf * | pinsert | ||
) |
Definition at line 136 of file espconn.c.
References NULL, plist, and _espconn_buf::pnext.
Referenced by espconn_sent().
void ICACHE_FLASH_ATTR espconn_pbuf_delete | ( | espconn_buf ** | phead, |
espconn_buf * | pdelete | ||
) |
Definition at line 158 of file espconn.c.
References NULL, plist, and _espconn_buf::pnext.
Referenced by espconn_tcp_disconnect_successful(), espconn_tcp_finish(), and espconn_tcp_reconnect().
uint32 ICACHE_FLASH_ATTR espconn_port | ( | void | ) |
Definition at line 1245 of file espconn.c.
References ICACHE_FLASH_ATTR, and os_random().
Referenced by MQTT_Connect().
sint8 ICACHE_FLASH_ATTR espconn_regist_connectcb | ( | struct espconn * | espconn, |
espconn_connect_callback | connect_cb | ||
) |
Definition at line 751 of file espconn.c.
References _esp_tcp::connect_callback, ESPCONN_ARG, ESPCONN_OK, ICACHE_FLASH_ATTR, NULL, espconn::proto, and espconn::tcp.
Referenced by httpdInit(), and MQTT_Connect().
sint8 ICACHE_FLASH_ATTR espconn_regist_disconcb | ( | struct espconn * | espconn, |
espconn_connect_callback | discon_cb | ||
) |
Definition at line 807 of file espconn.c.
References _esp_tcp::disconnect_callback, ESPCONN_ARG, ESPCONN_OK, ICACHE_FLASH_ATTR, NULL, espconn::proto, and espconn::tcp.
Referenced by httpdConnectCb(), and mqtt_tcpclient_connect_cb().
sint8 ICACHE_FLASH_ATTR espconn_regist_reconcb | ( | struct espconn * | espconn, |
espconn_reconnect_callback | recon_cb | ||
) |
Definition at line 789 of file espconn.c.
References ESPCONN_ARG, ESPCONN_OK, ICACHE_FLASH_ATTR, NULL, espconn::proto, _esp_tcp::reconnect_callback, and espconn::tcp.
Referenced by httpdConnectCb(), and MQTT_Connect().
sint8 ICACHE_FLASH_ATTR espconn_regist_recvcb | ( | struct espconn * | espconn, |
espconn_recv_callback | recv_cb | ||
) |
Definition at line 770 of file espconn.c.
References ESPCONN_ARG, ESPCONN_OK, ICACHE_FLASH_ATTR, NULL, and espconn::recv_callback.
Referenced by captdnsInit(), httpdConnectCb(), and mqtt_tcpclient_connect_cb().
sint8 ICACHE_FLASH_ATTR espconn_regist_sentcb | ( | struct espconn * | espconn, |
espconn_sent_callback | sent_cb | ||
) |
Definition at line 712 of file espconn.c.
References ESPCONN_ARG, ESPCONN_OK, ICACHE_FLASH_ATTR, NULL, and espconn::sent_callback.
Referenced by httpdConnectCb(), and mqtt_tcpclient_connect_cb().
sint8 ICACHE_FLASH_ATTR espconn_regist_time | ( | struct espconn * | espconn, |
uint32 | interval, | ||
uint8 | type_flag | ||
) |
Definition at line 905 of file espconn.c.
References ESPCONN_ARG, espconn_find_connection(), ESPCONN_OK, ICACHE_FLASH_ATTR, NULL, _espconn_msg::pcommon, _espconn_msg::pespconn, _espconn_msg::pnext, pserver_list, and _comon_pkt::timeout.
sint8 ICACHE_FLASH_ATTR espconn_regist_write_finish | ( | struct espconn * | espconn, |
espconn_connect_callback | write_finish_fn | ||
) |
Definition at line 732 of file espconn.c.
References ESPCONN_ARG, ESPCONN_OK, ESPCONN_UDP, ICACHE_FLASH_ATTR, NULL, espconn::proto, espconn::tcp, espconn::type, and _esp_tcp::write_finish_fn.
Referenced by espconn_sendto(), mqtt_send_keepalive(), MQTT_Task(), and mqtt_tcpclient_connect_cb().
sint16 ICACHE_FLASH_ATTR espconn_sendto | ( | struct espconn * | espconn, |
uint8 * | psent, | ||
uint16 | length | ||
) |
Definition at line 448 of file espconn.c.
References __attribute__(), ESPCONN_ARG, espconn_find_connection(), ESPCONN_OK, espconn_send(), ESPCONN_UDP, espconn_udp_sendto(), NULL, and espconn::type.
Referenced by captdnsRecv().
sint8 ICACHE_FLASH_ATTR espconn_sent | ( | struct espconn * | espconn, |
uint8 * | psent, | ||
uint16 | length | ||
) |
Definition at line 368 of file espconn.c.
References ESPCONN_ARG, espconn_copy_disabled, espconn_copy_enabled, espconn_find_connection(), ESPCONN_MAXNUM, ESPCONN_MEM, ESPCONN_OK, espconn_pbuf_create(), ESPCONN_TCP, espconn_tcp_get_buf_count(), espconn_tcp_write(), ESPCONN_UDP, espconn_udp_sent(), ESPCONN_WRITE, ICACHE_FLASH_ATTR, _espconn_buf::len, NULL, os_zalloc, _espconn_buf::payload, _comon_pkt::pbuf, _comon_pkt::pbuf_num, _comon_pkt::pcb, _espconn_msg::pcommon, _comon_pkt::ptail, _espconn_buf::punsent, espconn::state, TCP_SND_QUEUELEN, _espconn_buf::unsent, and _comon_pkt::write_flag.
Referenced by cgiEspFsHook(), and xmitSendBuff().
sint8 ICACHE_FLASH_ATTR espconn_set_keepalive | ( | struct espconn * | espconn, |
uint8 | level, | ||
void * | optarg | ||
) |
Definition at line 1128 of file espconn.c.
References ESPCONN_ARG, espconn_find_connection(), espconn_keepalive_disabled, ESPCONN_KEEPCNT, ESPCONN_KEEPIDLE, ESPCONN_KEEPINTVL, ESPCONN_OK, ESPCONN_TCP, NULL, _comon_pkt::pcb, _espconn_msg::pcommon, and espconn::type.
Referenced by MQTT_Connect().
sint8 ICACHE_FLASH_ATTR espconn_set_opt | ( | struct espconn * | espconn, |
uint8 | opt | ||
) |
Definition at line 1056 of file espconn.c.
References ESPCONN_ARG, espconn_delay_disabled, espconn_find_connection(), espconn_keepalive_disabled, espconn_keepalive_enable, ESPCONN_OK, _comon_pkt::espconn_opt, ESPCONN_TCP, ICACHE_FLASH_ATTR, NULL, _comon_pkt::pcb, _espconn_msg::pcommon, and espconn::type.
Referenced by MQTT_Connect().
|
static |
Definition at line 689 of file espconn.c.
References ICACHE_FLASH_ATTR, NULL, and _espconn_buf::pnext.
Referenced by espconn_sent().
uint8 ICACHE_FLASH_ATTR espconn_tcp_get_max_con | ( | void | ) |
Definition at line 528 of file espconn.c.
References MEMP_NUM_TCP_PCB.
Referenced by espconn_connect().
sint8 ICACHE_FLASH_ATTR espconn_tcp_get_max_con_allow | ( | struct espconn * | espconn | ) |
Definition at line 618 of file espconn.c.
References _espconn_msg::count_opt, ESPCONN_ARG, ESPCONN_UDP, NULL, _espconn_msg::pespconn, _espconn_msg::pnext, pserver_list, and espconn::type.
Referenced by espconn_tcp_accept().
uint8 ICACHE_FLASH_ATTR espconn_tcp_get_max_retran | ( | void | ) |
uint8 ICACHE_FLASH_ATTR espconn_tcp_get_max_syn | ( | void | ) |
uint16 ICACHE_FLASH_ATTR espconn_tcp_get_mss | ( | void | ) |
uint8 ICACHE_FLASH_ATTR espconn_tcp_get_wnd | ( | void | ) |
sint8 ICACHE_FLASH_ATTR espconn_tcp_set_buf_count | ( | struct espconn * | espconn, |
uint8 | num | ||
) |
Definition at line 665 of file espconn.c.
References ESPCONN_ARG, ESPCONN_OK, ESPCONN_TCP, NULL, _comon_pkt::pbuf_num, _espconn_msg::pcommon, _espconn_msg::pespconn, plist, _espconn_msg::pnext, TCP_SND_QUEUELEN, and espconn::type.
Referenced by espconn_client_connect(), and espconn_tcp_accept().
sint8 ICACHE_FLASH_ATTR espconn_tcp_set_max_con | ( | uint8 | num | ) |
Definition at line 543 of file espconn.c.
References ESPCONN_ARG, ESPCONN_OK, linkMax, and MEMP_NUM_TCP_PCB.
sint8 ICACHE_FLASH_ATTR espconn_tcp_set_max_con_allow | ( | struct espconn * | espconn, |
uint8 | num | ||
) |
Definition at line 640 of file espconn.c.
References _espconn_msg::count_opt, ESPCONN_ARG, ESPCONN_OK, ESPCONN_UDP, MEMP_NUM_TCP_PCB, NULL, _espconn_msg::pespconn, _espconn_msg::pnext, pserver_list, and espconn::type.
sint8 ICACHE_FLASH_ATTR espconn_tcp_set_max_retran | ( | uint8 | num | ) |
sint8 ICACHE_FLASH_ATTR espconn_tcp_set_max_syn | ( | uint8 | num | ) |
sint8 ICACHE_FLASH_ATTR espconn_tcp_set_wnd | ( | uint8 | num | ) |
Definition at line 498 of file espconn.c.
References ESPCONN_ARG, ESPCONN_OK, linkMax, TCP_MSS, and TCP_WND.
struct espconn_packet pktinfo[2] |
Definition at line 36 of file espconn.c.
Referenced by espconn_get_packet_info(), espconn_tcp_disconnect_successful(), and espconn_tcp_reconnect().
espconn_msg* plink_active = NULL |
Definition at line 32 of file espconn.c.
Referenced by espconn_get_connection_info().
remot_info premot[linkMax] |
Definition at line 34 of file espconn.c.
Referenced by espconn_get_connection_info().
espconn_msg* pserver_list = NULL |
Definition at line 33 of file espconn.c.
Referenced by espconn_regist_time(), espconn_server_poll(), espconn_tcp_delete(), espconn_tcp_get_max_con_allow(), and espconn_tcp_set_max_con_allow().