lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] raw UDP pcb issue(s)


From: Sergio R. Caprile
Subject: Re: [lwip-users] raw UDP pcb issue(s)
Date: Mon, 18 Jul 2016 10:54:13 -0300
User-agent: Mozilla/5.0 (Windows NT 6.1; rv:45.0) Gecko/20100101 Thunderbird/45.2.0

It shouldn't
Check your code against the docs or the wiki
http://lwip.wikia.com/wiki/Raw/UDP

My code is something like:

        mypcb = udp_new() != NULL
        DEST_IP(&ipaddr);

// for SPECIFIC other end IP address
        udp_connect(mypcb, &ipaddr, DEST_PORT) == ERR_OK
// otherwise, to connect to anyone
        udp_bind(mypcb, IP_ADDR_ANY, LOCAL_PORT) == ERR_OK

        udp_recv(mypcb, myrecv, NULL);

Perhaps you are not using IP_ADDR_ANY ?

To send:
// for SPECIFIC other end IP address, set in udp_connect()
        udp_send(pcb, p);
// otherwise, you have to know the other end somehow (e.g.: from the callback parameters)
        udp_sendto(pcb, p, &addr, port);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]