Class NatDiscovery
Discovers the possible NATs.
Inherited Members
Namespace: Makaretu.Nat
Assembly: Makaretu.Nat.dll
Syntax
public static class NatDiscovery
Remarks
A gateway to the internet can be a NAT.
Methods
| Improve this Doc View SourceGetGateways()
Get the addresses of gateway(s) to the internet.
Declaration
public static IEnumerable<IPAddress> GetGateways()
Returns
Type | Description |
---|---|
IEnumerable<IPAddress> | A sequence of gateway IP addresses. |
Remarks
The network interfaces are queried for any gateway. A gateway device is typically also a NAT.
GetIPAddresses()
Get the IP addresses of the local machine.
Declaration
public static IEnumerable<IPAddress> GetIPAddresses()
Returns
Type | Description |
---|---|
IEnumerable<IPAddress> | A sequence of IP addresses of the local machine. |
GetNats()
Gets the NATs.
Declaration
public static IEnumerable<NatClient> GetNats()
Returns
Type | Description |
---|---|
IEnumerable<NatClient> | A sequence of NAT clients that can be talked to, |
Remarks
Asks each GetGateways() if it supports PCP or PMP. If true, then a NatClient is retuned.