Commit Graph
55 Commits
Author SHA1 Message Date
Alexander Köplinger daf2340d47 [System] Fixed an error in the implementation of System.Net.IPAddress.IsIPv6Teredo
The property was introduced with PR #870 but it missed to convert network byte order to host byte order, so the comparison
wasn't working correctly and the corresponding unit test failed. @marek-safar erroneously "fixed" the test in 27e07c7.

This is the corrected implementation and the original test now works as intended.
2014-02-01 22:02:27 +01:00
Fredrick Galoso d27abb23af [system] Add IsIPv6Teredo to System.Net.IpAddress
Adds support for checking for an IPv6 Teredo address, introduced in
.NET Framework 4.
2014-01-11 21:23:50 -06:00
Marek Safar 2e9d9f91be Remove old workaround 2013-02-22 21:41:18 +01:00
Rodrigo Kumpera 5007c14d62 Kill the MOONLIGHT define in System. 2013-02-11 13:01:11 -05:00
Miguel de Icaza f48ceb9860 [System] Removal of the NET_2_0 in the source code
Modulo the GUID in the assembly and the GUID embedded in some
field initializers that use the assembly GUID for their name, the
assemblies are idential before and after the patch.
2012-06-02 13:16:40 -04:00
Sebastien Pouliot 3dbfe75434 Fix parameters names inside System.Net.dll for 2.1 profile
* System.Net/System.Net.Sockets/SocketException_2_1.cs:
* System.Net/System.Net/WebClient_2_1.cs:
* System.Net/System.Net/WebRequest_2_1.cs:
* System/System.Net.Sockets/Socket_2_1.cs:
* System/System.Net/Cookie.cs:
* System/System.Net/DnsEndPoint.cs:
* System/System.Net/EndPoint.cs:
* System/System.Net/IPAddress.cs:
* System/System.Net/IPEndPoint.cs:
* System/System.Net/SocketAddress.cs:
	Remove all red ! from corcompare in System.Net.dll (Silverlight
	4 profile) to make it easier to pinpoint other errors/warnings.
2011-02-15 08:38:06 -05:00
Sebastien Pouliot d8fa9bbba0 Fix exceptions wrt IPAddress.ScopeId
* System.Net/IPAddress.cs: ScopeId can only be set on IPv6 or it throws
a SocketException (not an Exception). ScopeId is also limited from 0 to
2^32.
2010-09-22 21:30:00 -04:00
Miguel de Icaza aa4c883087 Flush
svn path=/trunk/mcs/; revision=160487
2010-07-16 15:17:38 +00:00
Miguel de Icaza 373cc83ce0 Flush
svn path=/trunk/mcs/; revision=160486
2010-07-16 15:17:05 +00:00
Gonzalo Paniagua Javier 1814e5864d 2010-07-14 Gonzalo Paniagua Javier <[email protected]>
* IPAddress.cs: allow values out of range as MS does.


svn path=/trunk/mcs/; revision=160379
2010-07-14 20:30:22 +00:00
Gonzalo Paniagua Javier 2ca7fdcc4c 2010-06-28 Gonzalo Paniagua Javier <[email protected]>
* IPAddress.cs: verify the last IPv4 digit too.
	Fixes bug #612135.


svn path=/trunk/mcs/; revision=159635
2010-06-28 22:15:34 +00:00
Sebastien Pouliot 67c128cf74 2009-11-30 Sebastien Pouliot <[email protected]>
* CookieCollection.cs: Seal inner CookieCollectionPathComparer
	* IPAddress.cs: Avoid multiple casts in Equals
	* SocketAddress.cs: Avoid multiple casts in Equals
	[Found using Gendarme]


svn path=/trunk/mcs/; revision=147163
2009-12-01 02:07:06 +00:00
Gonzalo Paniagua Javier 3a3cce358a 2009-03-03 Gonzalo Paniagua Javier <[email protected]>
* IPAddress.cs: don't allocate the IPv6 array for IPv4 addresses.


