9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Jeff Sickel <jas@corpus-callosum.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] multicast
Date: Sun, 24 May 2015 12:03:07 -0500	[thread overview]
Message-ID: <263E4319-FAB6-473C-AAE6-378BEC77DAB3@corpus-callosum.com> (raw)
In-Reply-To: <dfc16e101844756a7f41acb76794f608@quintile.net>

Steve,

Did you ever figure out how to setup addmulti?

-jas

> On Oct 6, 2014, at 10:41 AM, Steve Simon <steve@quintile.net> wrote:
>
> 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
>




  reply	other threads:[~2015-05-24 17:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-06 15:41 Steve Simon
2015-05-24 17:03 ` Jeff Sickel [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-12-24 19:06 [9fans] Multicast Adriano Verardo
2012-12-24 19:49 ` erik quanstrom

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=263E4319-FAB6-473C-AAE6-378BEC77DAB3@corpus-callosum.com \
    --to=jas@corpus-callosum.com \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).