LocalNetwork
An IPv4 network this machine is directly attached to - one entry per usable address on one NIC. Cidr is the specifier to hand to IScanTargetExpander, so "scan the whole network" is GetLocalNetworks().Select(network => network.Cidr).
public sealed record LocalNetwork : IEquatable<LocalNetwork>
1. Constructors
1.1. LocalNetwork(string, IP, IP, int, string, int)
An IPv4 network this machine is directly attached to - one entry per usable address on one NIC. Cidr is the specifier to hand to IScanTargetExpander, so "scan the whole network" is GetLocalNetworks().Select(network => network.Cidr).
public LocalNetwork(string InterfaceName, IP Address, IP NetworkAddress, int PrefixLength, string Cidr, int HostCount)
| Name | Type | Description |
|---|---|---|
InterfaceName |
string |
NIC the address sits on, for logging and for skipping the wrong link. |
Address |
IP |
This machine’s own address on the network. |
NetworkAddress |
IP |
The network (base) address. |
PrefixLength |
int |
Netmask length in bits. |
Cidr |
string |
Target specifier, e.g. |
HostCount |
int |
Probeable host addresses, excluding network and broadcast. |
2. Properties
2.1. Address
This machine’s own address on the network.
public IP Address { get; init; }
2.2. Cidr
Target specifier, e.g. 10.0.0.0/24.
public string Cidr { get; init; }
2.3. HostCount
Probeable host addresses, excluding network and broadcast.
public int HostCount { get; init; }
2.4. InterfaceName
NIC the address sits on, for logging and for skipping the wrong link.
public string InterfaceName { get; init; }
2.5. NetworkAddress
The network (base) address.
public IP NetworkAddress { get; init; }
2.6. PrefixLength
Netmask length in bits.
public int PrefixLength { get; init; }
3. Operators
3.1. operator !=(LocalNetwork, LocalNetwork)
public static bool operator !=(LocalNetwork left, LocalNetwork right)
| Name | Type | Description |
|---|---|---|
left |
LocalNetwork |
|
right |
LocalNetwork |
Returns: bool
3.2. operator ==(LocalNetwork, LocalNetwork)
public static bool operator ==(LocalNetwork left, LocalNetwork right)
| Name | Type | Description |
|---|---|---|
left |
LocalNetwork |
|
right |
LocalNetwork |
Returns: bool