Date: Thu, 31 Jan 2013 22:23:26 -0800 From: Tim Kientzle <tim@kientzle.com> To: John Baldwin <jhb@FreeBSD.org> Cc: freebsd-hackers@FreeBSD.org Subject: Re: Testing SIOCADDMULTI? Message-ID: <965B76D3-8BE8-4DA1-8A48-D22238490D03@kientzle.com> In-Reply-To: <201301281109.24879.jhb@freebsd.org> References: <AE65AFB2-A767-4457-B30A-007956A7D216@freebsd.org> <7A0E9B71-0232-4808-B5D4-5B0D811B353C@kientzle.com> <201301281109.24879.jhb@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Jan 28, 2013, at 8:09 AM, John Baldwin wrote: > On Sunday, January 27, 2013 1:51:12 am Tim Kientzle wrote: >>=20 >> On Jan 26, 2013, at 3:56 PM, Tim Kientzle wrote: >>=20 >>> My next TODO items for this network driver is to implement >>> the SIOCADDMULTI and SIOCDELMULTI ioctls. >>=20 >> DELMULTI seems trickier. ... >> ... it looks like I have no choice but to remove >> every multicast address from the controller and then >> re-insert all of the ones that are still valid. >> ... >> Is there a better approach? >=20 > You should always reprogram the full table while holding = if_maddr_rlock(). Thanks. That's ultimately what I did. I was able to dump the table from the controller to eyeball that the entries looked right but haven't yet done any testing beyond that. >> Would still appreciate any suggestions for how to test these. >=20 > You can write a simple app to listen for UDP packets and have it join = a=20 > multicast group and have another machine on the same network write a = packet to=20 > the multicast group. I tried this first, but the test program worked fine even without ADDMULTI/DELMULTI support. Watching tcpdump -e, it appears that IP4 multicast UDP uses broadcast at the Ethernet layer. > However, a simpler test is to toggle the sysctl to enable multicast = ping=20 > replies and to ping a multicast address from another machine after = joining it=20 > on the test machine using mutest. Ahhh=85. I wasn't aware of these tools; I'll take a look. Thanks for the pointer! Tim
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?965B76D3-8BE8-4DA1-8A48-D22238490D03>