author | chegar |
Thu, 20 Jun 2013 18:53:57 +0100 | |
changeset 18534 | 2d131cf5db63 |
permissions | -rw-r--r-- |
18534
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
1 |
/* |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
2 |
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
4 |
* |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation. |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
8 |
* |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
13 |
* accompanied this code). |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
14 |
* |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
15 |
* You should have received a copy of the GNU General Public License version |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
18 |
* |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
21 |
* questions. |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
22 |
* |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
23 |
|
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
24 |
/* @test |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
25 |
* @bug 8014499 |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
26 |
* @summary Test for interference when two sockets are bound to the same |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
27 |
* port but joined to different multicast groups |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
28 |
* @run main Promiscuous |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
29 |
* @run main/othervm -Djava.net.preferIPv4Stack=true Promiscuous |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
30 |
*/ |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
31 |
|
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
32 |
import java.io.IOException; |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
33 |
import static java.lang.System.out; |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
34 |
import java.net.*; |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
35 |
|
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
36 |
public class Promiscuous { |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
37 |
|
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
38 |
static final int TIMEOUT = 5 * 1000; // 5 secs |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
39 |
static int id = 1000; |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
40 |
|
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
41 |
static void receive(MulticastSocket mc, boolean datagramExpected, int id) |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
42 |
throws IOException |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
43 |
{ |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
44 |
byte[] ba = new byte[100]; |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
45 |
DatagramPacket p = new DatagramPacket(ba, ba.length); |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
46 |
try { |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
47 |
mc.receive(p); |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
48 |
int recvId = Integer.parseInt( |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
49 |
new String(p.getData(), 0, p.getLength(), "UTF-8")); |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
50 |
if (datagramExpected) { |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
51 |
if (recvId != id) |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
52 |
throw new RuntimeException("Unexpected id, got " + recvId |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
53 |
+ ", expected: " + id); |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
54 |
out.printf("Received message as expected, %s\n", p.getAddress()); |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
55 |
} else { |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
56 |
throw new RuntimeException("Unexpected message received, " |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
57 |
+ p.getAddress()); |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
58 |
} |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
59 |
} catch (SocketTimeoutException e) { |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
60 |
if (datagramExpected) |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
61 |
throw new RuntimeException("Expected message not received, " |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
62 |
+ e.getMessage()); |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
63 |
else |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
64 |
out.printf("Message not received, as expected\n"); |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
65 |
} |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
66 |
} |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
67 |
|
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
68 |
static void test(InetAddress group1, InetAddress group2) |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
69 |
throws IOException |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
70 |
{ |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
71 |
try (MulticastSocket mc1 = new MulticastSocket(); |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
72 |
MulticastSocket mc2 = new MulticastSocket(mc1.getLocalPort()); |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
73 |
DatagramSocket ds = new DatagramSocket()) { |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
74 |
final int port = mc1.getLocalPort(); |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
75 |
out.printf("Using port: %d\n", port); |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
76 |
|
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
77 |
mc1.setSoTimeout(TIMEOUT); |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
78 |
mc2.setSoTimeout(TIMEOUT); |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
79 |
int nextId = id; |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
80 |
byte[] msg = Integer.toString(nextId).getBytes("UTF-8"); |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
81 |
DatagramPacket p = new DatagramPacket(msg, msg.length); |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
82 |
p.setAddress(group1); |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
83 |
p.setPort(port); |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
84 |
|
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
85 |
mc1.joinGroup(group1); |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
86 |
out.printf("mc1 joined the MC group: %s\n", group1); |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
87 |
mc2.joinGroup(group2); |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
88 |
out.printf("mc2 joined the MC group: %s\n", group2); |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
89 |
|
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
90 |
out.printf("Sending datagram to: %s/%d\n", group1, port); |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
91 |
ds.send(p); |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
92 |
|
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
93 |
// the packet should be received by mc1 only |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
94 |
receive(mc1, true, nextId); |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
95 |
receive(mc2, false, 0); |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
96 |
|
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
97 |
nextId = ++id; |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
98 |
msg = Integer.toString(nextId).getBytes("UTF-8"); |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
99 |
p = new DatagramPacket(msg, msg.length); |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
100 |
p.setAddress(group2); |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
101 |
p.setPort(port); |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
102 |
|
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
103 |
out.printf("Sending datagram to: %s/%d\n", group2, port); |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
104 |
ds.send(p); |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
105 |
|
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
106 |
// the packet should be received by mc2 only |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
107 |
receive(mc2, true, nextId); |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
108 |
receive(mc1, false, 0); |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
109 |
|
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
110 |
mc1.leaveGroup(group1); |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
111 |
mc2.leaveGroup(group2); |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
112 |
} |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
113 |
} |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
114 |
|
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
115 |
public static void main(String args[]) throws IOException { |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
116 |
String os = System.getProperty("os.name"); |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
117 |
|
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
118 |
// Requires IP_MULTICAST_ALL on Linux (new since 2.6.31) so skip |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
119 |
// on older kernels. Note that we skip on <= version 3 to keep the |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
120 |
// parsing simple |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
121 |
if (os.equals("Linux")) { |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
122 |
String osversion = System.getProperty("os.version"); |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
123 |
String[] vers = osversion.split("\\.", 0); |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
124 |
int major = Integer.parseInt(vers[0]); |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
125 |
if (major < 3) { |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
126 |
System.out.format("Kernel version is %s, test skipped%n", osversion); |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
127 |
return; |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
128 |
} |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
129 |
} |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
130 |
|
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
131 |
// multicast groups used for the test |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
132 |
InetAddress ip4Group1 = InetAddress.getByName("224.7.8.9"); |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
133 |
InetAddress ip4Group2 = InetAddress.getByName("225.4.5.6"); |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
134 |
|
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
135 |
test(ip4Group1, ip4Group2); |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
136 |
} |
2d131cf5db63
8014499: MulticastSocket should enable IP_MULTICAST_ALL (lnx)
chegar
parents:
diff
changeset
|
137 |
} |