lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [patch #9169] Allows multicast packets through udp input la


From: David van Moolenbroek
Subject: [lwip-devel] [patch #9169] Allows multicast packets through udp input layer
Date: Sat, 17 Dec 2016 20:38:16 -0000
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0

Follow-up Comment #8, patch #9169 (project lwip):

> Am I missing something?

You really are confusing bind and connect. If you want to receive multicast
packets sent *to* 239.1.80.1, you bind the socket to 239.1.80.1 (along with
the destination port), in addition to joining the multicast group. If you want
to receive such packets sent *from* 192.168.1.2 or 192.168.1.3 only, you will
have to perform such source-IP checks in the application - but that does not
seem to be what you want anyway. In other words, to achieve what you
originally wanted, you can simply do this:

struct ip_addr multicast_addr;
IP4_ADDR(&multicast_addr, 239, 1, 80, 1);
int mPort= 12032;

udp_bind(this->pcb, &multicast_addr, mPort);

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/patch/?9169>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/




reply via email to

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