Ejemplo n.º 1
0
 /// <summary>
 /// Removes the given NAT address range from the internal range. Open connections will not be interrupted.
 /// </summary>
 /// <param name="toRemove">The address range to remove</param>
 public void RemoveFromInternalRange(NATAddressRange toRemove)
 {
     lock (lInternalRange)
     {
         lInternalRange.Remove(toRemove);
     }
     InvokePropertyChanged();
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Adds the given NAT address range to the internal range
 /// </summary>
 /// <param name="toAdd"></param>
 public void AddToInternalRange(NATAddressRange toAdd)
 {
     lock (lInternalRange)
     {
         lInternalRange.Add(toAdd);
     }
     InvokePropertyChanged();
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Adds the given NAT address range to the external range
 /// </summary>
 /// <param name="toAdd"></param>
 public void AddToExternalRange(NATAddressRange toAdd)
 {
     lock (lExternalRange)
     {
         lExternalAddressPool.AddRange(IPAddressAnalysis.GetIPRange(
                                           IPAddressAnalysis.GetClasslessNetworkAddress(toAdd.NetworkAddress, toAdd.Subnetmask),
                                           IPAddressAnalysis.GetClasslessBroadcastAddress(toAdd.NetworkAddress, toAdd.Subnetmask))
                                       );
         lExternalRange.Add(toAdd);
     }
     InvokePropertyChanged();
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Removes the given NAT address range from the external range. Open connections will not be interrupted.
 /// </summary>
 /// <param name="toRemove">The address range to remove</param>
 public void RemoveFromExternalRange(NATAddressRange toRemove)
 {
     lock (lExternalRange)
     {
         foreach (IPAddress ipa in IPAddressAnalysis.GetIPRange(
                      IPAddressAnalysis.GetClasslessNetworkAddress(toRemove.NetworkAddress, toRemove.Subnetmask),
                      IPAddressAnalysis.GetClasslessBroadcastAddress(toRemove.NetworkAddress, toRemove.Subnetmask))
                  )
         {
             lExternalAddressPool.Remove(ipa);
         }
         lExternalRange.Remove(toRemove);
     }
     InvokePropertyChanged();
 }