MeterLogger
|
Go to the source code of this file.
Data Structures | |
struct | _esp_tcp |
struct | _esp_udp |
struct | _remot_info |
struct | espconn |
struct | espconn_packet |
struct | mdns_info |
Macros | |
#define | ESPCONN_OK 0 /* No error, everything OK. */ |
#define | ESPCONN_MEM -1 /* Out of memory error. */ |
#define | ESPCONN_TIMEOUT -3 /* Timeout. */ |
#define | ESPCONN_RTE -4 /* Routing problem. */ |
#define | ESPCONN_INPROGRESS -5 /* Operation in progress */ |
#define | ESPCONN_MAXNUM -7 /* Total number exceeds the set maximum*/ |
#define | ESPCONN_ABRT -8 /* Connection aborted. */ |
#define | ESPCONN_RST -9 /* Connection reset. */ |
#define | ESPCONN_CLSD -10 /* Connection closed. */ |
#define | ESPCONN_CONN -11 /* Not connected. */ |
#define | ESPCONN_ARG -12 /* Illegal argument. */ |
#define | ESPCONN_IF -14 /* UDP send error */ |
#define | ESPCONN_ISCONN -15 /* Already connected. */ |
#define | ESPCONN_HANDSHAKE -28 /* ssl handshake failed */ |
#define | ESPCONN_SSL_INVALID_DATA -61 /* ssl application invalid */ |
Typedefs | |
typedef sint8 | err_t |
typedef void * | espconn_handle |
typedef void(* | espconn_connect_callback) (void *arg) |
typedef void(* | espconn_reconnect_callback) (void *arg, sint8 err) |
typedef struct _esp_tcp | esp_tcp |
typedef struct _esp_udp | esp_udp |
typedef struct _remot_info | remot_info |
typedef void(* | espconn_recv_callback) (void *arg, char *pdata, unsigned short len) |
typedef void(* | espconn_sent_callback) (void *arg) |
typedef void(* | dns_found_callback) (const char *name, ip_addr_t *ipaddr, void *callback_arg) |
Enumerations | |
enum | espconn_type { ESPCONN_INVALID = 0, ESPCONN_TCP = 0x10, ESPCONN_UDP = 0x20, ESPCONN_INVALID = 0, ESPCONN_TCP = 0x10, ESPCONN_UDP = 0x20 } |
enum | espconn_state { ESPCONN_NONE, ESPCONN_WAIT, ESPCONN_LISTEN, ESPCONN_CONNECT, ESPCONN_WRITE, ESPCONN_READ, ESPCONN_CLOSE, ESPCONN_NONE, ESPCONN_WAIT, ESPCONN_LISTEN, ESPCONN_CONNECT, ESPCONN_WRITE, ESPCONN_READ, ESPCONN_CLOSE } |
enum | espconn_option { ESPCONN_START = 0x00, ESPCONN_REUSEADDR = 0x01, ESPCONN_NODELAY = 0x02, ESPCONN_COPY = 0x04, ESPCONN_KEEPALIVE = 0x08, ESPCONN_END, ESPCONN_START = 0x00, ESPCONN_REUSEADDR = 0x01, ESPCONN_NODELAY = 0x02, ESPCONN_COPY = 0x04, ESPCONN_KEEPALIVE = 0x08, ESPCONN_END } |
enum | espconn_level { ESPCONN_KEEPIDLE, ESPCONN_KEEPINTVL, ESPCONN_KEEPCNT, ESPCONN_KEEPIDLE, ESPCONN_KEEPINTVL, ESPCONN_KEEPCNT } |
enum | { ESPCONN_IDLE = 0, ESPCONN_CLIENT, ESPCONN_SERVER, ESPCONN_BOTH, ESPCONN_MAX } |
#define ESPCONN_MAXNUM -7 /* Total number exceeds the set maximum*/ |
#define ESPCONN_SSL_INVALID_DATA -61 /* ssl application invalid */ |
typedef void(* dns_found_callback) (const char *name, ip_addr_t *ipaddr, void *callback_arg) |
typedef void* espconn_handle |
typedef void(* espconn_reconnect_callback) (void *arg, sint8 err) |
typedef void(* espconn_recv_callback) (void *arg, char *pdata, unsigned short len) |
typedef struct _remot_info remot_info |
anonymous enum |
Enumerator | |
---|---|
ESPCONN_IDLE | |
ESPCONN_CLIENT | |
ESPCONN_SERVER | |
ESPCONN_BOTH | |
ESPCONN_MAX |
Definition at line 135 of file espconn.h.
enum espconn_level |
Enumerator | |
---|---|
ESPCONN_KEEPIDLE | |
ESPCONN_KEEPINTVL | |
ESPCONN_KEEPCNT | |
ESPCONN_KEEPIDLE | |
ESPCONN_KEEPINTVL | |
ESPCONN_KEEPCNT |
enum espconn_option |
Enumerator | |
---|---|
ESPCONN_START | |
ESPCONN_REUSEADDR | |
ESPCONN_NODELAY | |
ESPCONN_COPY | |
ESPCONN_KEEPALIVE | |
ESPCONN_END | |
ESPCONN_START | |
ESPCONN_REUSEADDR | |
ESPCONN_NODELAY | |
ESPCONN_COPY | |
ESPCONN_KEEPALIVE | |
ESPCONN_END |
Definition at line 120 of file espconn.h.
enum espconn_state |
Current state of the espconn. Non-TCP espconn are always in state ESPCONN_NONE!
Definition at line 65 of file espconn.h.
enum espconn_type |
Protocol family and type of the espconn
Enumerator | |
---|---|
ESPCONN_INVALID | |
ESPCONN_TCP | |
ESPCONN_UDP | |
ESPCONN_INVALID | |
ESPCONN_TCP | |
ESPCONN_UDP |
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().
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.
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.
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().
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.
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.
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.
void espconn_dns_setserver | ( | char | numdns, |
ip_addr_t * | dnsserver | ||
) |
sint8 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.
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 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 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.
Definition at line 414 of file espconn_udp.c.
References ERR_OK, ESPCONN_OK, ESPCONN_UDP_DEBUG, and LWIP_DEBUGF.
Definition at line 396 of file espconn_udp.c.
References ERR_OK, ESPCONN_OK, ESPCONN_UDP_DEBUG, ICACHE_FLASH_ATTR, and LWIP_DEBUGF.
void espconn_mdns_close | ( | void | ) |
Definition at line 119 of file espconn_mdns.c.
References ICACHE_FLASH_ATTR.
void espconn_mdns_disable | ( | void | ) |
Definition at line 37 of file espconn_mdns.c.
References ICACHE_FLASH_ATTR.
void espconn_mdns_enable | ( | void | ) |
Definition at line 25 of file espconn_mdns.c.
References ICACHE_FLASH_ATTR.
char* espconn_mdns_get_hostname | ( | void | ) |
Definition at line 63 of file espconn_mdns.c.
References ICACHE_FLASH_ATTR.
char* espconn_mdns_get_servername | ( | void | ) |
Definition at line 85 of file espconn_mdns.c.
References ICACHE_FLASH_ATTR.
void espconn_mdns_init | ( | struct mdns_info * | info | ) |
Definition at line 131 of file espconn_mdns.c.
void espconn_mdns_server_register | ( | void | ) |
Definition at line 96 of file espconn_mdns.c.
References ICACHE_FLASH_ATTR.
void espconn_mdns_server_unregister | ( | void | ) |
Definition at line 107 of file espconn_mdns.c.
References ICACHE_FLASH_ATTR.
void espconn_mdns_set_hostname | ( | char * | name | ) |
Definition at line 50 of file espconn_mdns.c.
References ICACHE_FLASH_ATTR.
void espconn_mdns_set_servername | ( | const char * | name | ) |
Definition at line 74 of file espconn_mdns.c.
References ICACHE_FLASH_ATTR.
uint32 espconn_port | ( | void | ) |
Definition at line 1245 of file espconn.c.
References ICACHE_FLASH_ATTR, and os_random().
Definition at line 549 of file espconn_tcp.c.
References ESPCONN_ARG, espconn_find_connection(), ESPCONN_OK, ICACHE_FLASH_ATTR, NULL, os_printf, _espconn_msg::recv_hold_flag, and _espconn_msg::recv_holded_buf_Len.
Definition at line 574 of file espconn_tcp.c.
References ESPCONN_ARG, espconn_find_connection(), ESPCONN_OK, ESPCONN_TCP, ICACHE_FLASH_ATTR, NULL, os_printf, _comon_pkt::pcb, _espconn_msg::pcommon, _espconn_msg::recv_hold_flag, _espconn_msg::recv_holded_buf_Len, and espconn::type.
sint8 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.
sint8 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.
sint8 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.
sint8 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.
sint8 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.
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 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.
bool espconn_secure_ca_disable | ( | uint8 | level | ) |
bool espconn_secure_cert_req_disable | ( | uint8 | level | ) |
Referenced by mqtt_send_keepalive(), MQTT_Task(), and mqtt_tcpclient_connect_cb().
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().
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.
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.
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.
uint8 espconn_tcp_get_max_con | ( | void | ) |
Definition at line 528 of file espconn.c.
References MEMP_NUM_TCP_PCB.
Referenced by espconn_connect().
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.
Definition at line 543 of file espconn.c.
References ESPCONN_ARG, ESPCONN_OK, linkMax, and MEMP_NUM_TCP_PCB.
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.