38 if (pespconn ==
NULL) {
85 struct pbuf *p, *q ,*p_temp;
93 if (pudp_sent ==
NULL || upcb ==
NULL || psent ==
NULL || length == 0) {
113 for (i = 0; i < q->
len; i++) {
114 data[i] = ((
u8_t *) psent)[cnt++];
137 ip_addr_isbroadcast(&upcb->remote_ip, sta_netif) && \
138 ip_addr_isbroadcast(&upcb->remote_ip, ap_netif)) {
146 err = udp_send(upcb, p_temp);
151 err = udp_send(upcb, p);
186 struct udp_pcb *upcb = pudp_sent->
pcommon.
pcb;
188 struct pbuf *p, *q ,*p_temp;
198 if (pudp_sent ==
NULL || upcb ==
NULL || psent ==
NULL || length == 0) {
218 for (i = 0; i < q->
len; i++) {
219 data[i] = ((
u8_t *) psent)[cnt++];
240 ip_addr_isbroadcast(&upcb->remote_ip, sta_netif) && \
241 ip_addr_isbroadcast(&upcb->remote_ip, ap_netif)) {
249 err = udp_sendto(upcb, p_temp, &dst_ip, dst_port);
254 err = udp_sendto(upcb, p, &dst_ip, dst_port);
340 if (pdiscon ==
NULL) {
346 udp_disconnect(upcb);
365 struct udp_pcb *upcb =
NULL;
374 if (pserver ==
NULL) {
398 if (igmp_leavegroup(host_ip, multicast_ip) !=
ERR_OK) {
416 if (igmp_joingroup(host_ip, multicast_ip) !=
ERR_OK) {
#define ip4_addr3_16(ipaddr)
err_t pbuf_copy(struct pbuf *p_to, struct pbuf *p_from) ICACHE_FLASH_ATTR
#define ESPCONN_UDP_DEBUG
static void ICACHE_FLASH_ATTR espconn_udp_recv(void *arg, struct udp_pcb *upcb, struct pbuf *p, struct ip_addr *addr, u16_t port)
#define ip_addr_netcmp(addr1, addr2, mask)
void espconn_list_delete(espconn_msg **phead, espconn_msg *pdelete)
static void ICACHE_FLASH_ATTR espconn_data_sentcb(struct espconn *pespconn)
const ip_addr_t ip_addr_any ICACHE_RODATA_ATTR
#define ICACHE_FLASH_ATTR
bool wifi_get_ip_info(uint8 if_index, struct ip_info *info)
err_t ICACHE_FLASH_ATTR espconn_udp_sendto(void *arg, uint8 *psent, uint16 length)
struct netif * eagle_lwip_getif(uint8 index)
uint8 wifi_get_opmode(void)
void ICACHE_FLASH_ATTR espconn_udp_disconnect(espconn_msg *pdiscon)
sint8 ICACHE_FLASH_ATTR espconn_udp_server(struct espconn *pespconn)
void espconn_list_creat(espconn_msg **phead, espconn_msg *pinsert)
#define LWIP_DEBUGF(debug, message)
void netif_set_default(struct netif *netif) ICACHE_FLASH_ATTR
sint8 ICACHE_FLASH_ATTR espconn_igmp_join(ip_addr_t *host_ip, ip_addr_t *multicast_ip)
typedefPACK_STRUCT_END struct ip_addr ip_addr_t
#define ip4_addr4_16(ipaddr)
sint8 ICACHE_FLASH_ATTR espconn_igmp_leave(ip_addr_t *host_ip, ip_addr_t *multicast_ip)
u8_t pbuf_free(struct pbuf *p) ICACHE_FLASH_ATTR
#define ip4_addr1_16(ipaddr)
u16_t pbuf_copy_partial(struct pbuf *p, void *dataptr, u16_t len, u16_t offset) ICACHE_FLASH_ATTR
espconn_recv_callback recv_callback
#define ip4_addr2_16(ipaddr)
#define netif_is_up(netif)
static void ICACHE_FLASH_ATTR espconn_data_sent(void *arg, enum send_opt opt)
err_t ICACHE_FLASH_ATTR espconn_udp_sent(void *arg, uint8 *psent, uint16 length)
struct espconn * pespconn
espconn_sent_callback sent_callback
struct pbuf * pbuf_alloc(pbuf_layer l, u16_t length, pbuf_type type) ICACHE_FLASH_ATTR
espconn_msg * plink_active
#define IP4_ADDR(ipaddr, a, b, c, d)