emulation on host: various fixes by d-a-v · Pull Request #7355 · esp8266/Arduino

Expand Up @@ -28,6 +28,8 @@ class UdpContext; #define GET_IP_HDR(pb) reinterpret_cast<ip_hdr*>(((uint8_t*)((pb)->payload)) - UDP_HLEN - IP_HLEN); #define GET_UDP_HDR(pb) reinterpret_cast<udp_hdr*>(((uint8_t*)((pb)->payload)) - UDP_HLEN);
extern netif netif0;
class UdpContext { public: Expand Down Expand Up @@ -86,12 +88,24 @@ class UdpContext _dst.addr = staticMCastAddr; }
void setMulticastInterface(netif* p_pNetIf) { (void)p_pNetIf; // user multicast, and this is how it works with posix: send to multicast address: _dst.addr = staticMCastAddr; }
void setMulticastTTL(int ttl) { (void)ttl; //mockverbose("TODO: UdpContext::setMulticastTTL\n"); }
netif* getInputNetif() const { return &netif0; }
// warning: handler is called from tcp stack context // esp_yield and non-reentrant functions which depend on it will fail void onRx(rxhandler_t handler) { Expand Down Expand Up @@ -246,7 +260,7 @@ class UdpContext uint8_t addr[16]; };
inline err_t igmp_joingroup (const ip4_addr_t *ifaddr, const ip4_addr_t *groupaddr) extern "C" inline err_t igmp_joingroup (const ip4_addr_t *ifaddr, const ip4_addr_t *groupaddr) { (void)ifaddr; UdpContext::staticMCastAddr = groupaddr->addr; Expand Down