Ixian SDK
DLT.Network.IPv4Subnet Class Reference

Helper class to help filter and classify IPv4 addresses More...

Public Member Functions

bool IsIPInSubnet (IPAddress addr)
 Checks if the given IP address is a member of this IPv4 subnet. More...
 
bool IsIPInSubnet (String ipaddr)
 Checks if the given IP address, given as a string, is a member of this IPv4 subnet. More...
 

Static Public Member Functions

static IPv4Subnet FromCIDR (String cidr)
 Converts an address in a CIDR notation to the IPv4Subnet object. More...
 
static IPv4Subnet FromSubnet (String subnet, String mask)
 Constructs an IPv4Subnet from a network address and subnet mask, given as strings. More...
 
static IPv4Subnet FromSubnet (IPAddress subnet, IPAddress mask)
 Constructs an IPv4Subnet from a network address and mask, given as IPAddress. More...
 
static bool IsPublicIP (IPAddress addr)
 Verifies that the given address is on a public network. (It is not a special address or one of the reserved private subnets.) More...
 

Static Public Attributes

static readonly IPv4Subnet PrivateClassA = IPv4Subnet.FromCIDR("10.0.0.0/8")
 
static readonly IPv4Subnet SharedAddress = IPv4Subnet.FromCIDR("100.64.0.0/10")
 
static readonly IPv4Subnet Loopback = IPv4Subnet.FromCIDR("127.0.0.0/8")
 
static readonly IPv4Subnet LinkLocal = IPv4Subnet.FromCIDR("169.254.0.0/16")
 
static readonly IPv4Subnet PrivateClassB = IPv4Subnet.FromCIDR("172.16.0.0/12")
 
static readonly IPv4Subnet IETF = IPv4Subnet.FromCIDR("192.0.0.0/24")
 
static readonly IPv4Subnet Dummy = IPv4Subnet.FromCIDR("192.0.0.8/32")
 
static readonly IPv4Subnet PortControlAnycast = IPv4Subnet.FromCIDR("192.0.0.9/32")
 
static readonly IPv4Subnet NatAnycastTraversal = IPv4Subnet.FromCIDR("192.0.0.10/32")
 
static readonly IPv4Subnet Nat64Discovery = IPv4Subnet.FromCIDR("192.0.0.170/32")
 
static readonly IPv4Subnet DNS64Discovery = IPv4Subnet.FromCIDR("192.0.0.171/32")
 
static readonly IPv4Subnet TestNet1Documentation = IPv4Subnet.FromCIDR("192.0.2.0/24")
 
static readonly IPv4Subnet AS112 = IPv4Subnet.FromCIDR("192.31.196.0/24")
 
static readonly IPv4Subnet AMT = IPv4Subnet.FromCIDR("192.52.193.0/24")
 
static readonly IPv4Subnet Relay6to4 = IPv4Subnet.FromCIDR("192.88.99.0/24")
 
static readonly IPv4Subnet PrivateClassC = IPv4Subnet.FromCIDR("192.168.0.0/16")
 
static readonly IPv4Subnet AS112DirectDelegation = IPv4Subnet.FromCIDR("192.175.48.0/24")
 
static readonly IPv4Subnet Benchmarking = IPv4Subnet.FromCIDR("198.18.0.0/15")
 
static readonly IPv4Subnet TestNet2Documentation = IPv4Subnet.FromCIDR("198.51.100.0/24")
 
static readonly IPv4Subnet TestNet3Documentation = IPv4Subnet.FromCIDR("203.0.113.0/24")
 
static readonly IPv4Subnet Reserved = IPv4Subnet.FromCIDR("240.0.0.0/4")
 
static readonly IPv4Subnet Broadcast = IPv4Subnet.FromCIDR("255.255.255.255/32")
 

Detailed Description

Helper class to help filter and classify IPv4 addresses

Definition at line 143 of file Network.cs.

Member Function Documentation

◆ FromCIDR()

static IPv4Subnet DLT.Network.IPv4Subnet.FromCIDR ( String  cidr)
static

Converts an address in a CIDR notation to the IPv4Subnet object.

Parameters
cidrIP addrss in the format 1.2.3.4/5
Exceptions
ArgumentExceptionThe provided CIDR is invalid.
Returns
IPv4 network.

Definition at line 184 of file Network.cs.

◆ FromSubnet() [1/2]

static IPv4Subnet DLT.Network.IPv4Subnet.FromSubnet ( String  subnet,
String  mask 
)
static

Constructs an IPv4Subnet from a network address and subnet mask, given as strings.

Parameters
subnetNetwork address.
maskSubnet Mask
Returns
IPv4 network

Definition at line 228 of file Network.cs.

◆ FromSubnet() [2/2]

static IPv4Subnet DLT.Network.IPv4Subnet.FromSubnet ( IPAddress  subnet,
IPAddress  mask 
)
static

Constructs an IPv4Subnet from a network address and mask, given as IPAddress.

Parameters
subnetNetwork address.
maskSubnet mask.
Returns
IPv4 network

Definition at line 256 of file Network.cs.

◆ IsIPInSubnet() [1/2]

bool DLT.Network.IPv4Subnet.IsIPInSubnet ( IPAddress  addr)

Checks if the given IP address is a member of this IPv4 subnet.

Parameters
addrIP address to check.
Returns
True, if the IP address is a part of the subnet this object represents.

Definition at line 310 of file Network.cs.

◆ IsIPInSubnet() [2/2]

bool DLT.Network.IPv4Subnet.IsIPInSubnet ( String  ipaddr)

Checks if the given IP address, given as a string, is a member of this IPv4 subnet.

