aboutsummaryrefslogtreecommitdiff
path: root/Mono.Nat
diff options
context:
space:
mode:
Diffstat (limited to 'Mono.Nat')
-rw-r--r--Mono.Nat/NatProtocol.cs1
-rw-r--r--Mono.Nat/Pmp/PmpSearcher.cs10
-rw-r--r--Mono.Nat/Upnp/Messages/Requests/CreatePortMappingMessage.cs2
-rw-r--r--Mono.Nat/Upnp/UpnpNatDevice.cs2
4 files changed, 7 insertions, 8 deletions
diff --git a/Mono.Nat/NatProtocol.cs b/Mono.Nat/NatProtocol.cs
index a796f94839..2768f133c5 100644
--- a/Mono.Nat/NatProtocol.cs
+++ b/Mono.Nat/NatProtocol.cs
@@ -1,4 +1,3 @@
-
namespace Mono.Nat
{
public enum NatProtocol
diff --git a/Mono.Nat/Pmp/PmpSearcher.cs b/Mono.Nat/Pmp/PmpSearcher.cs
index cbd0d36860..46c2e9d800 100644
--- a/Mono.Nat/Pmp/PmpSearcher.cs
+++ b/Mono.Nat/Pmp/PmpSearcher.cs
@@ -85,10 +85,10 @@ namespace Mono.Nat
{
if (n.OperationalStatus != OperationalStatus.Up && n.OperationalStatus != OperationalStatus.Unknown)
continue;
- var properties = n.GetIPProperties();
+ IPInterfaceProperties properties = n.GetIPProperties();
var gatewayList = new List<IPEndPoint>();
- foreach (var gateway in properties.GatewayAddresses)
+ foreach (GatewayIPAddressInformation gateway in properties.GatewayAddresses)
{
if (gateway.Address.AddressFamily == AddressFamily.InterNetwork)
{
@@ -105,7 +105,7 @@ namespace Mono.Nat
gatewayList.Add(new IPEndPoint(gw2, PmpConstants.ServerPort));
}
}
- foreach (var unicast in properties.UnicastAddresses)
+ foreach (UnicastIPAddressInformation unicast in properties.UnicastAddresses)
{
if (/*unicast.DuplicateAddressDetectionState == DuplicateAddressDetectionState.Preferred
&& unicast.AddressPreferredLifetime != UInt32.MaxValue
@@ -150,7 +150,7 @@ namespace Mono.Nat
public async void Search()
{
- foreach (var s in sockets)
+ foreach (UdpClient s in sockets)
{
try
{
@@ -181,7 +181,7 @@ namespace Mono.Nat
// The nat-pmp search message. Must be sent to GatewayIP:53531
byte[] buffer = new byte[] { PmpConstants.Version, PmpConstants.OperationCode };
- foreach (var gatewayEndpoint in gatewayLists[client])
+ foreach (IPEndPoint gatewayEndpoint in gatewayLists[client])
{
await client.SendAsync(buffer, buffer.Length, gatewayEndpoint).ConfigureAwait(false);
}
diff --git a/Mono.Nat/Upnp/Messages/Requests/CreatePortMappingMessage.cs b/Mono.Nat/Upnp/Messages/Requests/CreatePortMappingMessage.cs
index 217095e492..7d6844e32a 100644
--- a/Mono.Nat/Upnp/Messages/Requests/CreatePortMappingMessage.cs
+++ b/Mono.Nat/Upnp/Messages/Requests/CreatePortMappingMessage.cs
@@ -57,7 +57,7 @@ namespace Mono.Nat.Upnp
var culture = CultureInfo.InvariantCulture;
var builder = new StringBuilder(256);
- var writer = CreateWriter(builder);
+ XmlWriter writer = CreateWriter(builder);
WriteFullElement(writer, "NewRemoteHost", string.Empty);
WriteFullElement(writer, "NewExternalPort", this.mapping.PublicPort.ToString(culture));
diff --git a/Mono.Nat/Upnp/UpnpNatDevice.cs b/Mono.Nat/Upnp/UpnpNatDevice.cs
index 63a28ebdc0..fd408ee638 100644
--- a/Mono.Nat/Upnp/UpnpNatDevice.cs
+++ b/Mono.Nat/Upnp/UpnpNatDevice.cs
@@ -146,7 +146,7 @@ namespace Mono.Nat.Upnp
var ns = new XmlNamespaceManager(xmldoc.NameTable);
ns.AddNamespace("ns", "urn:schemas-upnp-org:device-1-0");
- var nodes = xmldoc.SelectNodes("//*/ns:serviceList", ns);
+ XmlNodeList nodes = xmldoc.SelectNodes("//*/ns:serviceList", ns);
foreach (XmlNode node in nodes)
{