mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-14 13:01:23 +08:00
natPlainDatagramSocketImpl.cc (mcastGrp): Use new RFC 2533 socket options IPV6_JOIN_GROUP...
* java/net/natPlainDatagramSocketImpl.cc (mcastGrp): Use new RFC 2533 socket options IPV6_JOIN_GROUP, IPV6_LEAVE_GROUP, falling back to old RFC 2133 variants if missing. From-SVN: r44130
This commit is contained in:
parent
7ba0b0f7c6
commit
06c271c3cf
@ -1,3 +1,9 @@
|
||||
2001-07-18 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
|
||||
|
||||
* java/net/natPlainDatagramSocketImpl.cc (mcastGrp): Use new RFC
|
||||
2533 socket options IPV6_JOIN_GROUP, IPV6_LEAVE_GROUP, falling
|
||||
back to old RFC 2133 variants if missing.
|
||||
|
||||
2001-07-18 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* java/io/natFileWin32.cc (_access): Renamed.
|
||||
|
@ -415,7 +415,16 @@ java::net::PlainDatagramSocketImpl::mcastGrp (java::net::InetAddress *inetaddr,
|
||||
else if (len == 16)
|
||||
{
|
||||
level = IPPROTO_IPV6;
|
||||
opname = join ? IPV6_ADD_MEMBERSHIP : IPV6_DROP_MEMBERSHIP;
|
||||
|
||||
/* Prefer new RFC 2553 names. */
|
||||
#ifndef IPV6_JOIN_GROUP
|
||||
#define IPV6_JOIN_GROUP IPV6_ADD_MEMBERSHIP
|
||||
#endif
|
||||
#ifndef IPV6_LEAVE_GROUP
|
||||
#define IPV6_LEAVE_GROUP IPV6_DROP_MEMBERSHIP
|
||||
#endif
|
||||
|
||||
opname = join ? IPV6_JOIN_GROUP : IPV6_LEAVE_GROUP;
|
||||
memcpy (&u.mreq6.ipv6mr_multiaddr, bytes, len);
|
||||
// FIXME: If a non-default interface is set, use it; see Stevens p. 501.
|
||||
// Maybe not, see note in last paragraph at bottom of Stevens p. 497.
|
||||
|
Loading…
x
Reference in New Issue
Block a user