C# Class IpRanges.IPAddressHelper

ファイルを表示 Open project: hanswolff/ipranges Class Usage Examples

Public Methods

Method Description
AreInSameSubnet ( IPAddress first, IPAddress second, IPAddress subnetMask ) : bool
BigIntegerFromIpAddress ( IPAddress ipAddress ) : System.Numerics.BigInteger
CreateSubnetMaskIPv4 ( byte cidr ) : IPAddress
CreateSubnetMaskIPv6 ( byte cidr ) : IPAddress
GetBroadcastAddress ( IPAddress address, IPAddress subnetMask ) : IPAddress
GetNetworkAddress ( IPAddress address, IPAddress subnetMask ) : IPAddress

Method Details

AreInSameSubnet() public static method

public static AreInSameSubnet ( IPAddress first, IPAddress second, IPAddress subnetMask ) : bool
first System.Net.IPAddress
second System.Net.IPAddress
subnetMask System.Net.IPAddress
return bool

BigIntegerFromIpAddress() public static method

public static BigIntegerFromIpAddress ( IPAddress ipAddress ) : System.Numerics.BigInteger
ipAddress System.Net.IPAddress
return System.Numerics.BigInteger

CreateSubnetMaskIPv4() public static method

public static CreateSubnetMaskIPv4 ( byte cidr ) : IPAddress
cidr byte
return System.Net.IPAddress

CreateSubnetMaskIPv6() public static method

public static CreateSubnetMaskIPv6 ( byte cidr ) : IPAddress
cidr byte
return System.Net.IPAddress

GetBroadcastAddress() public static method

public static GetBroadcastAddress ( IPAddress address, IPAddress subnetMask ) : IPAddress
address System.Net.IPAddress
subnetMask System.Net.IPAddress
return System.Net.IPAddress

GetNetworkAddress() public static method

public static GetNetworkAddress ( IPAddress address, IPAddress subnetMask ) : IPAddress
address System.Net.IPAddress
subnetMask System.Net.IPAddress
return System.Net.IPAddress