MeterLogger
espconn.h
Go to the documentation of this file.
1 #ifndef __ESPCONN_H__
2 #define __ESPCONN_H__
3 
4 #include "lwip/dns.h"
5 #include "os_type.h"
6 
7 #if 0
8 #define espconn_printf(fmt, args...) os_printf(fmt,## args)
9 #else
10 #define espconn_printf(fmt, args...)
11 #endif
12 
13 
14 typedef void *espconn_handle;
15 typedef void (* espconn_connect_callback)(void *arg);
16 typedef void (* espconn_reconnect_callback)(void *arg, sint8 err);
17 
18 /* Definitions for error constants. */
19 
20 #define ESPCONN_OK 0 /* No error, everything OK. */
21 #define ESPCONN_MEM -1 /* Out of memory error. */
22 #define ESPCONN_TIMEOUT -3 /* Timeout. */
23 #define ESPCONN_RTE -4 /* Routing problem. */
24 #define ESPCONN_INPROGRESS -5 /* Operation in progress */
25 #define ESPCONN_MAXNUM -7 /* Total number exceeds the set maximum*/
26 
27 #define ESPCONN_ABRT -8 /* Connection aborted. */
28 #define ESPCONN_RST -9 /* Connection reset. */
29 #define ESPCONN_CLSD -10 /* Connection closed. */
30 #define ESPCONN_CONN -11 /* Not connected. */
31 
32 #define ESPCONN_ARG -12 /* Illegal argument. */
33 #define ESPCONN_IF -14 /* Low_level error */
34 #define ESPCONN_ISCONN -15 /* Already connected. */
35 
36 #define ESPCONN_HANDSHAKE -28 /* ssl handshake failed */
37 #define ESPCONN_RESP_TIMEOUT -29 /* ssl handshake no response*/
38 #define ESPCONN_PROTO_MSG -61 /* ssl application invalid */
39 
40 #define ESPCONN_SSL 0x01
41 #define ESPCONN_NORM 0x00
42 
43 #define ESPCONN_STA 0x01
44 #define ESPCONN_AP 0x02
45 #define ESPCONN_AP_STA 0x03
46 
47 #define STA_NETIF 0x00
48 #define AP_NETIF 0x01
49 
50 /** Protocol family and type of the espconn */
53  /* ESPCONN_TCP Group */
54  ESPCONN_TCP = 0x10,
55  /* ESPCONN_UDP Group */
56  ESPCONN_UDP = 0x20,
57 };
58 
59 /** Current state of the espconn. Non-TCP espconn are always in state ESPCONN_NONE! */
68 };
69 
70 typedef struct _esp_tcp {
79 } esp_tcp;
80 
81 typedef struct _esp_udp {
86 } esp_udp;
87 
88 typedef struct _remot_info{
92 }remot_info;
93 
94 /** A callback prototype to inform about events for a espconn */
95 typedef void (* espconn_recv_callback)(void *arg, char *pdata, unsigned short len);
96 typedef void (* espconn_sent_callback)(void *arg);
97 
98 /** A espconn descriptor */
99 struct espconn {
100  /** type of the espconn (TCP, UDP) */
101  enum espconn_type type;
102  /** current state of the espconn */
104  union {
107  } proto;
108  /** A callback function that is informed about events for this espconn */
112  void *reverse;
113 };
114 
119  ESPCONN_COPY = 0x04,
122 };
123 
128 };
129 
131  uint16 sent_length; /* sent length successful*/
132  uint16 snd_buf_size; /* Available buffer size for sending */
133  uint16 snd_queuelen; /* Available buffer space for sending */
134  uint16 total_queuelen; /* total Available buffer space for sending */
135  uint32 packseqno; /* seqno to be sent */
136  uint32 packseq_nxt; /* seqno expected */
138 };
139 
140 typedef struct _espconn_buf{
147 } espconn_buf;
148 
149 typedef struct _comon_pkt{
150  void *pcb;
163  struct espconn_packet packet_info;
165  enum espconn_option espconn_opt;
166 }comon_pkt;
167 
168 typedef struct _espconn_msg{
169  struct espconn *pespconn;
172  sint16_t hs_status; //the status of the handshake
173  void *preverse;
174  void *pssl;
176 
177 //***********Code for WIFI_BLOCK from upper**************
180 }espconn_msg;
181 
182 #ifndef _MDNS_INFO
183 #define _MDNS_INFO
184 struct mdns_info {
185  char *host_name;
186  char *server_name;
188  unsigned long ipAddr;
189  char *txt_data[10];
190 };
191 #endif
192 
193 #define linkMax 15
194 
195 #define espconn_delay_disabled(espconn) (((espconn)->pcommon.espconn_opt & ESPCONN_NODELAY) != 0)
196 #define espconn_delay_enabled(espconn) (((espconn)->pcommon.espconn_opt & ESPCONN_NODELAY) == 0)
197 #define espconn_reuse_disabled(espconn) (((espconn)->pcommon.espconn_opt & ESPCONN_REUSEADDR) != 0)
198 #define espconn_copy_disabled(espconn) (((espconn)->pcommon.espconn_opt & ESPCONN_COPY) != 0)
199 #define espconn_copy_enabled(espconn) (((espconn)->pcommon.espconn_opt & ESPCONN_COPY) == 0)
200 #define espconn_keepalive_disabled(espconn) (((espconn)->pcommon.espconn_opt & ESPCONN_KEEPALIVE) != 0)
201 #define espconn_keepalive_enabled(espconn) (((espconn)->pcommon.espconn_opt & ESPCONN_KEEPALIVE) == 0)
202 
203 #define espconn_TaskPrio 26
204 #define espconn_TaskQueueLen 15
205 
215 };
216 
217 /******************************************************************************
218  * FunctionName : espconn_copy_partial
219  * Description : reconnect with host
220  * Parameters : arg -- Additional argument to pass to the callback function
221  * Returns : none
222 *******************************************************************************/
223 
224 void espconn_copy_partial(struct espconn *pesp_dest, struct espconn *pesp_source);
225 
226 /******************************************************************************
227  * FunctionName : espconn_copy_partial
228  * Description : insert the node to the active connection list
229  * Parameters : arg -- Additional argument to pass to the callback function
230  * Returns : none
231 *******************************************************************************/
232 
233 void espconn_list_creat(espconn_msg **phead, espconn_msg* pinsert);
234 
235 /******************************************************************************
236  * FunctionName : espconn_list_delete
237  * Description : remove the node from the active connection list
238  * Parameters : arg -- Additional argument to pass to the callback function
239  * Returns : none
240 *******************************************************************************/
241 
242 void espconn_list_delete(espconn_msg **phead, espconn_msg* pdelete);
243 
244 /******************************************************************************
245  * FunctionName : espconn_find_connection
246  * Description : Initialize the server: set up a listening PCB and bind it to
247  * the defined port
248  * Parameters : espconn -- the espconn used to build server
249  * Returns : none
250  *******************************************************************************/
251 
252 bool espconn_find_connection(struct espconn *pespconn, espconn_msg **pnode);
253 
254 /******************************************************************************
255  * FunctionName : espconn_get_connection_info
256  * Description : used to specify the function that should be called when disconnect
257  * Parameters : espconn -- espconn to set the err callback
258  * discon_cb -- err callback function to call when err
259  * Returns : none
260 *******************************************************************************/
261 
262 sint8 espconn_get_connection_info(struct espconn *pespconn, remot_info **pcon_info, uint8 typeflags);
263 
264 /******************************************************************************
265  * FunctionName : espconn_get_packet_info
266  * Description : get the packet info with host
267  * Parameters : espconn -- the espconn used to disconnect the connection
268  * infoarg -- the packet info
269  * Returns : the errur code
270 *******************************************************************************/
271 
273 
274 /******************************************************************************
275  * FunctionName : espconn_connect
276  * Description : The function given as the connect
277  * Parameters : espconn -- the espconn used to listen the connection
278  * Returns : none
279 *******************************************************************************/
280 
281 extern sint8 espconn_connect(struct espconn *espconn);
282 
283 /******************************************************************************
284  * FunctionName : espconn_disconnect
285  * Description : disconnect with host
286  * Parameters : espconn -- the espconn used to disconnect the connection
287  * Returns : none
288 *******************************************************************************/
289 
290 extern sint8 espconn_disconnect(struct espconn *espconn);
291 
292 /******************************************************************************
293  * FunctionName : espconn_delete
294  * Description : disconnect with host
295  * Parameters : espconn -- the espconn used to disconnect the connection
296  * Returns : none
297 *******************************************************************************/
298 
299 extern sint8 espconn_delete(struct espconn *espconn);
300 
301 /******************************************************************************
302  * FunctionName : espconn_accept
303  * Description : The function given as the listen
304  * Parameters : espconn -- the espconn used to listen the connection
305  * Returns : none
306 *******************************************************************************/
307 
308 extern sint8 espconn_accept(struct espconn *espconn);
309 
310 /******************************************************************************
311  * FunctionName : espconn_create
312  * Description : sent data for client or server
313  * Parameters : espconn -- espconn to the data transmission
314  * Returns : result
315 *******************************************************************************/
316 
317 extern sint8 espconn_create(struct espconn *espconn);
318 
319 /******************************************************************************
320  * FunctionName : espconn_tcp_get_wnd
321  * Description : get the window size of simulatenously active TCP connections
322  * Parameters : none
323  * Returns : the number of TCP_MSS active TCP connections
324 *******************************************************************************/
325 extern uint8 espconn_tcp_get_wnd(void);
326 
327 /******************************************************************************
328  * FunctionName : espconn_tcp_set_max_con
329  * Description : set the window size simulatenously active TCP connections
330  * Parameters : num -- the number of TCP_MSS
331  * Returns : ESPCONN_ARG -- Illegal argument
332  * ESPCONN_OK -- No error
333 *******************************************************************************/
334 extern sint8 espconn_tcp_set_wnd(uint8 num);
335 
336 /******************************************************************************
337  * FunctionName : espconn_tcp_get_max_con
338  * Description : get the number of simulatenously active TCP connections
339  * Parameters : none
340  * Returns : none
341 *******************************************************************************/
342 
343 extern uint8 espconn_tcp_get_max_con(void);
344 
345 /******************************************************************************
346  * FunctionName : espconn_tcp_set_max_con
347  * Description : set the number of simulatenously active TCP connections
348  * Parameters : num -- total number
349  * Returns : none
350 *******************************************************************************/
351 
353 
354 /******************************************************************************
355  * FunctionName : espconn_tcp_get_max_retran
356  * Description : get the Maximum number of retransmissions of data active TCP connections
357  * Parameters : none
358  * Returns : the Maximum number of retransmissions
359 *******************************************************************************/
360 extern uint8 espconn_tcp_get_max_retran(void);
361 
362 /******************************************************************************
363  * FunctionName : espconn_tcp_set_max_retran
364  * Description : set the Maximum number of retransmissions of data active TCP connections
365  * Parameters : num -- the Maximum number of retransmissions
366  * Returns : result
367 *******************************************************************************/
368 
370 
371 /******************************************************************************
372  * FunctionName : espconn_tcp_get_max_syn
373  * Description : get the Maximum number of retransmissions of SYN segments
374  * Parameters : none
375  * Returns : the Maximum number of retransmissions
376 *******************************************************************************/
377 
378 extern uint8 espconn_tcp_get_max_syn(void);
379 
380 /******************************************************************************
381  * FunctionName : espconn_tcp_set_max_syn
382  * Description : set the Maximum number of retransmissions of SYN segments
383  * Parameters : num -- the Maximum number of retransmissions
384  * Returns : result
385 *******************************************************************************/
386 
388 
389 /******************************************************************************
390  * FunctionName : espconn_tcp_get_max_con_allow
391  * Description : get the count of simulatenously active connections on the server
392  * Parameters : espconn -- espconn to get the count
393  * Returns : result
394 *******************************************************************************/
395 
397 
398 /******************************************************************************
399  * FunctionName : espconn_tcp_set_max_con_allow
400  * Description : set the count of simulatenously active connections on the server
401  * Parameters : espconn -- espconn to set the count
402  * Returns : result
403 *******************************************************************************/
404 
406 
407 /******************************************************************************
408  * FunctionName : espconn_tcp_set_buf_count
409  * Description : set the total number of espconn_buf on the unsent lists
410  * Parameters : espconn -- espconn to set the count
411  * num -- the total number of espconn_buf
412  * Returns : result
413 *******************************************************************************/
414 
416 
417 /******************************************************************************
418  * FunctionName : espconn_regist_time
419  * Description : used to specify the time that should be called when don't recv data
420  * Parameters : espconn -- the espconn used to the connection
421  * interval -- the timer when don't recv data
422  * Returns : none
423 *******************************************************************************/
424 
425 extern sint8 espconn_regist_time(struct espconn *espconn, uint32 interval, uint8 type_flag);
426 
427 /******************************************************************************
428  * FunctionName : espconn_regist_sentcb
429  * Description : Used to specify the function that should be called when data
430  * has been successfully delivered to the remote host.
431  * Parameters : struct espconn *espconn -- espconn to set the sent callback
432  * espconn_sent_callback sent_cb -- sent callback function to
433  * call for this espconn when data is successfully sent
434  * Returns : none
435 *******************************************************************************/
436 
438 
439 /******************************************************************************
440  * FunctionName : espconn_regist_sentcb
441  * Description : Used to specify the function that should be called when data
442  * has been successfully delivered to the remote host.
443  * Parameters : espconn -- espconn to set the sent callback
444  * sent_cb -- sent callback function to call for this espconn
445  * when data is successfully sent
446  * Returns : none
447 *******************************************************************************/
449 
450 /******************************************************************************
451  * FunctionName : espconn_sent
452  * Description : sent data for client or server
453  * Parameters : espconn -- espconn to set for client or server
454  * psent -- data to send
455  * length -- length of data to send
456  * Returns : none
457 *******************************************************************************/
458 
459 extern sint8 espconn_sent(struct espconn *espconn, uint8 *psent, uint16 length);
460 
461 /******************************************************************************
462  * FunctionName : espconn_regist_connectcb
463  * Description : used to specify the function that should be called when
464  * connects to host.
465  * Parameters : espconn -- espconn to set the connect callback
466  * connect_cb -- connected callback function to call when connected
467  * Returns : none
468 *******************************************************************************/
469 
471 
472 /******************************************************************************
473  * FunctionName : espconn_regist_recvcb
474  * Description : used to specify the function that should be called when recv
475  * data from host.
476  * Parameters : espconn -- espconn to set the recv callback
477  * recv_cb -- recv callback function to call when recv data
478  * Returns : none
479 *******************************************************************************/
480 
482 
483 /******************************************************************************
484  * FunctionName : espconn_regist_reconcb
485  * Description : used to specify the function that should be called when connection
486  * because of err disconnect.
487  * Parameters : espconn -- espconn to set the err callback
488  * recon_cb -- err callback function to call when err
489  * Returns : none
490 *******************************************************************************/
491 
493 
494 /******************************************************************************
495  * FunctionName : espconn_regist_disconcb
496  * Description : used to specify the function that should be called when disconnect
497  * Parameters : espconn -- espconn to set the err callback
498  * discon_cb -- err callback function to call when err
499  * Returns : none
500 *******************************************************************************/
501 
503 
504 /******************************************************************************
505  * FunctionName : espconn_port
506  * Description : access port value for client so that we don't end up bouncing
507  * all connections at the same time .
508  * Parameters : none
509  * Returns : access port value
510 *******************************************************************************/
511 
512 extern uint32 espconn_port(void);
513 
514 /******************************************************************************
515  * FunctionName : espconn_set_opt
516  * Description : access port value for client so that we don't end up bouncing
517  * all connections at the same time .
518  * Parameters : none
519  * Returns : access port value
520 *******************************************************************************/
521 extern sint8 espconn_set_opt(struct espconn *espconn, uint8 opt);
522 
523 /******************************************************************************
524  * FunctionName : espconn_set_keepalive
525  * Description : access level value for connection so that we set the value for
526  * keep alive
527  * Parameters : espconn -- the espconn used to set the connection
528  * level -- the connection's level
529  * value -- the value of time(s)
530  * Returns : access port value
531 *******************************************************************************/
532 extern sint8 espconn_set_keepalive(struct espconn *espconn, uint8 level, void* optarg);
533 
534 /******************************************************************************
535  * FunctionName : espconn_get_keepalive
536  * Description : access level value for connection so that we get the value for
537  * keep alive
538  * Parameters : espconn -- the espconn used to get the connection
539  * level -- the connection's level
540  * Returns : access keep alive value
541 *******************************************************************************/
542 extern sint8 espconn_get_keepalive(struct espconn *espconn, uint8 level, void *optarg);
543 
544 /******************************************************************************
545  * FunctionName : espconn_gethostbyname
546  * Description : Resolve a hostname (string) into an IP address.
547  * Parameters : pespconn -- espconn to resolve a hostname
548  * hostname -- the hostname that is to be queried
549  * addr -- pointer to a ip_addr_t where to store the address if
550  * it is already cached in the dns_table (only valid if
551  * ESPCONN_OK is returned!)
552  * found -- a callback function to be called on success, failure
553  * or timeout (only if ERR_INPROGRESS is returned!)
554  * Returns : err_t return code
555  * - ESPCONN_OK if hostname is a valid IP address string or the host
556  * name is already in the local names table.
557  * - ESPCONN_INPROGRESS enqueue a request to be sent to the DNS server
558  * for resolution if no errors are present.
559  * - ESPCONN_ARG: dns client not initialized or invalid hostname
560 *******************************************************************************/
561 
562 extern sint8 espconn_gethostbyname(struct espconn *pespconn, const char *name, ip_addr_t *addr, dns_found_callback found);
563 
564 /******************************************************************************
565  * FunctionName : espconn_igmp_join
566  * Description : join a multicast group
567  * Parameters : host_ip -- the ip address of udp server
568  * multicast_ip -- multicast ip given by user
569  * Returns : none
570 *******************************************************************************/
571 extern sint8 espconn_igmp_join(ip_addr_t *host_ip, ip_addr_t *multicast_ip);
572 
573 /******************************************************************************
574  * FunctionName : espconn_igmp_leave
575  * Description : leave a multicast group
576  * Parameters : host_ip -- the ip address of udp server
577  * multicast_ip -- multicast ip given by user
578  * Returns : none
579 *******************************************************************************/
580 extern sint8 espconn_igmp_leave(ip_addr_t *host_ip, ip_addr_t *multicast_ip);
581 
582 /******************************************************************************
583  * FunctionName : espconn_mdns_init
584  * Description : register a device with mdns
585  * Parameters : ipAddr -- the ip address of device
586  * hostname -- the hostname of device
587  * Returns : none
588 *******************************************************************************/
589 extern void espconn_mdns_init(struct mdns_info *info);
590 /******************************************************************************
591  * FunctionName : espconn_mdns_init
592  * Description : close mdns socket
593  * Parameters : void
594  * Returns : none
595 *******************************************************************************/
596 extern void espconn_mdns_close(void);
597 /******************************************************************************
598  * FunctionName : mdns_server_register
599  * Description : register a server and join a multicast group
600  * Parameters : none
601  * Returns : none
602 *******************************************************************************/
603 extern void espconn_mdns_server_register(void);
604 /******************************************************************************
605  * FunctionName : mdns_server_register
606  * Description : unregister server and leave multicast group
607  * Parameters : none
608  * Returns : none
609 *******************************************************************************/
610 extern void espconn_mdns_server_unregister(void);
611 /******************************************************************************
612  * FunctionName : espconn_mdns_get_servername
613  * Description : get server name
614  * Parameters : none
615  * Returns : server name
616 *******************************************************************************/
617 extern char* espconn_mdns_get_servername(void);
618 /******************************************************************************
619  * FunctionName : espconn_mdns_get_servername
620  * Description : set server name
621  * Parameters : server name
622  * Returns : none
623 *******************************************************************************/
624 extern void espconn_mdns_set_servername(const char *name);
625 /******************************************************************************
626  * FunctionName : espconn_mdns_set_hostname
627  * Description : set host name
628  * Parameters : host name
629  * Returns : none
630 *******************************************************************************/
631 extern void espconn_mdns_set_hostname(char *name);
632 /******************************************************************************
633  * FunctionName : espconn_mdns_init
634  * Description : get host name
635  * Parameters : void
636  * Returns : hostname
637 *******************************************************************************/
638 extern char* espconn_mdns_get_hostname(void);
639 /******************************************************************************
640  * FunctionName : espconn_mdns_disable
641  * Description : join a multicast group
642  * Parameters : host_ip -- the ip address of udp server
643  * multicast_ip -- multicast ip given by user
644  * Returns : none
645 *******************************************************************************/
646 extern void espconn_mdns_disable(void);
647 /******************************************************************************
648  * FunctionName : espconn_mdns_enable
649  * Description : enable mdns
650  * Parameters : void
651  * Returns : none
652 *******************************************************************************/
653 extern void espconn_mdns_enable(void);
654 /******************************************************************************
655  * FunctionName : espconn_dns_setserver
656  * Description : Initialize one of the DNS servers.
657  * Parameters : numdns -- the index of the DNS server to set must
658  * be < DNS_MAX_SERVERS = 2
659  * dnsserver -- IP address of the DNS server to set
660  * Returns : none
661 *******************************************************************************/
662 extern void espconn_dns_setserver(u8_t numdns, ip_addr_t *dnsserver);
663 #endif
664 
uint16 unsent
Definition: espconn.h:143
sint8 espconn_regist_sentcb(struct espconn *espconn, espconn_sent_callback sent_cb)
Definition: espconn.c:712
void espconn_mdns_disable(void)
Definition: espconn_mdns.c:37
void * espconn_handle
Definition: espconn.h:14
esp_udp * udp
Definition: espconn.h:106
sint8 espconn_set_opt(struct espconn *espconn, uint8 opt)
Definition: espconn.c:1056
uint32 local_ip
Definition: espconn.h:154
void espconn_mdns_set_hostname(char *name)
Definition: espconn_mdns.c:50
sint8 espconn_regist_recvcb(struct espconn *espconn, espconn_recv_callback recv_cb)
Definition: espconn.c:770
sint8 espconn_connect(struct espconn *espconn)
Definition: espconn.c:260
uint8 espconn_tcp_get_max_retran(void)
Definition: espconn.c:558
sint8 espconn_sent(struct espconn *espconn, uint8 *psent, uint16 length)
Definition: espconn.c:368
int local_port
Definition: espconn.h:83
void * reverse
Definition: espconn.h:112
sint8 espconn_tcp_get_max_con_allow(struct espconn *espconn)
Definition: espconn.c:618
sint8 espconn_tcp_set_max_syn(uint8 num)
Definition: espconn.c:603
esp_tcp * tcp
Definition: espconn.h:105
void espconn_mdns_init(struct mdns_info *info)
Definition: espconn_mdns.c:131
int remote_port
Definition: espconn.h:151
struct _espconn_msg * pnext
Definition: espconn.h:175
espconn_buf * ptail
Definition: espconn.h:156
void espconn_list_delete(espconn_msg **phead, espconn_msg *pdelete)
Definition: espconn.c:104
void espconn_dns_setserver(u8_t numdns, ip_addr_t *dnsserver)
Definition: espconn.c:1302
sint8 espconn_get_connection_info(struct espconn *pespconn, remot_info **pcon_info, uint8 typeflags)
Definition: espconn.c:825
uint16 len
Definition: espconn.h:144
int local_port
Definition: espconn.h:72
void * pcb
Definition: espconn.h:150
uint8 link_cnt
Definition: espconn.h:111
sint8 espconn_regist_reconcb(struct espconn *espconn, espconn_reconnect_callback recon_cb)
Definition: espconn.c:789
uint32 timeout
Definition: espconn.h:160
char * espconn_mdns_get_servername(void)
Definition: espconn_mdns.c:85
unsigned short uint16
Definition: c_types.h:50
void espconn_mdns_server_register(void)
Definition: espconn_mdns.c:96
uint8 remote_ip[4]
Definition: espconn.h:74
uint8 * punsent
Definition: espconn.h:142
void espconn_mdns_server_unregister(void)
Definition: espconn_mdns.c:107
uint32 local_port
Definition: espconn.h:153
void * preverse
Definition: espconn.h:173
void(* espconn_connect_callback)(void *arg)
Definition: espconn.h:15
struct _remot_info remot_info
void(* espconn_recv_callback)(void *arg, char *pdata, unsigned short len)
Definition: espconn.h:95
void(* espconn_reconnect_callback)(void *arg, sint8 err)
Definition: espconn.h:16
uint32 packseqno
Definition: espconn.h:135
sint8 err
Definition: espconn.h:159
char * host_name
Definition: espconn.h:185
int remote_port
Definition: espconn.h:71
sint8 espconn_tcp_set_buf_count(struct espconn *espconn, uint8 num)
Definition: espconn.c:665
espconn_connect_callback connect_callback
Definition: espconn.h:75
void espconn_list_creat(espconn_msg **phead, espconn_msg *pinsert)
Definition: espconn.c:76
void * pssl
Definition: espconn.h:174
struct _espconn_buf espconn_buf
espconn_state
Definition: espconn.h:60
sint8 espconn_get_keepalive(struct espconn *espconn, uint8 level, void *optarg)
Definition: espconn.c:1173
signed short sint16_t
Definition: c_types.h:34
sint8 espconn_igmp_leave(ip_addr_t *host_ip, ip_addr_t *multicast_ip)
Definition: espconn_udp.c:396
struct _comon_pkt comon_pkt
sint8 espconn_disconnect(struct espconn *espconn)
Definition: espconn.c:942
uint16 tot_len
Definition: espconn.h:145
void(* dns_found_callback)(const char *name, ip_addr_t *ipaddr, void *callback_arg)
Definition: espconn.h:437
void espconn_mdns_set_servername(const char *name)
Definition: espconn_mdns.c:74
uint8 * payload
Definition: espconn.h:141
static state_t * state
Definition: aes.c:67
comon_pkt pcommon
Definition: espconn.h:170
bool espconn_find_connection(struct espconn *pespconn, espconn_msg **pnode)
Definition: espconn.c:186
unsigned long ipAddr
Definition: espconn.h:188
struct _esp_udp esp_udp
sint8 espconn_tcp_set_wnd(uint8 num)
Definition: espconn.c:498
unsigned char uint8
Definition: c_types.h:45
char * espconn_mdns_get_hostname(void)
Definition: espconn_mdns.c:63
typedefPACK_STRUCT_END struct ip_addr ip_addr_t
Definition: ip_addr.h:64
uint16 snd_buf_size
Definition: espconn.h:132
sint8 espconn_set_keepalive(struct espconn *espconn, uint8 level, void *optarg)
Definition: espconn.c:1128
sint8 espconn_regist_write_finish(struct espconn *espconn, espconn_connect_callback write_finish_fn)
Definition: espconn.c:732
void espconn_mdns_close(void)
Definition: espconn_mdns.c:119
uint8 pbuf_num
Definition: espconn.h:162
sint8 espconn_regist_disconcb(struct espconn *espconn, espconn_connect_callback discon_cb)
Definition: espconn.c:807
void(* espconn_sent_callback)(void *arg)
Definition: espconn.h:96
espconn_connect_callback write_finish_fn
Definition: espconn.h:78
void espconn_copy_partial(struct espconn *pesp_dest, struct espconn *pesp_source)
Definition: espconn.c:46
int remote_port
Definition: espconn.h:82
void espconn_mdns_enable(void)
Definition: espconn_mdns.c:25
sint8 espconn_accept(struct espconn *espconn)
Definition: espconn.c:875
uint16 server_port
Definition: espconn.h:187
bool write_flag
Definition: espconn.h:164
uint8 espconn_tcp_get_wnd(void)
Definition: espconn.c:483
uint16 cntr
Definition: espconn.h:158
espconn_level
Definition: espconn.h:124
sint8 espconn_delete(struct espconn *espconn)
Definition: espconn.c:1217
unsigned int uint32
Definition: c_types.h:54
uint32 packseq_nxt
Definition: espconn.h:136
espconn_type
Definition: espconn.h:51
sint16_t hs_status
Definition: espconn.h:172
espconn_sig
Definition: espconn.h:206
sint8 espconn_tcp_set_max_con(uint8 num)
Definition: espconn.c:543
uint8 local_ip[4]
Definition: espconn.h:73
espconn_option
Definition: espconn.h:115
uint8 espconn_tcp_get_max_con(void)
Definition: espconn.c:528
uint8 recv_hold_flag
Definition: espconn.h:178
espconn_reconnect_callback reconnect_callback
Definition: espconn.h:76
unsigned char u8_t
Definition: cc.h:52
uint32 espconn_port(void)
Definition: espconn.c:1245
espconn_connect_callback disconnect_callback
Definition: espconn.h:77
sint8 espconn_regist_connectcb(struct espconn *espconn, espconn_connect_callback connect_cb)
Definition: espconn.c:751
uint16 sent_length
Definition: espconn.h:131
uint16 snd_queuelen
Definition: espconn.h:133
char * server_name
Definition: espconn.h:186
uint8 espconn_tcp_get_max_syn(void)
Definition: espconn.c:588
sint8 espconn_get_packet_info(struct espconn *espconn, struct espconn_packet *infoarg)
Definition: espconn.c:1004
uint16 total_queuelen
Definition: espconn.h:134
espconn_recv_callback recv_callback
Definition: espconn.h:109
uint16 recv_holded_buf_Len
Definition: espconn.h:179
sint8 espconn_gethostbyname(struct espconn *pespconn, const char *name, ip_addr_t *addr, dns_found_callback found)
Definition: espconn.c:1288
signed char sint8
Definition: c_types.h:47
sint8 espconn_tcp_set_max_retran(uint8 num)
Definition: espconn.c:573
uint32 recv_check
Definition: espconn.h:161
struct _espconn_buf * pnext
Definition: espconn.h:146
struct _espconn_msg espconn_msg
uint32 packnum
Definition: espconn.h:137
struct espconn * pespconn
Definition: espconn.h:169
struct _esp_tcp esp_tcp
espconn_sent_callback sent_callback
Definition: espconn.h:110
uint8 * ptrbuf
Definition: espconn.h:157
espconn_buf * pbuf
Definition: espconn.h:155
uint8 count_opt
Definition: espconn.h:171
sint8 espconn_igmp_join(ip_addr_t *host_ip, ip_addr_t *multicast_ip)
Definition: espconn_udp.c:414
int remote_port
Definition: espconn.h:90
sint8 espconn_regist_time(struct espconn *espconn, uint32 interval, uint8 type_flag)
Definition: espconn.c:905
sint8 espconn_create(struct espconn *espconn)
Definition: espconn.c:334
sint8 espconn_tcp_set_max_con_allow(struct espconn *espconn, uint8 num)
Definition: espconn.c:640