svn path=/trunk/mcs/; revision=128515
2009-03-04 03:15:52 +00:00
Gonzalo Paniagua Javier 975f926771 2009-01-20 Gonzalo Paniagua Javier <[email protected]>
* IPAddress.cs: handle sign extension for the high byte when using the
	byte[] ctor for an IPv4 address.
	Fixes bug #467472.


svn path=/trunk/mcs/; revision=123856
2009-01-20 06:31:18 +00:00
Gonzalo Paniagua Javier e9347b2c23 2008-12-20 Gonzalo Paniagua Javier <[email protected]>
* IPAddress.cs: avoid throwing when parsing a subnet.


svn path=/trunk/mcs/; revision=121921
2008-12-20 09:37:22 +00:00
Miguel de Icaza a5e319e504 2008-08-06 Miguel de Icaza <[email protected]>
* Uri.cs: Use exception-less operations.

2008-08-06  Miguel de Icaza  <[email protected]>

	* IPAddress.cs (ParseIPV6): Use an exception-less parser for ipv6
	addresses.

	* IPv6Address.cs: Rewrite most of the parsing code to not use that
	incredibly fragile, hacky and hacky implementation.

	(TryParse): Provide a exception-less parsing path.


svn path=/trunk/mcs/; revision=109802
2008-08-06 23:34:16 +00:00
Atsushi Eno 8d708f6fbd 2008-08-06 Atsushi Enomoto <[email protected]>
* IPAddress.cs : several IPv4 parsing fix exposed by bug #411920.

	* IPAddressTest.cs : added test strings for bug #411920 as well as
	  enabling some ipv4ParseOK strings.


svn path=/trunk/mcs/; revision=109737
2008-08-06 05:21:04 +00:00
Stephane Delcroix 3cd8286c8d comments
svn path=/trunk/mcs/; revision=105431
2008-06-10 13:59:09 +00:00
Stephane Delcroix 1c4ef08b79 2008-06-10 Stephane Delcroix <[email protected]>
* IPAddress: allow usage on 2.1

svn path=/trunk/mcs/; revision=105425
2008-06-10 13:46:07 +00:00
Gert Driesen b26da0a865 * IPAddress.cs (Parse): Changed argument name to match MS.
(TryParse): Changed argument name to match MS.
(ParseIPV4): Only treat zero-length or " " address as empty on 1.0
profile. On 2.0 profile, only ignore characters after blank if last
part is valid hex string.
* IPv6Address.cs: Removed extra spaces and tabs.
* IPAddressTest.cs: Remove use of deprecated Assertion. Improved
existing tests.

svn path=/trunk/mcs/; revision=94052
2008-01-27 15:20:02 +00:00
Atsushi Eno b21b41fb95 2007-08-29 Atsushi Enomoto <[email protected]>
* IPAddress.cs, IPv6Address.cs : (ToString) output ScopeId.

	* IPAddressTest.cs : added an address with scope id to parse/format
	  test.


svn path=/trunk/mcs/; revision=85016
2007-08-29 18:00:42 +00:00
Alan McGovern a76a31a3ee Further optimisation for the Swap*** methods. SwapLong is now twice as fast as the initial method.
svn path=/trunk/mcs/; revision=74962
2007-03-25 17:12:05 +00:00
Alan McGovern f37ac6dc43 Optimised the SwapInt and SwapLong methods
svn path=/trunk/mcs/; revision=74941
2007-03-24 17:37:24 +00:00
Gert Driesen 098d7508d8 * IPAddressTest.cs: Added test for invalid addresses. Fixed 4-byte
test on 2.0 profile.
* IPAddress.cs: Provide more meaningful exception message on 2.0
profile.

