aboutsummaryrefslogtreecommitdiff
path: root/Mono.Nat/Pmp/PmpSearcher.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Mono.Nat/Pmp/PmpSearcher.cs')
-rw-r--r--Mono.Nat/Pmp/PmpSearcher.cs10
1 files changed, 5 insertions, 5 deletions
diff --git a/Mono.Nat/Pmp/PmpSearcher.cs b/Mono.Nat/Pmp/PmpSearcher.cs
index cbd0d3686..46c2e9d80 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);
}