Parameters
addrIP address to check.
Returns
True, if the IP address is a part of the subnet this object represents.

Definition at line 334 of file Network.cs.

◆ IsPublicIP()

static bool DLT.Network.IPv4Subnet.IsPublicIP ( IPAddress  addr)
static

Verifies that the given address is on a public network. (It is not a special address or one of the reserved private subnets.)

Parameters
addrIP address to check
Returns
True, if the given IP is a public, routable address.

Definition at line 274 of file Network.cs.

Member Data Documentation

◆ AMT

readonly IPv4Subnet DLT.Network.IPv4Subnet.AMT = IPv4Subnet.FromCIDR("192.52.193.0/24")
static

Definition at line 162 of file Network.cs.

◆ AS112

readonly IPv4Subnet DLT.Network.IPv4Subnet.AS112 = IPv4Subnet.FromCIDR("192.31.196.0/24")
static

Definition at line 161 of file Network.cs.

◆ AS112DirectDelegation

readonly IPv4Subnet DLT.Network.IPv4Subnet.AS112DirectDelegation = IPv4Subnet.FromCIDR("192.175.48.0/24")
static

Definition at line 165 of file Network.cs.

◆ Benchmarking

readonly IPv4Subnet DLT.Network.IPv4Subnet.Benchmarking = IPv4Subnet.FromCIDR("198.18.0.0/15")
static

Definition at line 166 of file Network.cs.

◆ Broadcast

readonly IPv4Subnet DLT.Network.IPv4Subnet.Broadcast = IPv4Subnet.FromCIDR("255.255.255.255/32")
static

Definition at line 170 of file Network.cs.

◆ DNS64Discovery

readonly IPv4Subnet DLT.Network.IPv4Subnet.DNS64Discovery = IPv4Subnet.FromCIDR("192.0.0.171/32")
static

Definition at line 159 of file Network.cs.

◆ Dummy

readonly IPv4Subnet DLT.Network.IPv4Subnet.Dummy = IPv4Subnet.FromCIDR("192.0.0.8/32")
static

Definition at line 155 of file Network.cs.

◆ IETF

readonly IPv4Subnet DLT.Network.IPv4Subnet.IETF = IPv4Subnet.FromCIDR("192.0.0.0/24")
static

Definition at line 154 of file Network.cs.

◆ LinkLocal

readonly IPv4Subnet DLT.Network.IPv4Subnet.LinkLocal = IPv4Subnet.FromCIDR("169.254.0.0/16")
static

Definition at line 152 of file Network.cs.

◆ Loopback

readonly IPv4Subnet DLT.Network.IPv4Subnet.Loopback = IPv4Subnet.FromCIDR("127.0.0.0/8")
static

Definition at line 151 of file Network.cs.

◆ Nat64Discovery

readonly IPv4Subnet DLT.Network.IPv4Subnet.Nat64Discovery = IPv4Subnet.FromCIDR("192.0.0.170/32")
static

Definition at line 158 of file Network.cs.

◆ NatAnycastTraversal

readonly IPv4Subnet DLT.Network.IPv4Subnet.NatAnycastTraversal = IPv4Subnet.FromCIDR("192.0.0.10/32")
static

Definition at line 157 of file Network.cs.

◆ PortControlAnycast

readonly IPv4Subnet DLT.Network.IPv4Subnet.PortControlAnycast = IPv4Subnet.FromCIDR("192.0.0.9/32")
static

Definition at line 156 of file Network.cs.

◆ PrivateClassA

readonly IPv4Subnet DLT.Network.IPv4Subnet.PrivateClassA = IPv4Subnet.FromCIDR("10.0.0.0/8")
static

Definition at line 149 of file Network.cs.

◆ PrivateClassB

readonly IPv4Subnet DLT.Network.IPv4Subnet.PrivateClassB = IPv4Subnet.FromCIDR("172.16.0.0/12")
static

Definition at line 153 of file Network.cs.

◆ PrivateClassC

readonly IPv4Subnet DLT.Network.IPv4Subnet.PrivateClassC = IPv4Subnet.FromCIDR("192.168.0.0/16")
static

Definition at line 164 of file Network.cs.

◆ Relay6to4

readonly IPv4Subnet DLT.Network.IPv4Subnet.Relay6to4 = IPv4Subnet.FromCIDR("192.88.99.0/24")
static

Definition at line 163 of file Network.cs.

◆ Reserved

readonly IPv4Subnet DLT.Network.IPv4Subnet.Reserved = IPv4Subnet.FromCIDR("240.0.0.0/4")
static

Definition at line 169 of file Network.cs.

◆ SharedAddress

readonly IPv4Subnet DLT.Network.IPv4Subnet.SharedAddress = IPv4Subnet.FromCIDR("100.64.0.0/10")
static

Definition at line 150 of file Network.cs.

◆ TestNet1Documentation

readonly IPv4Subnet DLT.Network.IPv4Subnet.TestNet1Documentation = IPv4Subnet.FromCIDR("192.0.2.0/24")
static

Definition at line 160 of file Network.cs.

◆ TestNet2Documentation

readonly IPv4Subnet DLT.Network.IPv4Subnet.TestNet2Documentation = IPv4Subnet.FromCIDR("198.51.100.0/24")
static

Definition at line 167 of file Network.cs.

◆ TestNet3Documentation

readonly IPv4Subnet DLT.Network.IPv4Subnet.TestNet3Documentation = IPv4Subnet.FromCIDR("203.0.113.0/24")
static

Definition at line 168 of file Network.cs.


The documentation for this class was generated from the following file: