9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] Multicast
@ 2012-12-24 19:06 Adriano Verardo
  2012-12-24 19:49 ` erik quanstrom
  0 siblings, 1 reply; 4+ messages in thread
From: Adriano Verardo @ 2012-12-24 19:06 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

Hi, all
I need to define a unicast group to implement an application on a set of
cooperative CPUs.
The ip(3) man page is (for me) not clear enough and searching  for
"multicast" etc in /sys/src/*/*/...
doesn't give any useful result. The same looking in sources/contrib

Where can I find an example on how to exchange multicast packets among
CPUs wired to the
same ethernet switch ?

Thanks in advance
adriano



^ permalink raw reply	[flat|nested] 4+ messages in thread
* [9fans] multicast
@ 2014-10-06 15:41 Steve Simon
  2015-05-24 17:03 ` Jeff Sickel
  0 siblings, 1 reply; 4+ messages in thread
From: Steve Simon @ 2014-10-06 15:41 UTC (permalink / raw)
  To: 9fans

I am trying to listen to multicast DNS packets
but when I try to configure the IP interface it fails,
what am I missing?

I do this (multicast with promiscuous)

	snprint(addr, sizeof(addr), "%s/udp!*!*", Netdir);
	if((cfd = announce(addr, dir)) < 0)
		sysfatal("%s cannot announce, %r\n", addr);
	if(fprint(cfd, "addmulti 224.0.0.251") < 0)
		sysfatal("add multicast addr 224.0.0.251 failed, %r");

and it dies with 'addmulti for a non multicast address'

which is caused by this failing:

/sys/src/9/ip/ipifc.c

	int
	ipismulticast(uchar *ip)
	{
		if(isv4(ip)){
			if(ip[IPv4off] >= 0xe0 && ip[IPv4off] < 0xf0)
				return V4;
		}
		else if(ip[0] == 0xff)
			return V6;
		return 0;
	}

But 0xe0 is 224 so it should not fail.

I'am very confused.

-Steve



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-05-24 17:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-24 19:06 [9fans] Multicast Adriano Verardo
2012-12-24 19:49 ` erik quanstrom
2014-10-06 15:41 [9fans] multicast Steve Simon
2015-05-24 17:03 ` Jeff Sickel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).