From: "w.szukalski" <szukw000@students.uni-mainz.de>
To: <netdev@oss.sgi.com>
Subject: linux-2.4.21 and IPv6
Date: Sun, 17 Aug 2003 02:09:25 GMT [thread overview]
Message-ID: <20030817020925.A875@keun> (raw)
I have written a small program to test IPv6 multicasting
with linux-2.4.21. A LAN connects three linux boxes.
I have found, that IPv6 sometimes fails.
With IPv6 group 'ff02::1':
struct sockaddr_in6 read6, write6;
struct ipv6_mreq mreq6;
inet_pton(AF_INET6, group, &mreq6.ipv6mr_multiaddr);
read6.sin6_family = AF_INET6;
read6.sin6_port = htons(readport);
read6.sin6_flowinfo = 0;
read6.sin6_scope_id = 0;
// ALTERNATIVE 1:
memset(&read6.sin6_addr, 0, sizeof(struct in6_addr));
// ALTERNATIVE 2:
inet_pton(AF_INET6, host, &read6.sin6_addr);
// ALTERNATIVE 3:
read6.sin6_addr = mreq6.ipv6mr_multiaddr;
bind(reader, (struct sockaddr *)&read6, sizeof(read6) );
bind() fails for alternative 3 with 'Invalid argument'.
connect(writer, (struct sockaddr*)&write6,
sizeof(struct sockaddr_in6));
connect() always fails with 'Invalid argument'.
With IPv4 group '224.0.0.1':
struct sockaddr_in read4, write4;
struct ip_mreq mreq4;
inet_pton(AF_INET, group, &mreq4.imr_multiaddr);
read4.sin_family = AF_INET;
read4.sin_port = htons(readport);
// ALTERNATIVE 1:
read4.sin_addr.s_addr = 0;
// ALTERNATIVE 2:
inet_pton(AF_INET, host, &read4.sin_addr);
// ALTERNATIVE 3:
read4.sin_addr = mreq4.imr_multiaddr;
bind(reader, (struct sockaddr *)&read4, sizeof(read4) );
bind() never fails.
connect(writer, (struct sockaddr*)&write4,
sizeof(struct sockaddr_in));
connect() never fails.
Why does IPv6 sometimes fail?
winfried
next reply other threads:[~2003-08-17 2:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-08-17 2:09 w.szukalski [this message]
2003-08-17 14:34 ` linux-2.4.21 and IPv6 YOSHIFUJI Hideaki / 吉藤英明
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=20030817020925.A875@keun \
--to=szukw000@students.uni-mainz.de \
--cc=netdev@oss.sgi.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.