325 lines
14 KiB
XML
325 lines
14 KiB
XML
<?xml version="1.0"?>
|
|
<doc>
|
|
<assembly>
|
|
<name>Open.Nat</name>
|
|
</assembly>
|
|
<members>
|
|
<member name="T:Open.Nat.NatDevice">
|
|
<summary>
|
|
Represents a NAT device and provides access to the operation set that allows
|
|
open (forward) ports, close ports and get the externa (visible) IP address.
|
|
</summary>
|
|
</member>
|
|
<member name="M:Open.Nat.NatDevice.CreatePortMapAsync(Open.Nat.Mapping)">
|
|
<summary>
|
|
Creates the port map asynchronous.
|
|
</summary>
|
|
<param name="mapping">The <see cref="T:Open.Nat.Mapping">Mapping</see> entry.</param>
|
|
<example>
|
|
device.CreatePortMapAsync(new Mapping(Protocol.Tcp, 1700, 1600));
|
|
</example>
|
|
<exception cref="T:Open.Nat.MappingException">MappingException</exception>
|
|
</member>
|
|
<member name="M:Open.Nat.NatDevice.DeletePortMapAsync(Open.Nat.Mapping)">
|
|
<summary>
|
|
Deletes a mapped port asynchronous.
|
|
</summary>
|
|
<param name="mapping">The <see cref="T:Open.Nat.Mapping">Mapping</see> entry.</param>
|
|
<example>
|
|
device.DeletePortMapAsync(new Mapping(Protocol.Tcp, 1700, 1600));
|
|
</example>
|
|
<exception cref="T:Open.Nat.MappingException">MappingException-class</exception>
|
|
</member>
|
|
<member name="M:Open.Nat.NatDevice.GetAllMappingsAsync">
|
|
<summary>
|
|
Gets all mappings asynchronous.
|
|
</summary>
|
|
<returns>
|
|
The list of all forwarded ports
|
|
</returns>
|
|
<example>
|
|
var mappings = await device.GetAllMappingsAsync();
|
|
foreach(var mapping in mappings)
|
|
{
|
|
Console.WriteLine(mapping)
|
|
}
|
|
</example>
|
|
<exception cref="T:Open.Nat.MappingException">MappingException</exception>
|
|
</member>
|
|
<member name="M:Open.Nat.NatDevice.GetExternalIPAsync">
|
|
<summary>
|
|
Gets the external (visible) IP address asynchronous. This is the NAT device IP address
|
|
</summary>
|
|
<returns>
|
|
The public IP addrees
|
|
</returns>
|
|
<example>
|
|
Console.WriteLine("My public IP is: {0}", await device.GetExternalIPAsync());
|
|
</example>
|
|
<exception cref="T:Open.Nat.MappingException">MappingException</exception>
|
|
</member>
|
|
<member name="M:Open.Nat.NatDevice.GetSpecificMappingAsync(Open.Nat.Protocol,System.Int32)">
|
|
<summary>
|
|
Gets the specified mapping asynchronous.
|
|
</summary>
|
|
<param name="protocol">The protocol.</param>
|
|
<param name="port">The port.</param>
|
|
<returns>
|
|
The matching mapping
|
|
</returns>
|
|
</member>
|
|
<member name="T:Open.Nat.Protocol">
|
|
<summary>
|
|
Protocol to allow/disallow
|
|
</summary>
|
|
</member>
|
|
<member name="F:Open.Nat.Protocol.Tcp">
|
|
<summary>
|
|
Transport Control Protocol
|
|
</summary>
|
|
</member>
|
|
<member name="F:Open.Nat.Protocol.Udp">
|
|
<summary>
|
|
Datagram Protocol
|
|
</summary>
|
|
</member>
|
|
<member name="T:Open.Nat.MappingException">
|
|
<summary>
|
|
|
|
</summary>
|
|
</member>
|
|
<member name="P:Open.Nat.MappingException.ErrorCode">
|
|
<summary>
|
|
|
|
</summary>
|
|
</member>
|
|
<member name="P:Open.Nat.MappingException.ErrorText">
|
|
<summary>
|
|
|
|
</summary>
|
|
</member>
|
|
<member name="T:Open.Nat.Mapping">
|
|
<summary>
|
|
Represents a port forwarding entry in the NAT translation table.
|
|
</summary>
|
|
</member>
|
|
<member name="P:Open.Nat.Mapping.Description">
|
|
<summary>
|
|
Gets the mapping's description. It is the value stored in the NewPortMappingDescription parameter.
|
|
The NewPortMappingDescription parameter is a human readable string that describes the connection.
|
|
It is used in sorme web interfaces of routers so the user can see which program is using what port.
|
|
</summary>
|
|
</member>
|
|
<member name="P:Open.Nat.Mapping.PrivateIP">
|
|
<summary>
|
|
Gets the private ip.
|
|
</summary>
|
|
</member>
|
|
<member name="P:Open.Nat.Mapping.Protocol">
|
|
<summary>
|
|
Gets the protocol.
|
|
</summary>
|
|
</member>
|
|
<member name="P:Open.Nat.Mapping.PrivatePort">
|
|
<summary>
|
|
The PrivatePort parameter specifies the port on a client machine to which all traffic
|
|
coming in on <see cref="!:#PublicPort">PublicPort</see> for the protocol specified by
|
|
<see cref="!:#Protocol">Protocol</see> should be forwarded to.
|
|
</summary>
|
|
<see cref="P:Open.Nat.Mapping.Protocol">Protocol enum</see>
|
|
</member>
|
|
<member name="P:Open.Nat.Mapping.PublicIP">
|
|
<summary>
|
|
Gets the public ip.
|
|
</summary>
|
|
</member>
|
|
<member name="P:Open.Nat.Mapping.PublicPort">
|
|
<summary>
|
|
Gets the external (visible) port number.
|
|
It is the value stored in the NewExternalPort parameter .
|
|
The NewExternalPort parameter is used to specify the TCP or UDP port on the WAN side of the router which should be forwarded.
|
|
</summary>
|
|
</member>
|
|
<member name="P:Open.Nat.Mapping.Lifetime">
|
|
<summary>
|
|
Gets the lifetime. The Lifetime parameter tells the router how long the portmapping should be active.
|
|
Since most programs don't know this in advance, it is often set to 0, which means 'unlimited' or 'permanent'.
|
|
</summary>
|
|
<remarks>
|
|
All portmappings are release automatically as part of the shutdown process when <see cref="T:Open.Nat.NatDiscoverer">NatUtility</see>.<see cref="!:NatUtility#releaseonshutdown">ReleaseOnShutdown</see> is true.
|
|
Permanent portmappings will not be released if the process ends anormally.
|
|
Since most programs don't know the lifetime in advance, Open.NAT renew all the portmappings (except the permanents) before they expires. So, developers have to close explicitly those portmappings
|
|
they don't want to remain open for the session.
|
|
</remarks>
|
|
</member>
|
|
<member name="P:Open.Nat.Mapping.Expiration">
|
|
<summary>
|
|
Gets the expiration. The property value is calculated using <see cref="!:#Lifetime">Lifetime</see> property.
|
|
</summary>
|
|
</member>
|
|
<member name="M:Open.Nat.Mapping.#ctor(Open.Nat.Protocol,System.Net.IPAddress,System.Int32,System.Int32,System.Int32,System.String)">
|
|
<summary>
|
|
Initializes a new instance of the <see cref="T:Open.Nat.Mapping"/> class.
|
|
</summary>
|
|
<param name="protocol">The protocol.</param>
|
|
<param name="privateIP">The private ip.</param>
|
|
<param name="privatePort">The private port.</param>
|
|
<param name="publicPort">The public port.</param>
|
|
<param name="lifetime">The lifetime.</param>
|
|
<param name="description">The description.</param>
|
|
</member>
|
|
<member name="M:Open.Nat.Mapping.#ctor(Open.Nat.Protocol,System.Int32,System.Int32)">
|
|
<summary>
|
|
Initializes a new instance of the <see cref="T:Open.Nat.Mapping"/> class.
|
|
</summary>
|
|
<param name="protocol">The protocol.</param>
|
|
<param name="privatePort">The private port.</param>
|
|
<param name="publicPort">The public port.</param>
|
|
<remarks>
|
|
This constructor initializes a Permanent mapping. The description by deafult is "Open.NAT"
|
|
</remarks>
|
|
</member>
|
|
<member name="M:Open.Nat.Mapping.#ctor(Open.Nat.Protocol,System.Int32,System.Int32,System.String)">
|
|
<summary>
|
|
Initializes a new instance of the <see cref="T:Open.Nat.Mapping"/> class.
|
|
</summary>
|
|
<param name="protocol">The protocol.</param>
|
|
<param name="privatePort">The private port.</param>
|
|
<param name="publicPort">The public port.</param>
|
|
<param name="description">The description.</param>
|
|
<remarks>
|
|
This constructor initializes a Permanent mapping.
|
|
</remarks>
|
|
</member>
|
|
<member name="M:Open.Nat.Mapping.#ctor(Open.Nat.Protocol,System.Int32,System.Int32,System.Int32,System.String)">
|
|
<summary>
|
|
Initializes a new instance of the <see cref="T:Open.Nat.Mapping"/> class.
|
|
</summary>
|
|
<param name="protocol">The protocol.</param>
|
|
<param name="privatePort">The private port.</param>
|
|
<param name="publicPort">The public port.</param>
|
|
<param name="lifetime">The lifetime.</param>
|
|
<param name="description">The description.</param>
|
|
</member>
|
|
<member name="M:Open.Nat.Mapping.IsExpired">
|
|
<summary>
|
|
Determines whether this instance is expired.
|
|
</summary>
|
|
<remarks>
|
|
Permanent mappings never expires.
|
|
</remarks>
|
|
</member>
|
|
<member name="M:Open.Nat.Mapping.ToString">
|
|
<summary>
|
|
Returns a <see cref="T:System.String" /> that represents this instance.
|
|
</summary>
|
|
<returns>
|
|
A <see cref="T:System.String" /> that represents this instance.
|
|
</returns>
|
|
</member>
|
|
<member name="T:Open.Nat.NatDeviceNotFoundException">
|
|
<summary>
|
|
|
|
</summary>
|
|
</member>
|
|
<member name="M:Open.Nat.NatDeviceNotFoundException.#ctor">
|
|
<summary>
|
|
|
|
</summary>
|
|
</member>
|
|
<member name="M:Open.Nat.NatDeviceNotFoundException.#ctor(System.String)">
|
|
<summary>
|
|
|
|
</summary>
|
|
<param name="message"></param>
|
|
</member>
|
|
<member name="M:Open.Nat.NatDeviceNotFoundException.#ctor(System.String,System.Exception)">
|
|
<summary>
|
|
|
|
</summary>
|
|
<param name="message"></param>
|
|
<param name="innerException"></param>
|
|
</member>
|
|
<member name="T:Open.Nat.NatDiscoverer">
|
|
<summary>
|
|
|
|
</summary>
|
|
</member>
|
|
<member name="F:Open.Nat.NatDiscoverer.TraceSource">
|
|
<summary>
|
|
The <see cref="!:http://msdn.microsoft.com/en-us/library/vstudio/system.diagnostics.tracesource">TraceSource</see> instance
|
|
used for debugging and <see cref="!:https://github.com/lontivero/Open.Nat/wiki/Troubleshooting">Troubleshooting</see>
|
|
</summary>
|
|
<example>
|
|
NatUtility.TraceSource.Switch.Level = SourceLevels.Verbose;
|
|
NatUtility.TraceSource.Listeners.Add(new ConsoleListener());
|
|
</example>
|
|
<remarks>
|
|
At least one trace listener has to be added to the Listeners collection if a trace is required; if no listener is added
|
|
there will no be tracing to analyse.
|
|
</remarks>
|
|
<remarks>
|
|
Open.NAT only supports SourceLevels.Verbose, SourceLevels.Error, SourceLevels.Warning and SourceLevels.Information.
|
|
</remarks>
|
|
</member>
|
|
<member name="M:Open.Nat.NatDiscoverer.DiscoverDeviceAsync">
|
|
<summary>
|
|
Discovers and returns an UPnp or Pmp NAT device; otherwise a <see cref="T:Open.Nat.NatDeviceNotFoundException">NatDeviceNotFoundException</see>
|
|
exception is thrown after 3 seconds.
|
|
</summary>
|
|
<returns>A NAT device</returns>
|
|
<exception cref="T:Open.Nat.NatDeviceNotFoundException">when no NAT found before 3 seconds.</exception>
|
|
</member>
|
|
<member name="M:Open.Nat.NatDiscoverer.DiscoverDeviceAsync(Open.Nat.PortMapper,System.Threading.CancellationTokenSource)">
|
|
<summary>
|
|
Discovers and returns a NAT device for the specified type; otherwise a <see cref="T:Open.Nat.NatDeviceNotFoundException">NatDeviceNotFoundException</see>
|
|
exception is thrown when it is cancelled.
|
|
</summary>
|
|
<remarks>
|
|
It allows to specify the NAT type to discover as well as the cancellation token in order.
|
|
</remarks>
|
|
<param name="portMapper">Port mapper protocol; Upnp, Pmp or both</param>
|
|
<param name="cancellationTokenSource">Cancellation token source for cancelling the discovery process</param>
|
|
<returns>A NAT device</returns>
|
|
<exception cref="T:Open.Nat.NatDeviceNotFoundException">when no NAT found before cancellation</exception>
|
|
</member>
|
|
<member name="M:Open.Nat.NatDiscoverer.DiscoverDevicesAsync(Open.Nat.PortMapper,System.Threading.CancellationTokenSource)">
|
|
<summary>
|
|
Discovers and returns all NAT devices for the specified type. If no NAT device is found it returns an empty enumerable
|
|
</summary>
|
|
<param name="portMapper">Port mapper protocol; Upnp, Pmp or both</param>
|
|
<param name="cancellationTokenSource">Cancellation token source for cancelling the discovery process</param>
|
|
<returns>All found NAT devices</returns>
|
|
</member>
|
|
<member name="M:Open.Nat.NatDiscoverer.ReleaseAll">
|
|
<summary>
|
|
Release all ports opened by Open.NAT.
|
|
</summary>
|
|
<remarks>
|
|
If ReleaseOnShutdown value is true, it release all the mappings created through the library.
|
|
</remarks>
|
|
</member>
|
|
<member name="T:Open.Nat.PortMapper">
|
|
<summary>
|
|
Protocol that should be used for searching a NAT device.
|
|
</summary>
|
|
</member>
|
|
<member name="F:Open.Nat.PortMapper.Pmp">
|
|
<summary>
|
|
Use only Port Mapping Protocol
|
|
</summary>
|
|
</member>
|
|
<member name="F:Open.Nat.PortMapper.Upnp">
|
|
<summary>
|
|
Use only Universal Plug and Play
|
|
</summary>
|
|
</member>
|
|
<member name="M:Open.Nat.DiscoverDeviceMessage.Encode(System.String)">
|
|
<summary>
|
|
The message sent to discover all uPnP devices on the network
|
|
</summary>
|
|
<returns></returns>
|
|
</member>
|
|
</members>
|
|
</doc>
|