84 references to AddressFamily
dotnet-svcutil-lib (2)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\CoreClrSocketConnection.cs (2)
926AddressFamily addressFamily = address.AddressFamily; 943AddressFamily addressFamily = address.AddressFamily;
Microsoft.AspNetCore.Grpc.JsonTranscoding (1)
Internal\JsonTranscodingServerCallContext.cs (1)
85switch (connection.RemoteIpAddress.AddressFamily)
Microsoft.AspNetCore.HttpOverrides (3)
IPNetwork.cs (3)
60if (Prefix.AddressFamily != address.AddressFamily) 103return prefix.AddressFamily switch
Microsoft.AspNetCore.Rewrite (1)
PatternSegments\IsIPV6Segment.cs (1)
16return context.HttpContext.Connection.RemoteIpAddress.AddressFamily == AddressFamily.InterNetworkV6 ? "on" : "off";
Microsoft.AspNetCore.Server.Kestrel.Core (1)
Internal\Infrastructure\KestrelMetrics.cs (1)
330switch (localIPEndPoint.Address.AddressFamily)
Microsoft.Extensions.Diagnostics.ResourceMonitoring (4)
ResourceMonitoringOptionsCustomValidator.cs (2)
26|| (ipAddress.AddressFamily != AddressFamily.InterNetwork && ipAddress.AddressFamily != AddressFamily.InterNetworkV6))
Windows\Network\WindowsTcpStateInfo.cs (2)
32.Where(ip => IPAddress.TryParse(ip, out var ipAddress) && ipAddress.AddressFamily == AddressFamily.InterNetwork) 38.Where(ip => IPAddress.TryParse(ip, out var ipAddress) && ipAddress.AddressFamily == AddressFamily.InterNetworkV6)
Sockets.BindTests (7)
src\Servers\Kestrel\shared\test\TransportTestHelpers\IPv6ScopeIdPresentConditionAttribute.cs (1)
27.Any(addressInfo => addressInfo.Address.AddressFamily == AddressFamily.InterNetworkV6 && addressInfo.Address.ScopeId != 0);
src\Servers\Kestrel\test\BindTests\AddressRegistrationTests.cs (6)
1021.Where(ip => ip.AddressFamily == AddressFamily.InterNetwork) 1066.Where(ip => ip.AddressFamily == AddressFamily.InterNetwork) 1076.Where(ip => ip.AddressFamily == AddressFamily.InterNetworkV6) 1124.Where(ip => ip.AddressFamily == AddressFamily.InterNetworkV6) 1160.Where(ip => ip.AddressFamily == AddressFamily.InterNetworkV6) 1250using (var socket = new Socket(address.AddressFamily, SocketType.Stream, ProtocolType.Tcp))
Sockets.FunctionalTests (1)
src\Servers\Kestrel\shared\test\TransportTestHelpers\IPv6ScopeIdPresentConditionAttribute.cs (1)
27.Any(addressInfo => addressInfo.Address.AddressFamily == AddressFamily.InterNetworkV6 && addressInfo.Address.ScopeId != 0);
System.Net.Http (3)
System\Net\Http\SocketsHttpHandler\SocksHelper.cs (3)
158if (hostIP.AddressFamily == AddressFamily.InterNetwork) 167Debug.Assert(hostIP.AddressFamily == AddressFamily.InterNetworkV6); 232if (hostIP.AddressFamily == AddressFamily.InterNetwork)
System.Net.HttpListener (1)
System\Net\Managed\HttpEndPointListener.cs (1)
63_socket = new Socket(addr.AddressFamily, SocketType.Stream, ProtocolType.Tcp);
System.Net.NameResolution (5)
src\libraries\Common\src\System\Net\InteropIPAddressExtensions.Unix.cs (1)
18if (ipAddress.AddressFamily == AddressFamily.InterNetworkV6)
System\Net\Dns.cs (3)
212addresses = (family == AddressFamily.Unspecified || address.AddressFamily == family) ? new IPAddress[] { address } : Array.Empty<IPAddress>(); 324(address.AddressFamily != AddressFamily.InterNetworkV6 || SocketProtocolSupportPal.OSSupportsIPv6)) 535Task.FromResult(family == AddressFamily.Unspecified || ipAddress.AddressFamily == family ? new[] { ipAddress } : Array.Empty<IPAddress>()) :
System\Net\NameResolutionPal.Unix.cs (1)
162if (addr.AddressFamily == AddressFamily.InterNetwork)
System.Net.NetworkInformation (3)
System\Net\NetworkInformation\IPAddressUtil.cs (1)
17if (address.AddressFamily == AddressFamily.InterNetworkV6)
System\Net\NetworkInformation\UnixNetworkInterface.cs (1)
43if (addr.Address.AddressFamily == family)
System\Net\NetworkInformation\UnixUnicastIPAddressInformation.cs (1)
109if (Address.AddressFamily != AddressFamily.InterNetwork || _prefixLength == 0)
System.Net.Ping (12)
src\libraries\Common\src\System\Net\IPEndPointExtensions.cs (2)
34SocketAddressPal.SetAddressFamily(socketAddressBuffer, address.AddressFamily); 36if (address.AddressFamily == AddressFamily.InterNetwork)
System\Net\NetworkInformation\Ping.cs (3)
108IPAddress addressSnapshot = address.AddressFamily == AddressFamily.InterNetwork ? 740if (ip.AddressFamily == AddressFamily.InterNetwork && !SocketProtocolSupportPal.OSSupportsIPv4) 744else if ((ip.AddressFamily == AddressFamily.InterNetworkV6 && !SocketProtocolSupportPal.OSSupportsIPv6))
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; 64AddressFamily addrFamily = ep.Address.AddressFamily; 302Span<byte> socketAddress = stackalloc byte[SocketAddress.GetMaximumAddressSize(address.AddressFamily)];
System\Net\NetworkInformation\Ping.Unix.cs (2)
24PingReply reply = RawSocketPermissions.CanUseRawSockets(address.AddressFamily) ? 32return RawSocketPermissions.CanUseRawSockets(address.AddressFamily) ?
System.Net.Primitives (18)
src\libraries\Common\src\System\Net\IPEndPointExtensions.cs (2)
34SocketAddressPal.SetAddressFamily(socketAddressBuffer, address.AddressFamily); 36if (address.AddressFamily == AddressFamily.InterNetwork)
src\libraries\Common\src\System\Net\SocketAddress.cs (4)
96: this(ipAddress.AddressFamily, 97((ipAddress.AddressFamily == AddressFamily.InterNetwork) ? IPv4AddressSize : IPv6AddressSize)) 103if (ipAddress.AddressFamily == AddressFamily.InterNetworkV6) 117Debug.Assert(ipAddress.AddressFamily == AddressFamily.InterNetwork);
System\Net\IPAddress.cs (4)
642if (AddressFamily == AddressFamily.InterNetworkV6) 651if (AddressFamily == AddressFamily.InterNetworkV6) 679if (AddressFamily != comparand.AddressFamily)
System\Net\IPEndPoint.cs (2)
28public override AddressFamily AddressFamily => _address.AddressFamily; 148_address.AddressFamily == AddressFamily.InterNetworkV6 ?
System\Net\IPNetwork.cs (6)
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 (2)
src\libraries\Common\src\System\Net\IPEndPointExtensions.cs (2)
34SocketAddressPal.SetAddressFamily(socketAddressBuffer, address.AddressFamily); 36if (address.AddressFamily == AddressFamily.InterNetwork)
System.Net.Requests (4)
System\Net\FtpControlStream.cs (4)
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) 1130else if (ServerAddress.AddressFamily == AddressFamily.InterNetworkV6)
System.Net.Sockets (16)
src\libraries\Common\src\System\Net\InteropIPAddressExtensions.Unix.cs (1)
18if (ipAddress.AddressFamily == AddressFamily.InterNetworkV6)
src\libraries\Common\src\System\Net\IPEndPointExtensions.cs (2)
34SocketAddressPal.SetAddressFamily(socketAddressBuffer, address.AddressFamily); 36if (address.AddressFamily == AddressFamily.InterNetwork)
System\Net\Sockets\Socket.cs (3)
892if (!CanTryAddressFamily(address.AddressFamily)) 959if (CanTryAddressFamily(address.AddressFamily)) 3337if (addr.AddressFamily == AddressFamily.InterNetwork && IsDualMode)
System\Net\Sockets\SocketAsyncEventArgs.cs (3)
725if (!_currentSocket.CanTryAddressFamily(address.AddressFamily)) 736if (address.AddressFamily == AddressFamily.InterNetworkV6) 745else if (address.AddressFamily == AddressFamily.InterNetwork)
System\Net\Sockets\UDPClient.cs (7)
268if (address.AddressFamily == AddressFamily.InterNetworkV6) 343for (; i < addresses.Length && !IsAddressFamilyCompatible(addresses[i].AddressFamily); i++) 398if (multicastAddr.AddressFamily != _family) 483if (multicastAddr.AddressFamily != _family) 732if (address.AddressFamily == AddressFamily.InterNetwork && ipv4Socket != null) 746_family = address.AddressFamily; 750else if (IsAddressFamilyCompatible(address.AddressFamily))