158 references to InterNetwork
IIS.Common.TestLib (2)
TestConnections.cs (2)
30: this(port, AddressFamily.InterNetwork) 240if (addressFamily != AddressFamily.InterNetwork && addressFamily != AddressFamily.InterNetworkV6)
IIS.FunctionalTests (1)
src\Servers\IIS\IIS\test\Common.FunctionalTests\AspNetCorePortTests.cs (1)
161using (var socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp))
IIS.LongTests (1)
src\Servers\IIS\IIS\test\Common.LongTests\StartupTests.cs (1)
1443using (var socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp))
IIS.NewHandler.FunctionalTests (1)
src\Servers\IIS\IIS\test\Common.LongTests\StartupTests.cs (1)
1443using (var socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp))
IIS.NewShim.FunctionalTests (1)
src\Servers\IIS\IIS\test\Common.LongTests\StartupTests.cs (1)
1443using (var socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp))
IISExpress.FunctionalTests (2)
src\Servers\IIS\IIS\test\Common.FunctionalTests\AspNetCorePortTests.cs (1)
161using (var socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp))
src\Servers\IIS\IIS\test\Common.LongTests\StartupTests.cs (1)
1443using (var socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp))
InMemory.FunctionalTests (5)
src\Servers\Kestrel\shared\test\CertHelper.cs (2)
48using (Socket listener = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp)) 53var clientSocket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
src\Servers\Kestrel\shared\test\TestConnection.cs (3)
18: this(port, AddressFamily.InterNetwork) 56public static Socket CreateConnectedLoopbackSocket(int port) => CreateConnectedLoopbackSocket(port, AddressFamily.InterNetwork); 60if (addressFamily != AddressFamily.InterNetwork && addressFamily != AddressFamily.InterNetworkV6)
Microsoft.AspNetCore.Grpc.JsonTranscoding (1)
Internal\JsonTranscodingServerCallContext.cs (1)
87case AddressFamily.InterNetwork:
Microsoft.AspNetCore.HttpOverrides (1)
IPNetwork.cs (1)
105AddressFamily.InterNetwork => prefixLength <= 32,
Microsoft.AspNetCore.Server.HttpSys (3)
src\Shared\HttpSys\NativeInterop\SocketAddress.cs (3)
42else if (Family == AddressFamily.InterNetwork) 69if (addressFamily == (ushort)AddressFamily.InterNetwork) 71var v4address = new SocketAddress(AddressFamily.InterNetwork, IPv4AddressSize);
Microsoft.AspNetCore.Server.IIS (3)
src\Shared\HttpSys\NativeInterop\SocketAddress.cs (3)
42else if (Family == AddressFamily.InterNetwork) 69if (addressFamily == (ushort)AddressFamily.InterNetwork) 71var v4address = new SocketAddress(AddressFamily.InterNetwork, IPv4AddressSize);
Microsoft.AspNetCore.Server.IntegrationTesting (3)
Common\TestPortHelper.cs (2)
24using (var socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp)) 37using (var socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp))
Deployers\NginxDeployer.cs (1)
45_portSelector = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
Microsoft.AspNetCore.Server.Kestrel.Core (1)
Internal\Infrastructure\KestrelMetrics.cs (1)
332case AddressFamily.InterNetwork:
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (5)
src\Servers\Kestrel\shared\test\CertHelper.cs (2)
48using (Socket listener = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp)) 53var clientSocket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
src\Servers\Kestrel\shared\test\TestConnection.cs (3)
18: this(port, AddressFamily.InterNetwork) 56public static Socket CreateConnectedLoopbackSocket(int port) => CreateConnectedLoopbackSocket(port, AddressFamily.InterNetwork); 60if (addressFamily != AddressFamily.InterNetwork && addressFamily != AddressFamily.InterNetworkV6)
Microsoft.AspNetCore.Shared.Tests (3)
src\Shared\HttpSys\NativeInterop\SocketAddress.cs (3)
42else if (Family == AddressFamily.InterNetwork) 69if (addressFamily == (ushort)AddressFamily.InterNetwork) 71var v4address = new SocketAddress(AddressFamily.InterNetwork, IPv4AddressSize);
Microsoft.Extensions.Diagnostics.ResourceMonitoring (2)
ResourceMonitoringOptionsCustomValidator.cs (1)
26|| (ipAddress.AddressFamily != AddressFamily.InterNetwork && ipAddress.AddressFamily != AddressFamily.InterNetworkV6))
Windows\Network\WindowsTcpStateInfo.cs (1)
32.Where(ip => IPAddress.TryParse(ip, out var ipAddress) && ipAddress.AddressFamily == AddressFamily.InterNetwork)
Sockets.BindTests (13)
SocketTransportOptionsTests.cs (1)
106var fileHandleSocket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
src\Servers\Kestrel\shared\test\TestConnection.cs (3)
18: this(port, AddressFamily.InterNetwork) 56public static Socket CreateConnectedLoopbackSocket(int port) => CreateConnectedLoopbackSocket(port, AddressFamily.InterNetwork); 60if (addressFamily != AddressFamily.InterNetwork && addressFamily != AddressFamily.InterNetworkV6)
src\Servers\Kestrel\test\BindTests\AddressRegistrationTests.cs (9)
538using (var socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp)) 731ThrowsWhenBindingLocalhostToAddressInUse(AddressFamily.InterNetwork); 933var address = addressFamily == AddressFamily.InterNetwork ? IPAddress.Loopback : IPAddress.IPv6Loopback; 934var otherAddressFamily = addressFamily == AddressFamily.InterNetwork ? AddressFamily.InterNetworkV6 : AddressFamily.InterNetwork; 975var thisAddressString = $"http://{(addressFamily == AddressFamily.InterNetwork ? "127.0.0.1" : "[::1]")}:{port}"; 1021.Where(ip => ip.AddressFamily == AddressFamily.InterNetwork) 1066.Where(ip => ip.AddressFamily == AddressFamily.InterNetwork) 1195using (var socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp))
Sockets.FunctionalTests (9)
src\Servers\Kestrel\shared\test\TestConnection.cs (3)
18: this(port, AddressFamily.InterNetwork) 56public static Socket CreateConnectedLoopbackSocket(int port) => CreateConnectedLoopbackSocket(port, AddressFamily.InterNetwork); 60if (addressFamily != AddressFamily.InterNetwork && addressFamily != AddressFamily.InterNetworkV6)
src\Servers\Kestrel\test\FunctionalTests\ListenHandleTests.cs (1)
29new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
src\Servers\Kestrel\test\FunctionalTests\MaxRequestBufferSizeTests.cs (1)
378var socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
src\Servers\Kestrel\test\FunctionalTests\RequestTests.cs (4)
116using (var socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp)) 568using (var socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp)) 615using (var socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp)) 709using (var socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp))
System.Net.Http (4)
System\Net\Http\SocketsHttpHandler\SocksHelper.cs (4)
158if (hostIP.AddressFamily == AddressFamily.InterNetwork) 232if (hostIP.AddressFamily == AddressFamily.InterNetwork) 252? await Dns.GetHostAddressesAsync(host, AddressFamily.InterNetwork, cancellationToken).ConfigureAwait(false) 253: Dns.GetHostAddresses(host, AddressFamily.InterNetwork);
System.Net.NameResolution (2)
src\libraries\Common\src\System\Net\SocketProtocolSupportPal.cs (1)
14public static bool OSSupportsIPv4 { get; } = IsSupported(AddressFamily.InterNetwork);
System\Net\NameResolutionPal.Unix.cs (1)
162if (addr.AddressFamily == AddressFamily.InterNetwork)
System.Net.NetworkInformation (5)
System\Net\NetworkInformation\UnicastIPAddressInformation.cs (2)
73Debug.Assert((family == AddressFamily.InterNetwork) || (family == AddressFamily.InterNetworkV6)); 75Span<byte> addressBytes = (family == AddressFamily.InterNetwork) ?
System\Net\NetworkInformation\UnixNetworkInterface.cs (1)
38Sockets.AddressFamily.InterNetwork :
System\Net\NetworkInformation\UnixUnicastIPAddressInformation.cs (2)
109if (Address.AddressFamily != AddressFamily.InterNetwork || _prefixLength == 0) 114return PrefixLengthToSubnetMask((byte)_prefixLength, AddressFamily.InterNetwork);
System.Net.Ping (13)
src\libraries\Common\src\System\Net\IPEndPointExtensions.cs (3)
24else if (family == AddressFamily.InterNetwork) 36if (address.AddressFamily == AddressFamily.InterNetwork) 70if (endPoint.AddressFamily == AddressFamily.InterNetwork)
src\libraries\Common\src\System\Net\RawSocketPermissions.cs (2)
10private static readonly Lazy<bool> s_canUseRawIPv4Sockets = new Lazy<bool>(() => CheckRawSocketPermissions(AddressFamily.InterNetwork)); 25new Socket(addressFamily, SocketType.Raw, addressFamily == AddressFamily.InterNetwork ? ProtocolType.Icmp : ProtocolType.IcmpV6).Dispose();
src\libraries\Common\src\System\Net\SocketProtocolSupportPal.cs (1)
14public static bool OSSupportsIPv4 { get; } = IsSupported(AddressFamily.InterNetwork);
System\Net\NetworkInformation\Ping.cs (2)
108IPAddress addressSnapshot = address.AddressFamily == AddressFamily.InterNetwork ? 740if (ip.AddressFamily == AddressFamily.InterNetwork && !SocketProtocolSupportPal.OSSupportsIPv4)
System\Net\NetworkInformation\Ping.PingUtility.cs (2)
20bool isIpv4 = address.AddressFamily == AddressFamily.InterNetwork; 36if (options != null && address.AddressFamily == AddressFamily.InterNetwork)
System\Net\NetworkInformation\Ping.RawSocket.cs (3)
31bool ipv4 = address.AddressFamily == AddressFamily.InterNetwork; 84if (addrFamily == AddressFamily.InterNetwork) 101bool ipv4 = addrFamily == AddressFamily.InterNetwork;
System.Net.Primitives (14)
src\libraries\Common\src\System\Net\IPEndPointExtensions.cs (3)
24else if (family == AddressFamily.InterNetwork) 36if (address.AddressFamily == AddressFamily.InterNetwork) 70if (endPoint.AddressFamily == AddressFamily.InterNetwork)
src\libraries\Common\src\System\Net\SocketAddress.cs (3)
74AddressFamily.InterNetwork => IPv4AddressSize, 97((ipAddress.AddressFamily == AddressFamily.InterNetwork) ? IPv4AddressSize : IPv6AddressSize)) 117Debug.Assert(ipAddress.AddressFamily == AddressFamily.InterNetwork);
src\libraries\Common\src\System\Net\SocketAddressExtensions.cs (1)
14Debug.Assert(socketAddress.Family == AddressFamily.InterNetwork || socketAddress.Family == AddressFamily.InterNetworkV6);
System\Net\DnsEndPoint.cs (1)
24if (addressFamily != AddressFamily.InterNetwork &&
System\Net\IPAddress.cs (1)
404return IsIPv4 ? AddressFamily.InterNetwork : AddressFamily.InterNetworkV6;
System\Net\IPEndPoint.cs (1)
158if (socketAddress.Family is not (AddressFamily.InterNetwork or AddressFamily.InterNetworkV6))
System\Net\IPNetwork.cs (4)
87if (address.AddressFamily != BaseAddress.AddressFamily && (BaseAddress.AddressFamily != AddressFamily.InterNetwork || !address.IsIPv4MappedToIPv6)) 98if (address.AddressFamily == AddressFamily.InterNetwork || address.IsIPv4MappedToIPv6) 248private static int GetMaxPrefixLength(IPAddress baseAddress) => baseAddress.AddressFamily == AddressFamily.InterNetwork ? 32 : 128; 252if (baseAddress.AddressFamily == AddressFamily.InterNetwork)
System.Net.Quic (3)
src\libraries\Common\src\System\Net\IPEndPointExtensions.cs (3)
24else if (family == AddressFamily.InterNetwork) 36if (address.AddressFamily == AddressFamily.InterNetwork) 70if (endPoint.AddressFamily == AddressFamily.InterNetwork)
System.Net.Requests (3)
System\Net\FtpControlStream.cs (3)
599string passiveCommand = (ServerAddress.AddressFamily == AddressFamily.InterNetwork || ServerAddress.IsIPv4MappedToIPv6) ? "PASV" : "EPSV"; 604string portCommand = (ServerAddress.AddressFamily == AddressFamily.InterNetwork || ServerAddress.IsIPv4MappedToIPv6) ? "PORT" : "EPRT"; 1126if (ServerAddress.AddressFamily == AddressFamily.InterNetwork || ServerAddress.IsIPv4MappedToIPv6)
System.Net.Sockets (57)
src\libraries\Common\src\System\Net\IPEndPointExtensions.cs (3)
24else if (family == AddressFamily.InterNetwork) 36if (address.AddressFamily == AddressFamily.InterNetwork) 70if (endPoint.AddressFamily == AddressFamily.InterNetwork)
src\libraries\Common\src\System\Net\SocketAddressExtensions.cs (1)
14Debug.Assert(socketAddress.Family == AddressFamily.InterNetwork || socketAddress.Family == AddressFamily.InterNetworkV6);
src\libraries\Common\src\System\Net\SocketProtocolSupportPal.cs (1)
14public static bool OSSupportsIPv4 { get; } = IsSupported(AddressFamily.InterNetwork);
src\libraries\Common\src\System\Net\Sockets\ProtocolFamily.cs (1)
19InterNetwork = AddressFamily.InterNetwork,
System\Net\Sockets\Socket.cs (24)
73: this(OSSupportsIPv6DualMode ? AddressFamily.InterNetworkV6 : AddressFamily.InterNetwork, socketType, protocolType) 157case AddressFamily.InterNetwork: 191case AddressFamily.InterNetwork: 325if (_addressFamily == AddressFamily.InterNetwork || _addressFamily == AddressFamily.InterNetworkV6) 371if (_addressFamily == AddressFamily.InterNetwork || _addressFamily == AddressFamily.InterNetworkV6) 615if (_addressFamily == AddressFamily.InterNetwork) 635if (_addressFamily == AddressFamily.InterNetwork) 657if (_addressFamily == AddressFamily.InterNetwork || (_addressFamily == AddressFamily.InterNetworkV6 && DualMode)) 671if (_addressFamily == AddressFamily.InterNetwork || (_addressFamily == AddressFamily.InterNetworkV6 && DualMode)) 690if (_addressFamily == AddressFamily.InterNetwork) 707if (_addressFamily == AddressFamily.InterNetwork) 781return (family == _addressFamily) || (family == AddressFamily.InterNetwork && IsDualMode); 912if (_addressFamily != AddressFamily.InterNetwork && _addressFamily != AddressFamily.InterNetworkV6) 947if (_addressFamily != AddressFamily.InterNetwork && _addressFamily != AddressFamily.InterNetworkV6) 1822if (endPointSnapshot.AddressFamily == AddressFamily.InterNetwork && IsDualMode) 1864else if (AddressFamily == AddressFamily.InterNetworkV6 && socketAddress.Family == AddressFamily.InterNetwork) 1946if (endPointSnapshot.AddressFamily == AddressFamily.InterNetwork && IsDualMode) 1983else if (endPointSnapshot.AddressFamily == AddressFamily.InterNetworkV6 && socketAddress.Family == AddressFamily.InterNetwork) 2318else if (_addressFamily == AddressFamily.InterNetwork) 3115if (endPointSnapshot.AddressFamily == AddressFamily.InterNetwork && IsDualMode) 3319isIPv4 = addressFamily == AddressFamily.InterNetwork || isIPv4MappedToIPv6; // DualMode 3327fam == AddressFamily.InterNetwork ? SocketAddressPal.IPv4AddressSize : 3337if (addr.AddressFamily == AddressFamily.InterNetwork && IsDualMode) 3572if (_addressFamily == AddressFamily.InterNetwork)
System\Net\Sockets\SocketAsyncEventArgs.cs (5)
683endPoint.AddressFamily == AddressFamily.InterNetwork || 745else if (address.AddressFamily == AddressFamily.InterNetwork) 747attemptSocket = tempSocketIPv4 ??= (Socket.OSSupportsIPv4 ? new Socket(AddressFamily.InterNetwork, socketType, protocolType) : null); 966if (_remoteEndPoint!.AddressFamily == AddressFamily.InterNetworkV6 && _socketAddress!.Family == AddressFamily.InterNetwork) 988if (_remoteEndPoint!.AddressFamily == AddressFamily.InterNetworkV6 && _socketAddress!.Family == AddressFamily.InterNetwork)
System\Net\Sockets\SocketsTelemetry.cs (1)
115activity.SetTag("network.type", ipEndPoint.AddressFamily == AddressFamily.InterNetwork ? "ipv4" : "ipv6");
System\Net\Sockets\TCPClient.cs (3)
35if (family is not (AddressFamily.InterNetwork or AddressFamily.InterNetworkV6 or AddressFamily.Unknown)) 378if (_clientSocket.AddressFamily == AddressFamily.InterNetwork) 380_family = AddressFamily.InterNetwork;
System\Net\Sockets\UDPClient.cs (18)
21private AddressFamily _family = AddressFamily.InterNetwork; 24public UdpClient() : this(AddressFamily.InterNetwork) 31if (family != AddressFamily.InterNetwork && family != AddressFamily.InterNetworkV6) 47public UdpClient(int port) : this(port, AddressFamily.InterNetwork) 59if (family != AddressFamily.InterNetwork && family != AddressFamily.InterNetworkV6) 67if (_family == AddressFamily.InterNetwork) 205if (family == AddressFamily.InterNetwork) 368EndPoint tempRemoteEP = _family == AddressFamily.InterNetwork ? 381EndPoint tempRemoteEP = _family == AddressFamily.InterNetwork ? 405if (_family == AddressFamily.InterNetwork) 425if (_family != AddressFamily.InterNetwork) 472(_family == AddressFamily.InterNetwork) ? SocketOptionLevel.IP : SocketOptionLevel.IPv6, 489if (_family == AddressFamily.InterNetwork) 622_family == AddressFamily.InterNetwork ? IPEndPointStatics.Any : IPEndPointStatics.IPv6Any)); 648_family == AddressFamily.InterNetwork ? IPEndPointStatics.Any : IPEndPointStatics.IPv6Any, cancellationToken)); 714ipv4Socket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp); 732if (address.AddressFamily == AddressFamily.InterNetwork && ipv4Socket != null) 840EndPoint tempRemoteEP = _family == AddressFamily.InterNetwork ?