svn path=/trunk/mcs/; revision=71811
2007-01-28 16:23:05 +00:00
Gert Driesen 819d4c3f16 * IPAddress.cs: On 1.1, 4-byte addresses are not supported in the
ctor. Added null checks for the address passed in the ctors.
* IPAddressTest.cs: Added 4-byte and null address tests.

svn path=/trunk/mcs/; revision=70191
2006-12-28 21:18:12 +00:00
Miguel de Icaza 552b134b6b 2006-12-28 Miguel de Icaza <[email protected]>
* IPAddress.cs: The condition in 1.1 was broken, it only allowed
	16-byte addresses, and never 4-byte addresses (only 2.0 had
	them).  

	Keep a single code path.

	Also, remove all the NET_1_1 defines, we realistically only
	distinguish between 1.1 and 2.0, we wont likely support 1.0, 1.1
	and 2.0, so remove the 1.0 vs 1.1 conditionals.

	Fixes 76792


svn path=/trunk/mcs/; revision=70174
2006-12-28 18:07:33 +00:00
Atsushi Eno 370fb4b787 2006-03-28 Atsushi Enomoto <[email protected]>
* IPAddress.cs : ugh, I was testing with run-test-ondotnet, not
	  run-test. Those IPv6 properties needed to be reimplemented.

	* IPAddressTest.cs : actually #11 in TryParse() is not working.
	  added more tests on IsIPv6Blah properties.


svn path=/trunk/mcs/; revision=58634
2006-03-28 01:09:20 +00:00
Atsushi Eno 82e07f0f17 2006-03-27 Atsushi Enomoto <[email protected]>
* IPAddress.cs : added NET_2_0 TryParse() and IPv6 related properties.

	* IPAddressTest.cs : added some tests for TryParse() and IPv6 related
	  properties.


svn path=/trunk/mcs/; revision=58613
2006-03-27 19:12:24 +00:00
Miguel de Icaza a5bd130af9 2006-03-11 Miguel de Icaza <[email protected]>
* Uri.cs: Pragma disable warning 612 (Obsolete methods are being
	used by us internally).

	Ponder: should we instead move our methods to use new versions of
	the Obsoleted ones?

2006-03-11  Miguel de Icaza  <[email protected]>

	* CodeNamespaceImportCollection.cs: It turns out that a lot of the
	errors flagged with "!" were just missing explicit interface
	implementations.  

	Implement.

2006-03-11  Miguel de Icaza  <[email protected]>

	* CodeDomConfigurationHandler.cs: Comment out unused methods. 

	* TempFileCollection.cs: Implement explicitly some interface
	methods to get rid of the "!" errors on CorCompare.

2006-03-11  Miguel de Icaza  <[email protected]>

	* Queue.cs: Flag as serializable.

	* LinkedList.cs (OnDeserialization): Fix signature. 

	* SortedList.cs: Implement explicitly a few methods that were
	flagged by corcompare. 

2006-03-11  Miguel de Icaza  <[email protected]>

	* IOrderedDictionary.cs: Flag GetEnumerator as a "new" method to
	avoid warning.

2006-03-11  Miguel de Icaza  <[email protected]>

	* ConfigurationSettings.cs (ChangeConfigurationSettings): Make
	internal to avoid warnings.  This routine is called from
	System.Web with MethodInfo.Invoke.

2006-03-11  Miguel de Icaza  <[email protected]>

	* DeflateStream.cs: Comment out DllImport that was not being
	used. 

2006-03-11  Miguel de Icaza  <[email protected]>

	* y

	* SerialPort.cs: Remove unused variable (writeBuffer). 

	* SerialPortStream.cs (Dispose): override, not new.

2006-03-11  Miguel de Icaza  <[email protected]>

	* WebClient.cs: Only expose the right methods to avoid warnings. 

	* FtpDataStream.cs (Dispose): Fix signature.

	* FtpWebResponse.cs: Comment out keepAlive field (unused, sounds
	like we are missing features here).

	* IPAddress.cs: Move m_HashCode property to the end, and set
	pragmas to disable warnings.

