Without this, three of the tests fail on Linux kernels without IPv6
support.
This is a minimal fix, copy'n'pasting a conditional which was used in
other tests. It might be nicer to factor out the SupportsIPv6 to its
own utility function.
* configure.in: Check for if_nametoindex().
* socket-io.c (ves_icall_System_Net_Sockets_Socket_SetSocketOption_internal):
Mac OS doesn't allow interface = 0; use the interface id from the first
non-loopback interface.
* UdpClientTest.cs: Enable JoinMulticastGroup1_IPv6,
JoinMulticastGroup2_IPv6 and JoinMulticastGroup3_IPv6 on the Mac.
* configure.in: Add check for getifaddrs().
* socket-io.c: Implement get_local_ips() using getifaddrs()
if SIOCGIFCONF is not available.
* DnsTest.cs: Add GetHostEmpty_StringEmpty().
* UdpClientTest.cs(): Enable Available(), BeginReceive() and BeginSend()
on the Mac.
MulticastOptionTest.cs.
* Socket.cs: In GetSocketOption, throw SocketException when (byte [])
option value is null. Use SocketError fields instead of using "magic"
number. In SetSocketOption (SocketOptionLevel, SocketOptionName, object)
only accept Linger, AddMembership, DropMembership and verify option
value.
* MulticastOption.cs: Added argument checks. Save interfaceIndex that is
passed to .ctor, and removed MonoTODO. Renamed arguments to match MS.
Reset InterfaceIndex when LocalAddress is modified, and reset
LocalAddress when InterfaceIndex is modified.
* UdpClient.cs: Modified exception to more closely match MS. Fixed
(int, AddressFamily) .ctor to construct IPv6 endpoint when family is
InterNetworkV6. Added null check for multicastAddr to (IPAddress)
JoinMulticastGroup overload. In (int, IPAddress) and (IPAddress,
IPAddress) overloads of JoinMulticastGroup throw SocketException when
client is IPv4. Added null check for multicastAddr to (IPAddress, int),
overload, and moved JoinMulticastGroup call after argument checks.
* IPv6MulticastOption.cs: Renamed argument names to match MS. Added
null check to set_Group. Added range check to set_InterfaceIndex.
* IPv6MulticastOptionTest.cs: Added .ctor and property tests.
* MulticastOptionTest.cs: Added .ctor and property tests.
* SocketTest.cs: Fixed compiler warnings. Improved tests for
closed socket. Added tests fr GetSocketOption, and SetSocketOption
overloads (for Linger, DontLinger, AddMembership and DropMembership).
* UdpClientTest.cs: Added .ctor and JoinMulticastGroup tests.
svn path=/trunk/mcs/; revision=137048
* UdpClient.cs: Don't set the multicast option twice. Fixes bug
324033.
2007-10-30 Dick Porter <[email protected]>
* UdpClientTest.cs: Test for 324033.
svn path=/trunk/mcs/; revision=88456