From: "Steve Simon" <steve@quintile.net>
To: 9fans@9fans.net
Subject: [9fans] multicast
Date: Mon, 6 Oct 2014 16:41:42 +0100 [thread overview]
Message-ID: <dfc16e101844756a7f41acb76794f608@quintile.net> (raw)
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
next reply other threads:[~2014-10-06 15:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-06 15:41 Steve Simon [this message]
2015-05-24 17:03 ` Jeff Sickel
-- 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=dfc16e101844756a7f41acb76794f608@quintile.net \
--to=steve@quintile.net \
--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).