2006-03-11  Miguel de Icaza  <[email protected]>

	* MailAddress.cs: Comment out unused field to remove warning. 

2006-03-11  Miguel de Icaza  <[email protected]>

	* NetworkChange.cs: Use pragmas to eliminate warnings from events
	that we do not trigger yet.

	This is a candidate for using Aaron's NetworkManager code.  But
	would make us depend on d-bus.

	* NetworkInformationException.cs: Use error_code for ErrorCode,
	instead of NativeErrorCode.   Fixes warning. 

2006-03-11  Miguel de Icaza  <[email protected]>

	* AuthenticatedStream.cs: Fixed normative parameter names (yes, we
	need to do this everywhere one day).

	(Close): actually obey the "leaveInnerStreamOpen" setting from the
	constructor. 

2006-03-11  Miguel de Icaza  <[email protected]>

	* NetworkStream.cs (Dispose): Use the right signature depending on
	the profile being built.

2006-03-11  Miguel de Icaza  <[email protected]>

	* X509Chain.cs: Flagged member as internal to avoid unused warning.

	* X500DistinguishedName.cs: Comment out unused names and move
	temporary unused variables inside the comments that were removed 



svn path=/trunk/mcs/; revision=57836
2006-03-11 19:07:56 +00:00
Gonzalo Paniagua Javier 790fc2cb03 2005-11-22 Gonzalo Paniagua Javier <[email protected]>
* IPAddress.cs: the byte[] ctor supports length 4 in .NET 2.0.
	Fixes bug #76792.


svn path=/trunk/mcs/; revision=53374
2005-11-22 23:53:10 +00:00
Ben Maurer 0e8decdb37 remove svn:executable from .cs files
svn path=/trunk/mcs/; revision=46562
2005-06-27 15:51:40 +00:00
Lluis Sanchez edb7d82479 2005-06-27 Lluis Sanchez Gual <[email protected]>
* IPAddress.cs: Changed field names for the sake of serialization
	interoperability with MS.NET.
	

svn path=/trunk/mcs/; revision=46551
2005-06-27 12:15:18 +00:00
Zoltan Varga 9657791b8f 2005-02-08 Zoltan Varga <[email protected]>
* IPv6Address.cs: Fix endianess problems.

	* IPAddress.cs: Fix misleading comments.

svn path=/trunk/mcs/; revision=40312
2005-02-08 18:03:59 +00:00
Jonathan Pryor d362d89e61 * IPAddress.cs (ParseIPV4): Fix so that the regression tests work. In
particular, " foo" and ".1.1.6" weren't being caught (" foo" because it
    started with a space, and ".1.1.6" because the split string accepted a
    0-length portion, which would make 1...6 valid, but isn't valid based on
    similar test cases).

svn path=/trunk/mcs/; revision=39265
2005-01-20 18:27:09 +00:00
Duncan Mak 24f5ef2c44 Add MIT license to System.dll
svn path=/trunk/mcs/; revision=30054
2004-06-21 18:02:11 +00:00
Gonzalo Paniagua Javier 01040c6fdd 2004-05-26 Gonzalo Paniagua Javier <[email protected]>
* IPAddress.cs:
	* IPEndPoint.cs:
	* IPv6Address.cs: no more warnings about IPAddress.Address.

svn path=/trunk/mcs/; revision=28086
2004-05-25 21:28:41 +00:00
Gonzalo Paniagua Javier d51339b19b *** empty log message ***
svn path=/trunk/mcs/; revision=28083
2004-05-25 21:12:04 +00:00
Gonzalo Paniagua Javier 1100cc2718 2003-11-06 Gonzalo Paniagua Javier <[email protected]>
* IPAddress.cs: prevent exceptions when trying to parse the static IPv6
	addresses.

svn path=/trunk/mcs/; revision=19670
2003-11-06 07:51:11 +00:00
Andreas N 84c5f4a194 2003-07-15 Andreas Nahr <[email protected]>
* ChunkStream.cs: Removed unused members
	* IPAddress.cs: Removed unused exception variable, fixes compiler warning
	* WebConnection.cs: Removed unused exception variables, fixes compiler warnings

svn path=/trunk/mcs/; revision=16260
2003-07-15 10:07:15 +00:00
Jerome Laban dac25c46ee 2003-07-14 Jerome Laban <[email protected]>
* Dns.cs: Reworked indentation.
        Added IPv6 support.
        Added literal address checking in GetHostByAddress.
        Changed Dns.Resolve behavior.
        * IPAddress.cs:
        * IPEndPoint.cs: Added IPv6 support.
        * IPv6Address.cs: Added address compression.
        * NetConfig.cs: Added configuration section.

svn path=/trunk/mcs/; revision=16215
2003-07-14 16:00:44 +00:00
Lawrence Pit 386573a380 * Rewrote IPAddress.Parse method, passing all unit tests
svn path=/trunk/mcs/; revision=4439
2002-05-09 10:43:34 +00:00
Lawrence Pit 786a3bc57b 2002-05-09 Lawrence Pit <[email protected]>
* fixed bug in IPEndPoint.Equals method
	* fixed bug in IPAddress.Parse method
	* fixed bug in IPAddress.SwapLong method
	* fixed several bugs in Cookie.cs

svn path=/trunk/mcs/; revision=4435
2002-05-09 07:53:17 +00:00
Lawrence Pit 09eec67e24 * IPAddress.cs: fixed IsLoopback, address was already in host order
svn path=/trunk/mcs/; revision=4296
2002-05-05 07:44:02 +00:00
Gonzalo Paniagua Javier 4c65b83dbd 2002-04-24 Gonzalo Paniagua Javier <[email protected]>
* IPAddress.cs: initialize the read only fields with Parse().

svn path=/trunk/mcs/; revision=4004
2002-04-23 21:10:02 +00:00
Gonzalo Paniagua Javier df2229db90 2002-04-18 Gonzalo Paniagua Javier <[email protected]>
* IPAddress.cs: little changes to behave as MS.

svn path=/trunk/mcs/; revision=3901
2002-04-18 18:27:26 +00:00
Gonzalo Paniagua Javier d696caf330 2002-04-17 Gonzalo Paniagua Javier <[email protected]>
* IPAddress.cs: the icalls for sockets are endianness-aware. So I
	changed a few things. Also included a workaround for bug #23547.

svn path=/trunk/mcs/; revision=3867
2002-04-16 23:07:29 +00:00
Gonzalo Paniagua Javier b8e938a053 2002-04-15 Gonzalo Paniagua Javier <[email protected]>
* IPAddress.cs: use System.BitConverter.IsLittleEndian (suggested
	by Paolo) instead of guessing the endianness.

	* SocketAddress.cs: implemented Equals() and GetHashcode().

svn path=/trunk/mcs/; revision=3834
2002-04-15 16:20:04 +00:00
Gonzalo Paniagua Javier 3731330ebb Some changes to behave as MS does.
svn path=/trunk/mcs/; revision=3817
2002-04-15 00:47:14 +00:00
Gonzalo Paniagua Javier 7ad05ce959 2002-04-15 Gonzalo Paniagua Javier <[email protected]>
* IPAddress.cs: finished all MonoTODO's. Use network order to store 
	the address. Check for max and min values in Address:set. IsLoopback()
	returns now true for all 127.x.y.z. Some more checks in Parse ().

svn path=/trunk/mcs/; revision=3816
2002-04-14 23:47:37 +00:00
Dick Porter e383305479 Added a comment
svn path=/trunk/mcs/; revision=2355
2002-02-12 18:07:33 +00:00