Releases: smdn/Smdn.Net.AddressResolution
Releases · smdn/Smdn.Net.AddressResolution
Smdn.Net.AddressResolution version 1.1.0
Released package
Release notes
The full release notes are available at gist.
Change log
Change log in this release:
- 2024-01-11 update assembly version
- 2024-01-11 add CompatibilitySuppressions.xml
- 2024-01-11 improve IPNetworkProfile.Create(Predicate<NetworkInterface>) to wrap and rethrow an InvalidOperationsException when Predicate throws an exception
- 2024-01-11 add IPNetworkProfile.Create(IPNetwork)
- 2024-01-11 enable network scan using with arp-scan in privileged processes
- 2024-01-11 fix or suppress warning CA1859: Change return type of method
- 2024-01-10 fix or suppress warning IDE0055: Fix formatting
- 2024-01-10 fix warning IDE1006: Naming rule violation
- 2024-01-10 drop target framework net7.0
API changes
API changes in this release:
diff --git a/doc/api-list/Smdn.Net.AddressResolution/Smdn.Net.AddressResolution-net6.0.apilist.cs b/doc/api-list/Smdn.Net.AddressResolution/Smdn.Net.AddressResolution-net6.0.apilist.cs
index fd58fc2..cd0a785 100644
--- a/doc/api-list/Smdn.Net.AddressResolution/Smdn.Net.AddressResolution-net6.0.apilist.cs
+++ b/doc/api-list/Smdn.Net.AddressResolution/Smdn.Net.AddressResolution-net6.0.apilist.cs
@@ -1,299 +1,299 @@
-// Smdn.Net.AddressResolution.dll (Smdn.Net.AddressResolution-1.0.2)
+// Smdn.Net.AddressResolution.dll (Smdn.Net.AddressResolution-1.1.0)
// Name: Smdn.Net.AddressResolution
-// AssemblyVersion: 1.0.2.0
-// InformationalVersion: 1.0.2+34189a504878bfc5e98c592355e026ca8e4ee848
+// AssemblyVersion: 1.1.0.0
+// InformationalVersion: 1.1.0+fe88b9191dd60b0f5dc1e1881193ccd376b9795c
// TargetFramework: .NETCoreApp,Version=v6.0
// Configuration: Release
// Referenced assemblies:
// Microsoft.Extensions.DependencyInjection.Abstractions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60
// Microsoft.Extensions.Logging.Abstractions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60
// System.Collections, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Collections.Concurrent, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.ComponentModel, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.ComponentModel.Primitives, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Diagnostics.Process, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Linq, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Memory, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
// System.Net.NetworkInformation, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Net.Ping, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Net.Primitives, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Runtime, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Runtime.InteropServices, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Runtime.InteropServices.RuntimeInformation, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Threading, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// Vanara.PInvoke.IpHlpApi, Version=3.4.13.0, Culture=neutral, PublicKeyToken=c37e4080322237fa
// Vanara.PInvoke.Shared, Version=3.4.13.0, Culture=neutral, PublicKeyToken=c37e4080322237fa
// Vanara.PInvoke.Ws2_32, Version=3.4.13.0, Culture=neutral, PublicKeyToken=c37e4080322237fa
#nullable enable annotations
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Net;
using System.Net.NetworkInformation;
using System.Runtime.CompilerServices;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Extensions.Logging;
using Smdn.Net;
using Smdn.Net.AddressResolution;
using Smdn.Net.AddressTables;
using Smdn.Net.NetworkScanning;
namespace Smdn.Net {
public abstract class IPNetworkProfile {
public static IPNetworkProfile Create() {}
public static IPNetworkProfile Create(Func<IEnumerable<IPAddress>?> addressRangeGenerator, NetworkInterface? networkInterface = null) {}
public static IPNetworkProfile Create(IPAddress baseAddress, IPAddress subnetMask, NetworkInterface? networkInterface = null) {}
public static IPNetworkProfile Create(IPAddress baseAddress, int prefixLength, NetworkInterface? networkInterface = null) {}
public static IPNetworkProfile Create(NetworkInterface networkInterface) {}
public static IPNetworkProfile Create(Predicate<NetworkInterface> predicateForNetworkInterface) {}
public static IPNetworkProfile CreateFromNetworkInterface(Guid id) {}
public static IPNetworkProfile CreateFromNetworkInterface(PhysicalAddress physicalAddress) {}
public static IPNetworkProfile CreateFromNetworkInterface(string id) {}
public static IPNetworkProfile CreateFromNetworkInterfaceName(string name) {}
protected IPNetworkProfile(NetworkInterface? networkInterface) {}
public NetworkInterface? NetworkInterface { get; }
public abstract IEnumerable<IPAddress>? GetAddressRange();
}
public static class PhysicalAddressExtensions {
public static string ToMacAddressString(this PhysicalAddress hardwareAddress, char delimiter = ':') {}
}
}
namespace Smdn.Net.AddressResolution {
public interface IAddressResolver<TAddress, TResolvedAddress> where TAddress : notnull where TResolvedAddress : notnull {
void Invalidate(TAddress address);
ValueTask<TResolvedAddress?> ResolveAsync(TAddress address, CancellationToken cancellationToken);
}
public class MacAddressResolver : MacAddressResolverBase {
protected MacAddressResolver(IAddressTable addressTable, bool shouldDisposeAddressTable, INetworkScanner? networkScanner, bool shouldDisposeNetworkScanner, NetworkInterface? networkInterface, int maxParallelCountForRefreshInvalidatedAddresses, ILogger? logger) {}
public MacAddressResolver() {}
public MacAddressResolver(IAddressTable? addressTable, INetworkScanner? networkScanner, bool shouldDisposeAddressTable = false, bool shouldDisposeNetworkScanner = false, NetworkInterface? networkInterface = null, int maxParallelCountForRefreshInvalidatedAddresses = 3, IServiceProvider? serviceProvider = null) {}
public MacAddressResolver(IPNetworkProfile? networkProfile, IServiceProvider? serviceProvider = null) {}
public bool CanPerformNetworkScan { get; }
public override bool HasInvalidated { get; }
public TimeSpan NetworkScanInterval { get; set; }
public TimeSpan NetworkScanMinInterval { get; set; }
protected override void Dispose(bool disposing) {}
public IAsyncEnumerable<AddressTableEntry> EnumerateAddressTableEntriesAsync(CancellationToken cancellationToken = default) {}
public IAsyncEnumerable<AddressTableEntry> EnumerateAddressTableEntriesAsync(Predicate<AddressTableEntry> predicate, CancellationToken cancellationToken = default) {}
protected override void InvalidateCore(IPAddress ipAddress) {}
protected override void InvalidateCore(PhysicalAddress macAddress) {}
protected override ValueTask RefreshAddressTableAsyncCore(CancellationToken cancellationToken = default) {}
protected override ValueTask RefreshInvalidatedAddressesAsyncCore(CancellationToken cancellationToken = default) {}
protected override async ValueTask<PhysicalAddress?> ResolveIPAddressToMacAddressAsyncCore(IPAddress ipAddress, CancellationToken cancellationToken) {}
protected override async ValueTask<IPAddress?> ResolveMacAddressToIPAddressAsyncCore(PhysicalAddress macAddress, CancellationToken cancellationToken) {}
protected virtual async ValueTask<AddressTableEntry> SelectAddressTableEntryAsync(Predicate<AddressTableEntry> predicate, CancellationToken cancellationToken) {}
}
public abstract class MacAddressResolverBase :
IAddressResolver<IPAddress, PhysicalAddress>,
IAddressResolver<PhysicalAddress, IPAddress>,
IDisposable
{
protected static PhysicalAddress AllZeroMacAddress { get; }
public static MacAddressResolverBase Null { get; }
protected MacAddressResolverBase(ILogger? logger = null) {}
public abstract bool HasInvalidated { get; }
protected ILogger? Logger { get; }
protected virtual void Dispose(bool disposing) {}
public void Dispose() {}
public void Invalidate(IPAddress ipAddress) {}
public void Invalidate(PhysicalAddress macAddress) {}
protected abstract void InvalidateCore(IPAddress ipAddress);
protected abstract void Invali...
Smdn.Net.AddressResolution version 1.0.2
Released package
Release notes
The full release notes are available at gist.
Change log
Change log in this release:
- 2023-05-16 update assembly version
- 2023-05-16 avoid null reference
- 2023-05-16 make sure to call ConfigureAwait for awaiting task
- 2023-05-16 disable warning CA2000
- 2023-05-16 disable warning CA1812
- 2023-05-16 disable warning CA1031
- 2023-05-16 disable warning CA1033
- 2023-05-16 catch up the repository template updates
- 2023-05-02 disable using directive instead of deleting
API changes
API changes in this release:
diff --git a/doc/api-list/Smdn.Net.AddressResolution/Smdn.Net.AddressResolution-net6.0.apilist.cs b/doc/api-list/Smdn.Net.AddressResolution/Smdn.Net.AddressResolution-net6.0.apilist.cs
index f8fac88..fd58fc2 100644
--- a/doc/api-list/Smdn.Net.AddressResolution/Smdn.Net.AddressResolution-net6.0.apilist.cs
+++ b/doc/api-list/Smdn.Net.AddressResolution/Smdn.Net.AddressResolution-net6.0.apilist.cs
@@ -1,299 +1,299 @@
-// Smdn.Net.AddressResolution.dll (Smdn.Net.AddressResolution-1.0.1)
+// Smdn.Net.AddressResolution.dll (Smdn.Net.AddressResolution-1.0.2)
// Name: Smdn.Net.AddressResolution
-// AssemblyVersion: 1.0.1.0
-// InformationalVersion: 1.0.1+12cda679d681acbeb81dac8a0cb03dbf6a3a0a3d
+// AssemblyVersion: 1.0.2.0
+// InformationalVersion: 1.0.2+34189a504878bfc5e98c592355e026ca8e4ee848
// TargetFramework: .NETCoreApp,Version=v6.0
// Configuration: Release
// Referenced assemblies:
// Microsoft.Extensions.DependencyInjection.Abstractions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60
// Microsoft.Extensions.Logging.Abstractions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60
// System.Collections, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Collections.Concurrent, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.ComponentModel, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.ComponentModel.Primitives, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Diagnostics.Process, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Linq, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Memory, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
// System.Net.NetworkInformation, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Net.Ping, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Net.Primitives, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Runtime, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Runtime.InteropServices, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Runtime.InteropServices.RuntimeInformation, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Threading, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// Vanara.PInvoke.IpHlpApi, Version=3.4.13.0, Culture=neutral, PublicKeyToken=c37e4080322237fa
// Vanara.PInvoke.Shared, Version=3.4.13.0, Culture=neutral, PublicKeyToken=c37e4080322237fa
// Vanara.PInvoke.Ws2_32, Version=3.4.13.0, Culture=neutral, PublicKeyToken=c37e4080322237fa
#nullable enable annotations
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Net;
using System.Net.NetworkInformation;
using System.Runtime.CompilerServices;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Extensions.Logging;
using Smdn.Net;
using Smdn.Net.AddressResolution;
using Smdn.Net.AddressTables;
using Smdn.Net.NetworkScanning;
namespace Smdn.Net {
public abstract class IPNetworkProfile {
public static IPNetworkProfile Create() {}
public static IPNetworkProfile Create(Func<IEnumerable<IPAddress>?> addressRangeGenerator, NetworkInterface? networkInterface = null) {}
public static IPNetworkProfile Create(IPAddress baseAddress, IPAddress subnetMask, NetworkInterface? networkInterface = null) {}
public static IPNetworkProfile Create(IPAddress baseAddress, int prefixLength, NetworkInterface? networkInterface = null) {}
public static IPNetworkProfile Create(NetworkInterface networkInterface) {}
public static IPNetworkProfile Create(Predicate<NetworkInterface> predicateForNetworkInterface) {}
public static IPNetworkProfile CreateFromNetworkInterface(Guid id) {}
public static IPNetworkProfile CreateFromNetworkInterface(PhysicalAddress physicalAddress) {}
public static IPNetworkProfile CreateFromNetworkInterface(string id) {}
public static IPNetworkProfile CreateFromNetworkInterfaceName(string name) {}
protected IPNetworkProfile(NetworkInterface? networkInterface) {}
public NetworkInterface? NetworkInterface { get; }
public abstract IEnumerable<IPAddress>? GetAddressRange();
}
public static class PhysicalAddressExtensions {
public static string ToMacAddressString(this PhysicalAddress hardwareAddress, char delimiter = ':') {}
}
}
namespace Smdn.Net.AddressResolution {
public interface IAddressResolver<TAddress, TResolvedAddress> where TAddress : notnull where TResolvedAddress : notnull {
void Invalidate(TAddress address);
ValueTask<TResolvedAddress?> ResolveAsync(TAddress address, CancellationToken cancellationToken);
}
public class MacAddressResolver : MacAddressResolverBase {
protected MacAddressResolver(IAddressTable addressTable, bool shouldDisposeAddressTable, INetworkScanner? networkScanner, bool shouldDisposeNetworkScanner, NetworkInterface? networkInterface, int maxParallelCountForRefreshInvalidatedAddresses, ILogger? logger) {}
public MacAddressResolver() {}
public MacAddressResolver(IAddressTable? addressTable, INetworkScanner? networkScanner, bool shouldDisposeAddressTable = false, bool shouldDisposeNetworkScanner = false, NetworkInterface? networkInterface = null, int maxParallelCountForRefreshInvalidatedAddresses = 3, IServiceProvider? serviceProvider = null) {}
public MacAddressResolver(IPNetworkProfile? networkProfile, IServiceProvider? serviceProvider = null) {}
public bool CanPerformNetworkScan { get; }
public override bool HasInvalidated { get; }
public TimeSpan NetworkScanInterval { get; set; }
public TimeSpan NetworkScanMinInterval { get; set; }
protected override void Dispose(bool disposing) {}
public IAsyncEnumerable<AddressTableEntry> EnumerateAddressTableEntriesAsync(CancellationToken cancellationToken = default) {}
public IAsyncEnumerable<AddressTableEntry> EnumerateAddressTableEntriesAsync(Predicate<AddressTableEntry> predicate, CancellationToken cancellationToken = default) {}
protected override void InvalidateCore(IPAddress ipAddress) {}
protected override void InvalidateCore(PhysicalAddress macAddress) {}
protected override ValueTask RefreshAddressTableAsyncCore(CancellationToken cancellationToken = default) {}
protected override ValueTask RefreshInvalidatedAddressesAsyncCore(CancellationToken cancellationToken = default) {}
protected override async ValueTask<PhysicalAddress?> ResolveIPAddressToMacAddressAsyncCore(IPAddress ipAddress, CancellationToken cancellationToken) {}
protected override async ValueTask<IPAddress?> ResolveMacAddressToIPAddressAsyncCore(PhysicalAddress macAddress, CancellationToken cancellationToken) {}
protected virtual async ValueTask<AddressTableEntry> SelectAddressTableEntryAsync(Predicate<AddressTableEntry> predicate, CancellationToken cancellationToken) {}
}
public abstract class MacAddressResolverBase :
IAddressResolver<IPAddress, PhysicalAddress>,
IAddressResolver<PhysicalAddress, IPAddress>,
IDisposable
{
protected static PhysicalAddress AllZeroMacAddress { get; }
public static MacAddressResolverBase Null { get; }
protected MacAddressResolverBase(ILogger? logger = null) {}
public abstract bool HasInvalidated { get; }
protected ILogger? Logger { get; }
protected virtual void Dispose(bool disposing) {}
public void Dispose() {}
public void Invalidate(IPAddress ipAddress) {}
public void Invalidate(PhysicalAddress macAddress) {}
protected abstract void InvalidateCore(IPAddress ipAddress);
protected abstract void InvalidateCore(PhysicalAddress macAddress);
public ValueTask RefreshAddressTableAsync(CancellationToken cancellationToken = default) {}
protected virtual ValueTask RefreshAddressTableAsyncCore(CancellationToken cancel...
Smdn.Net.AddressResolution version 1.0.1
Released package
Release notes
The full release notes are available at gist.
Change log
Change log in this release:
- 2023-05-02 delete unnecessary using directive
- 2023-05-02 set GenerateDocumentationFile true
- 2023-05-02 fix XML doc comments
- 2023-05-02 update assembly version
- 2023-05-02 add XML doc comments
- 2023-05-02 add IPNetworkProfile.CreateFromNetworkInterface(Name)
- 2023-05-02 add NetworkInterfaceIdComparer
- 2023-05-02 improve README.md
- 2023-05-02 fix to use reserved IP addresses for documentation
- 2023-04-19 enable package validation
API changes
API changes in this release:
diff --git a/doc/api-list/Smdn.Net.AddressResolution/Smdn.Net.AddressResolution-net6.0.apilist.cs b/doc/api-list/Smdn.Net.AddressResolution/Smdn.Net.AddressResolution-net6.0.apilist.cs
index 45fe092..f8fac88 100644
--- a/doc/api-list/Smdn.Net.AddressResolution/Smdn.Net.AddressResolution-net6.0.apilist.cs
+++ b/doc/api-list/Smdn.Net.AddressResolution/Smdn.Net.AddressResolution-net6.0.apilist.cs
@@ -1,295 +1,299 @@
-// Smdn.Net.AddressResolution.dll (Smdn.Net.AddressResolution-1.0.0)
+// Smdn.Net.AddressResolution.dll (Smdn.Net.AddressResolution-1.0.1)
// Name: Smdn.Net.AddressResolution
-// AssemblyVersion: 1.0.0.0
-// InformationalVersion: 1.0.0+b2ffdef7b9a768c14df101d2076bc63c12331f73
+// AssemblyVersion: 1.0.1.0
+// InformationalVersion: 1.0.1+12cda679d681acbeb81dac8a0cb03dbf6a3a0a3d
// TargetFramework: .NETCoreApp,Version=v6.0
// Configuration: Release
// Referenced assemblies:
// Microsoft.Extensions.DependencyInjection.Abstractions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60
// Microsoft.Extensions.Logging.Abstractions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60
// System.Collections, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Collections.Concurrent, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.ComponentModel, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.ComponentModel.Primitives, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Diagnostics.Process, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Linq, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Memory, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
// System.Net.NetworkInformation, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Net.Ping, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Net.Primitives, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Runtime, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Runtime.InteropServices, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Runtime.InteropServices.RuntimeInformation, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Threading, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// Vanara.PInvoke.IpHlpApi, Version=3.4.13.0, Culture=neutral, PublicKeyToken=c37e4080322237fa
// Vanara.PInvoke.Shared, Version=3.4.13.0, Culture=neutral, PublicKeyToken=c37e4080322237fa
// Vanara.PInvoke.Ws2_32, Version=3.4.13.0, Culture=neutral, PublicKeyToken=c37e4080322237fa
#nullable enable annotations
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Net;
using System.Net.NetworkInformation;
using System.Runtime.CompilerServices;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Extensions.Logging;
using Smdn.Net;
using Smdn.Net.AddressResolution;
using Smdn.Net.AddressTables;
using Smdn.Net.NetworkScanning;
namespace Smdn.Net {
public abstract class IPNetworkProfile {
public static IPNetworkProfile Create() {}
public static IPNetworkProfile Create(Func<IEnumerable<IPAddress>?> addressRangeGenerator, NetworkInterface? networkInterface = null) {}
public static IPNetworkProfile Create(IPAddress baseAddress, IPAddress subnetMask, NetworkInterface? networkInterface = null) {}
public static IPNetworkProfile Create(IPAddress baseAddress, int prefixLength, NetworkInterface? networkInterface = null) {}
public static IPNetworkProfile Create(NetworkInterface networkInterface) {}
public static IPNetworkProfile Create(Predicate<NetworkInterface> predicateForNetworkInterface) {}
+ public static IPNetworkProfile CreateFromNetworkInterface(Guid id) {}
+ public static IPNetworkProfile CreateFromNetworkInterface(PhysicalAddress physicalAddress) {}
+ public static IPNetworkProfile CreateFromNetworkInterface(string id) {}
+ public static IPNetworkProfile CreateFromNetworkInterfaceName(string name) {}
protected IPNetworkProfile(NetworkInterface? networkInterface) {}
public NetworkInterface? NetworkInterface { get; }
public abstract IEnumerable<IPAddress>? GetAddressRange();
}
public static class PhysicalAddressExtensions {
public static string ToMacAddressString(this PhysicalAddress hardwareAddress, char delimiter = ':') {}
}
}
namespace Smdn.Net.AddressResolution {
public interface IAddressResolver<TAddress, TResolvedAddress> where TAddress : notnull where TResolvedAddress : notnull {
void Invalidate(TAddress address);
ValueTask<TResolvedAddress?> ResolveAsync(TAddress address, CancellationToken cancellationToken);
}
public class MacAddressResolver : MacAddressResolverBase {
protected MacAddressResolver(IAddressTable addressTable, bool shouldDisposeAddressTable, INetworkScanner? networkScanner, bool shouldDisposeNetworkScanner, NetworkInterface? networkInterface, int maxParallelCountForRefreshInvalidatedAddresses, ILogger? logger) {}
public MacAddressResolver() {}
public MacAddressResolver(IAddressTable? addressTable, INetworkScanner? networkScanner, bool shouldDisposeAddressTable = false, bool shouldDisposeNetworkScanner = false, NetworkInterface? networkInterface = null, int maxParallelCountForRefreshInvalidatedAddresses = 3, IServiceProvider? serviceProvider = null) {}
public MacAddressResolver(IPNetworkProfile? networkProfile, IServiceProvider? serviceProvider = null) {}
public bool CanPerformNetworkScan { get; }
public override bool HasInvalidated { get; }
public TimeSpan NetworkScanInterval { get; set; }
public TimeSpan NetworkScanMinInterval { get; set; }
protected override void Dispose(bool disposing) {}
public IAsyncEnumerable<AddressTableEntry> EnumerateAddressTableEntriesAsync(CancellationToken cancellationToken = default) {}
public IAsyncEnumerable<AddressTableEntry> EnumerateAddressTableEntriesAsync(Predicate<AddressTableEntry> predicate, CancellationToken cancellationToken = default) {}
protected override void InvalidateCore(IPAddress ipAddress) {}
protected override void InvalidateCore(PhysicalAddress macAddress) {}
protected override ValueTask RefreshAddressTableAsyncCore(CancellationToken cancellationToken = default) {}
protected override ValueTask RefreshInvalidatedAddressesAsyncCore(CancellationToken cancellationToken = default) {}
protected override async ValueTask<PhysicalAddress?> ResolveIPAddressToMacAddressAsyncCore(IPAddress ipAddress, CancellationToken cancellationToken) {}
protected override async ValueTask<IPAddress?> ResolveMacAddressToIPAddressAsyncCore(PhysicalAddress macAddress, CancellationToken cancellationToken) {}
protected virtual async ValueTask<AddressTableEntry> SelectAddressTableEntryAsync(Predicate<AddressTableEntry> predicate, CancellationToken cancellationToken) {}
}
public abstract class MacAddressResolverBase :
IAddressResolver<IPAddress, PhysicalAddress>,
IAddressResolver<PhysicalAddress, IPAddress>,
IDisposable
{
protected static PhysicalAddress AllZeroMacAddress { get; }
public static MacAddressResolverBase Null { get; }
protected MacAddressResolverBase(ILogger? logger = null) {}
public abstract bool HasInvalidated { get; }
protected ILogger? Logger { get; }
protected virtual void Dispose(bool disposing) {}
public void Dispose() {}
public void Invalidate(IPAddress ipAddress) {}
public void Invalidate(PhysicalAddress macAddress) {}
protected abstract void InvalidateCore(IPAddress ipAddress);
protected abstract void InvalidateCore(PhysicalAddress macAddress);
public ValueTask Ref...
Smdn.Net.AddressResolution version 1.0.0
Released package
Release notes
The full release notes are available at gist.
Change log
Change log in this release:
- 2023-04-19 improve package description and README
- 2023-04-19 include ThirdPartyNotices.md to the package
- 2023-04-19 update package version
API changes
API changes in this release:
diff --git a/doc/api-list/Smdn.Net.AddressResolution/Smdn.Net.AddressResolution-net6.0.apilist.cs b/doc/api-list/Smdn.Net.AddressResolution/Smdn.Net.AddressResolution-net6.0.apilist.cs
index 3007387..45fe092 100644
--- a/doc/api-list/Smdn.Net.AddressResolution/Smdn.Net.AddressResolution-net6.0.apilist.cs
+++ b/doc/api-list/Smdn.Net.AddressResolution/Smdn.Net.AddressResolution-net6.0.apilist.cs
@@ -1,295 +1,295 @@
-// Smdn.Net.AddressResolution.dll (Smdn.Net.AddressResolution-1.0.0-rc2)
+// Smdn.Net.AddressResolution.dll (Smdn.Net.AddressResolution-1.0.0)
// Name: Smdn.Net.AddressResolution
// AssemblyVersion: 1.0.0.0
-// InformationalVersion: 1.0.0-rc2+3ee5c5d35420506d56f36dcd2bf148727d37aa11
+// InformationalVersion: 1.0.0+b2ffdef7b9a768c14df101d2076bc63c12331f73
// TargetFramework: .NETCoreApp,Version=v6.0
// Configuration: Release
// Referenced assemblies:
// Microsoft.Extensions.DependencyInjection.Abstractions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60
// Microsoft.Extensions.Logging.Abstractions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60
// System.Collections, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Collections.Concurrent, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.ComponentModel, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.ComponentModel.Primitives, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Diagnostics.Process, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Linq, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Memory, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
// System.Net.NetworkInformation, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Net.Ping, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Net.Primitives, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Runtime, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Runtime.InteropServices, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Runtime.InteropServices.RuntimeInformation, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Threading, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// Vanara.PInvoke.IpHlpApi, Version=3.4.13.0, Culture=neutral, PublicKeyToken=c37e4080322237fa
// Vanara.PInvoke.Shared, Version=3.4.13.0, Culture=neutral, PublicKeyToken=c37e4080322237fa
// Vanara.PInvoke.Ws2_32, Version=3.4.13.0, Culture=neutral, PublicKeyToken=c37e4080322237fa
#nullable enable annotations
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Net;
using System.Net.NetworkInformation;
using System.Runtime.CompilerServices;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Extensions.Logging;
using Smdn.Net;
using Smdn.Net.AddressResolution;
using Smdn.Net.AddressTables;
using Smdn.Net.NetworkScanning;
namespace Smdn.Net {
public abstract class IPNetworkProfile {
public static IPNetworkProfile Create() {}
public static IPNetworkProfile Create(Func<IEnumerable<IPAddress>?> addressRangeGenerator, NetworkInterface? networkInterface = null) {}
public static IPNetworkProfile Create(IPAddress baseAddress, IPAddress subnetMask, NetworkInterface? networkInterface = null) {}
public static IPNetworkProfile Create(IPAddress baseAddress, int prefixLength, NetworkInterface? networkInterface = null) {}
public static IPNetworkProfile Create(NetworkInterface networkInterface) {}
public static IPNetworkProfile Create(Predicate<NetworkInterface> predicateForNetworkInterface) {}
protected IPNetworkProfile(NetworkInterface? networkInterface) {}
public NetworkInterface? NetworkInterface { get; }
public abstract IEnumerable<IPAddress>? GetAddressRange();
}
public static class PhysicalAddressExtensions {
public static string ToMacAddressString(this PhysicalAddress hardwareAddress, char delimiter = ':') {}
}
}
namespace Smdn.Net.AddressResolution {
public interface IAddressResolver<TAddress, TResolvedAddress> where TAddress : notnull where TResolvedAddress : notnull {
void Invalidate(TAddress address);
ValueTask<TResolvedAddress?> ResolveAsync(TAddress address, CancellationToken cancellationToken);
}
public class MacAddressResolver : MacAddressResolverBase {
protected MacAddressResolver(IAddressTable addressTable, bool shouldDisposeAddressTable, INetworkScanner? networkScanner, bool shouldDisposeNetworkScanner, NetworkInterface? networkInterface, int maxParallelCountForRefreshInvalidatedAddresses, ILogger? logger) {}
public MacAddressResolver() {}
public MacAddressResolver(IAddressTable? addressTable, INetworkScanner? networkScanner, bool shouldDisposeAddressTable = false, bool shouldDisposeNetworkScanner = false, NetworkInterface? networkInterface = null, int maxParallelCountForRefreshInvalidatedAddresses = 3, IServiceProvider? serviceProvider = null) {}
public MacAddressResolver(IPNetworkProfile? networkProfile, IServiceProvider? serviceProvider = null) {}
public bool CanPerformNetworkScan { get; }
public override bool HasInvalidated { get; }
public TimeSpan NetworkScanInterval { get; set; }
public TimeSpan NetworkScanMinInterval { get; set; }
protected override void Dispose(bool disposing) {}
public IAsyncEnumerable<AddressTableEntry> EnumerateAddressTableEntriesAsync(CancellationToken cancellationToken = default) {}
public IAsyncEnumerable<AddressTableEntry> EnumerateAddressTableEntriesAsync(Predicate<AddressTableEntry> predicate, CancellationToken cancellationToken = default) {}
protected override void InvalidateCore(IPAddress ipAddress) {}
protected override void InvalidateCore(PhysicalAddress macAddress) {}
protected override ValueTask RefreshAddressTableAsyncCore(CancellationToken cancellationToken = default) {}
protected override ValueTask RefreshInvalidatedAddressesAsyncCore(CancellationToken cancellationToken = default) {}
protected override async ValueTask<PhysicalAddress?> ResolveIPAddressToMacAddressAsyncCore(IPAddress ipAddress, CancellationToken cancellationToken) {}
protected override async ValueTask<IPAddress?> ResolveMacAddressToIPAddressAsyncCore(PhysicalAddress macAddress, CancellationToken cancellationToken) {}
protected virtual async ValueTask<AddressTableEntry> SelectAddressTableEntryAsync(Predicate<AddressTableEntry> predicate, CancellationToken cancellationToken) {}
}
public abstract class MacAddressResolverBase :
IAddressResolver<IPAddress, PhysicalAddress>,
IAddressResolver<PhysicalAddress, IPAddress>,
IDisposable
{
protected static PhysicalAddress AllZeroMacAddress { get; }
public static MacAddressResolverBase Null { get; }
protected MacAddressResolverBase(ILogger? logger = null) {}
public abstract bool HasInvalidated { get; }
protected ILogger? Logger { get; }
protected virtual void Dispose(bool disposing) {}
public void Dispose() {}
public void Invalidate(IPAddress ipAddress) {}
public void Invalidate(PhysicalAddress macAddress) {}
protected abstract void InvalidateCore(IPAddress ipAddress);
protected abstract void InvalidateCore(PhysicalAddress macAddress);
public ValueTask RefreshAddressTableAsync(CancellationToken cancellationToken = default) {}
protected virtual ValueTask RefreshAddressTableAsyncCore(CancellationToken cancellationToken) {}
public ValueTask RefreshInvalidatedAddressesAsync(CancellationToken cancellationToken = default) {}
protected virtual ValueTask RefreshInvalidatedAddressesAsyncCore(CancellationToken cancellationToken) {}
public ValueTask<PhysicalAddress?> ResolveIPAddressToMacAddressAsync(IPAddress ipAddress, CancellationToken cancellationToken = default) {}
protected abstract ValueTask<PhysicalAddress?> ResolveIPAddressToMacAddressAsyncCore(IPAddress ipAddress, CancellationToken cancellationToken);
public ValueTask<IPAddress?> ResolveMacAddressToIPAddressAsync(PhysicalAddress macAddress, CancellationToken cancellationToken = default) {}
protected abstract ValueTask<IPAddress?> ResolveMacAddressToIPAddressAsyncCore(PhysicalAddress macAddress, CancellationToken cancellationToken);
void IAddressResolver<IPAddress, PhysicalAddress>.Invalidate(IPAddress address) {}
ValueTask<PhysicalAddress?> IAddressResolver<IPAddress, PhysicalAddress>.ResolveAsync(IPAddress address, CancellationToken cancellationToken) {}
void IAddressResolver<PhysicalAddress, IPAddress>.Invalidate(PhysicalAddress address) {}
ValueTask<IPAddress?> IAddressResolver<PhysicalAddress, ...
Smdn.Net.AddressResolution version 1.0.0-rc2
Released package
Release notes
The full release notes are available at gist.
Change log
Change log in this release:
- 2023-04-15 update package version
- 2023-04-15 bump Smdn.MSBuild.DefineConstants.NETSdkApi up to 1.3.11
- 2023-04-15 throw ArgumentNullException if addresses is null
- 2023-04-15 fix warning SA1210
- 2023-04-15 prohibit invoking command in disposed state
- 2023-04-15 add cancellation point
- 2023-04-15 add AddressTable.Null and NetworkScanner.Null
- 2023-04-15 rename RefreshInvalidatedAddressesAsync() from RefreshInvalidatedCacheAsync()
- 2023-04-15 rename RefreshAddressTableAsync() from RefreshCacheAsync()
- 2023-04-15 add IsSupported
- 2023-04-15 add and expose AddressTable.Create
- 2023-04-15 add abstract AddressTable class
- 2023-04-15 clarify and validate parameter nullability
- 2023-04-15 add and expose NetworkScanner.Create
- 2023-04-15 add abstract NetworkScanner class
API changes
API changes in this release:
diff --git a/doc/api-list/Smdn.Net.AddressResolution/Smdn.Net.AddressResolution-net6.0.apilist.cs b/doc/api-list/Smdn.Net.AddressResolution/Smdn.Net.AddressResolution-net6.0.apilist.cs
index 35a49a0..3007387 100644
--- a/doc/api-list/Smdn.Net.AddressResolution/Smdn.Net.AddressResolution-net6.0.apilist.cs
+++ b/doc/api-list/Smdn.Net.AddressResolution/Smdn.Net.AddressResolution-net6.0.apilist.cs
@@ -1,261 +1,295 @@
-// Smdn.Net.AddressResolution.dll (Smdn.Net.AddressResolution-1.0.0-rc1)
+// Smdn.Net.AddressResolution.dll (Smdn.Net.AddressResolution-1.0.0-rc2)
// Name: Smdn.Net.AddressResolution
// AssemblyVersion: 1.0.0.0
-// InformationalVersion: 1.0.0-rc1+54f2767c7798db11d76ae3836009b55f701af69f
+// InformationalVersion: 1.0.0-rc2+3ee5c5d35420506d56f36dcd2bf148727d37aa11
// TargetFramework: .NETCoreApp,Version=v6.0
// Configuration: Release
// Referenced assemblies:
// Microsoft.Extensions.DependencyInjection.Abstractions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60
// Microsoft.Extensions.Logging.Abstractions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60
// System.Collections, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Collections.Concurrent, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.ComponentModel, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.ComponentModel.Primitives, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Diagnostics.Process, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Linq, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Memory, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
// System.Net.NetworkInformation, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Net.Ping, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Net.Primitives, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Runtime, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Runtime.InteropServices, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Runtime.InteropServices.RuntimeInformation, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Threading, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// Vanara.PInvoke.IpHlpApi, Version=3.4.13.0, Culture=neutral, PublicKeyToken=c37e4080322237fa
// Vanara.PInvoke.Shared, Version=3.4.13.0, Culture=neutral, PublicKeyToken=c37e4080322237fa
// Vanara.PInvoke.Ws2_32, Version=3.4.13.0, Culture=neutral, PublicKeyToken=c37e4080322237fa
#nullable enable annotations
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Net;
using System.Net.NetworkInformation;
using System.Runtime.CompilerServices;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Extensions.Logging;
using Smdn.Net;
using Smdn.Net.AddressResolution;
using Smdn.Net.AddressTables;
using Smdn.Net.NetworkScanning;
namespace Smdn.Net {
public abstract class IPNetworkProfile {
public static IPNetworkProfile Create() {}
public static IPNetworkProfile Create(Func<IEnumerable<IPAddress>?> addressRangeGenerator, NetworkInterface? networkInterface = null) {}
public static IPNetworkProfile Create(IPAddress baseAddress, IPAddress subnetMask, NetworkInterface? networkInterface = null) {}
public static IPNetworkProfile Create(IPAddress baseAddress, int prefixLength, NetworkInterface? networkInterface = null) {}
public static IPNetworkProfile Create(NetworkInterface networkInterface) {}
public static IPNetworkProfile Create(Predicate<NetworkInterface> predicateForNetworkInterface) {}
protected IPNetworkProfile(NetworkInterface? networkInterface) {}
public NetworkInterface? NetworkInterface { get; }
public abstract IEnumerable<IPAddress>? GetAddressRange();
}
public static class PhysicalAddressExtensions {
public static string ToMacAddressString(this PhysicalAddress hardwareAddress, char delimiter = ':') {}
}
}
namespace Smdn.Net.AddressResolution {
public interface IAddressResolver<TAddress, TResolvedAddress> where TAddress : notnull where TResolvedAddress : notnull {
void Invalidate(TAddress address);
ValueTask<TResolvedAddress?> ResolveAsync(TAddress address, CancellationToken cancellationToken);
}
public class MacAddressResolver : MacAddressResolverBase {
- protected MacAddressResolver(IAddressTable addressTable, bool shouldDisposeAddressTable, INetworkScanner? networkScanner, bool shouldDisposeNetworkScanner, NetworkInterface? networkInterface, int maxParallelCountForRefreshInvalidatedCache, ILogger? logger) {}
+ protected MacAddressResolver(IAddressTable addressTable, bool shouldDisposeAddressTable, INetworkScanner? networkScanner, bool shouldDisposeNetworkScanner, NetworkInterface? networkInterface, int maxParallelCountForRefreshInvalidatedAddresses, ILogger? logger) {}
public MacAddressResolver() {}
- public MacAddressResolver(IAddressTable? addressTable, INetworkScanner? networkScanner, bool shouldDisposeAddressTable = false, bool shouldDisposeNetworkScanner = false, NetworkInterface? networkInterface = null, int maxParallelCountForRefreshInvalidatedCache = 3, IServiceProvider? serviceProvider = null) {}
+ public MacAddressResolver(IAddressTable? addressTable, INetworkScanner? networkScanner, bool shouldDisposeAddressTable = false, bool shouldDisposeNetworkScanner = false, NetworkInterface? networkInterface = null, int maxParallelCountForRefreshInvalidatedAddresses = 3, IServiceProvider? serviceProvider = null) {}
public MacAddressResolver(IPNetworkProfile? networkProfile, IServiceProvider? serviceProvider = null) {}
public bool CanPerformNetworkScan { get; }
public override bool HasInvalidated { get; }
public TimeSpan NetworkScanInterval { get; set; }
public TimeSpan NetworkScanMinInterval { get; set; }
protected override void Dispose(bool disposing) {}
public IAsyncEnumerable<AddressTableEntry> EnumerateAddressTableEntriesAsync(CancellationToken cancellationToken = default) {}
public IAsyncEnumerable<AddressTableEntry> EnumerateAddressTableEntriesAsync(Predicate<AddressTableEntry> predicate, CancellationToken cancellationToken = default) {}
protected override void InvalidateCore(IPAddress ipAddress) {}
protected override void InvalidateCore(PhysicalAddress macAddress) {}
- protected override ValueTask RefreshCacheAsyncCore(CancellationToken cancellationToken = default) {}
- protected override ValueTask RefreshInvalidatedCacheAsyncCore(CancellationToken cancellationToken = default) {}
+ protected override ValueTask RefreshAddressTableAsyncCore(CancellationToken cancellationToken = default) {}
+ protected override ValueTask RefreshInvalidatedAddressesAsyncCore(CancellationToken cancellationToken = d...
Smdn.Net.AddressResolution version 1.0.0-rc1
Released package
Release notes
The full release notes are available at gist.
Change log
Change log in this release:
- 2023-04-14 disable nullability warnings
- 2023-04-14 update package version
- 2023-04-14 update package tags
- 2023-04-14 improve log message
- 2023-04-14 add CanPerformNetworkScan and allow to provide no INetworkScanner
- 2023-04-14 update XML docs
- 2023-04-13 cleanup
- 2023-04-13 rename CommandNetworkScanner
- 2023-04-13 split into new namespaces Smdn.Net.AddressTables and Smdn.Net.NetworkScanning
- 2023-04-13 use the term of 'network scanner' instead of 'neighbor discoverer'
- 2023-04-13 use the term of 'address table' instead of 'neighbor table'
- 2023-04-13 add XML docs
- 2023-04-13 split impls into individual files
- 2023-04-12 add NeighborTableEntry.DefaultEqualityComparer and ExceptStateEqualityComparer
- 2023-04-12 include State for comparing equality
- 2023-04-12 fix not to include broadcast addresses
- 2023-04-12 add cancellation point
- 2023-04-12 commonize the duplicate codes for address resolution and make it extensible
- 2023-04-12 use Stopwatch instead of DateTime.Now to measure interval of neighbor discovery
- 2023-04-12 implement IEquatable<NeighborTableEntry> and its relevant members
- 2023-04-11 refactor
- 2023-04-11 add extension point for creating process from ProcessStartInfo
- 2023-04-11 apply filtering by network interface as a default filter predicate for EnumerateNeighborTableEntriesAsync
- 2023-04-11 make semaphore count for the partial scan configurable
- 2023-04-11 add MacAddressResolver.NeighborDiscoveryMinInterval
- 2023-04-11 return immediately if no addresses invalidated
- 2023-04-11 delete NullNeighborDiscoverer
- 2023-04-09 use IsEmpty instead of Any()
- 2023-04-09 add EnumerateNeighborTableEntriesAsync
- 2023-04-09 clarify parameter name
- 2023-04-09 log exception occured on SendPingAsync
- 2023-04-09 add cancellation point
- 2023-04-09 integrate properties representing the target interface
- 2023-04-09 improve network iface ID comparison on Windows
- 2023-04-09 improve filtering according to the network interface properties
- 2023-04-09 add support for filtering address resolition candidates
- 2023-04-09 improve log points
- 2023-04-09 override ToString()
- 2023-04-09 fix for net7.0
- 2023-04-09 fix not to throw exception from IsSupported properties
- 2023-04-08 use command-based INeighborDiscoverer's also on Windows if available
- 2023-04-08 prefer IPv4 addresses
- 2023-04-08 commonize exception messages
- 2023-04-07 add NeighborDiscoveryInterval property
- 2023-04-07 reorganize constructor parameters
- 2023-04-07 add PingNeighborDiscoverer
- 2023-04-07 make parameter non-nullable
- 2023-04-07 accept IServiceProvider instead of ILogger
- 2023-04-07 improve exception message
- 2023-04-07 make CancellationToken arguments optional
- 2023-04-07 make INeighborTable and INeighborDiscoverer disposable
- 2023-04-06 clean up
- 2023-04-06 fix usage of UnixFileMode
- 2023-04-06 reduce duplicate logging
- 2023-04-06 log actual type name of INeighborTable and INeighborDiscoverer passed to ctor
- 2023-04-06 add notnull constraints to type parameters
- 2023-04-06 clarify the exception to be thrown when parameter is required
- 2023-04-06 add constructor overloads
- 2023-04-06 fix XML docs
API changes
API changes in this release:
diff --git a/doc/api-list/Smdn.Net.AddressResolution/Smdn.Net.AddressResolution-net6.0.apilist.cs b/doc/api-list/Smdn.Net.AddressResolution/Smdn.Net.AddressResolution-net6.0.apilist.cs
index 5cc70d9..35a49a0 100644
--- a/doc/api-list/Smdn.Net.AddressResolution/Smdn.Net.AddressResolution-net6.0.api...
Smdn.Net.AddressResolution version 1.0.0-preview6
Released package
Release notes
The full release notes are available at gist.
Change log
Change log in this release:
- 2023-03-30 seal concrete classes
- 2023-03-30 update package version
- 2023-03-30 suppress warning IDE0060
- 2023-03-30 make NeighborMacAddressResolver the default implementation
- 2023-03-30 introduce IPNetworkProfile and replace MacAddressResolverOptions with it
- 2023-03-30 rename file for the class RunCommandNeighborDiscovererBase
- 2023-03-30 add IpHlpApiNeighborDiscoverer
- 2023-03-30 add IpHlpApiNeighborTable
- 2023-03-30 reimplement resolvers using INeighborTable and rename to NeighborMacAddressResolver
- 2023-03-30 reimplement resolvers using INeighborDiscoverer
- 2023-03-30 add abstract API for neighbor discovery
- 2023-03-30 reimplement resolvers using INeighborCache
- 2023-03-30 add abstract API for neighbor cache tables
- 2023-03-30 add PhysicalAddressExtensions.AllZeroMacAddress
- 2023-03-27 handle Timeout.InfiniteTimeSpan as infinite interval value
- 2023-03-27 refer Microsoft.Extensions.Logging.Abstractions instead
- 2023-03-25 remove suppressing warning SA1305
- 2023-03-25 remove redundant accessibility modifiers
API changes
API changes in this release:
diff --git a/doc/api-list/Smdn.Net.AddressResolution/Smdn.Net.AddressResolution-net6.0.apilist.cs b/doc/api-list/Smdn.Net.AddressResolution/Smdn.Net.AddressResolution-net6.0.apilist.cs
index 235f0f0..5cc70d9 100644
--- a/doc/api-list/Smdn.Net.AddressResolution/Smdn.Net.AddressResolution-net6.0.apilist.cs
+++ b/doc/api-list/Smdn.Net.AddressResolution/Smdn.Net.AddressResolution-net6.0.apilist.cs
@@ -1,92 +1,217 @@
-// Smdn.Net.AddressResolution.dll (Smdn.Net.AddressResolution-1.0.0-preview5)
+// Smdn.Net.AddressResolution.dll (Smdn.Net.AddressResolution-1.0.0-preview6)
// Name: Smdn.Net.AddressResolution
// AssemblyVersion: 1.0.0.0
-// InformationalVersion: 1.0.0-preview5+fe261fa7dd16c43347c28935b3055ec3b8ab0674
+// InformationalVersion: 1.0.0-preview6+867630e3d8768ccca99d991e9c0c1cca62c64c76
// TargetFramework: .NETCoreApp,Version=v6.0
// Configuration: Release
// Referenced assemblies:
// Microsoft.Extensions.DependencyInjection.Abstractions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60
// Microsoft.Extensions.Logging.Abstractions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60
// System.Collections.Concurrent, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.ComponentModel, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Diagnostics.Process, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Linq, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Memory, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
// System.Net.NetworkInformation, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Net.Primitives, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Runtime, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+// System.Runtime.InteropServices, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Runtime.InteropServices.RuntimeInformation, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Threading, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+// Vanara.Core, Version=3.4.13.0, Culture=neutral, PublicKeyToken=c37e4080322237fa
+// Vanara.PInvoke.IpHlpApi, Version=3.4.13.0, Culture=neutral, PublicKeyToken=c37e4080322237fa
+// Vanara.PInvoke.Shared, Version=3.4.13.0, Culture=neutral, PublicKeyToken=c37e4080322237fa
+// Vanara.PInvoke.Ws2_32, Version=3.4.13.0, Culture=neutral, PublicKeyToken=c37e4080322237fa
#nullable enable annotations
using System;
+using System.Collections.Generic;
using System.Net;
using System.Net.NetworkInformation;
+using System.Runtime.CompilerServices;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Extensions.Logging;
+using Smdn.Net;
using Smdn.Net.AddressResolution;
+using Smdn.Net.NeighborDiscovery;
namespace Smdn.Net {
+ public abstract class IPNetworkProfile {
+ public static IPNetworkProfile Create() {}
+ public static IPNetworkProfile Create(Func<IEnumerable<IPAddress>?> addressRangeGenerator, NetworkInterface? networkInterface = null) {}
+ public static IPNetworkProfile Create(IPAddress baseAddress, IPAddress subnetMask, NetworkInterface? networkInterface = null) {}
+ public static IPNetworkProfile Create(IPAddress baseAddress, int prefixLength, NetworkInterface? networkInterface = null) {}
+ public static IPNetworkProfile Create(NetworkInterface networkInterface) {}
+ public static IPNetworkProfile Create(Predicate<NetworkInterface> predicate) {}
+
+ protected IPNetworkProfile(NetworkInterface? networkInterface) {}
+
+ public NetworkInterface? NetworkInterface { get; }
+
+ public abstract IEnumerable<IPAddress>? GetAddressRange();
+ }
+
public static class PhysicalAddressExtensions {
public static string ToMacAddressString(this PhysicalAddress hardwareAddress, char delimiter = ':') {}
}
}
namespace Smdn.Net.AddressResolution {
public interface IAddressResolver<TAddress, TResolvedAddress> {
void Invalidate(TAddress address);
ValueTask<TResolvedAddress> ResolveAsync(TAddress address, CancellationToken cancellationToken);
}
- public abstract class MacAddressResolver :
+ public class MacAddressResolver : MacAddressResolverBase {
+ protected MacAddressResolver(INeighborTable neighborTable, INeighborDiscoverer neighborDiscoverer, TimeSpan neighborDiscoveryInterval, ILogger? logger) {}
+ public MacAddressResolver(INeighborTable? neighborTable = null, INeighborDiscoverer? neighborDiscoverer = null, int neighborDiscoveryIntervalMilliseconds = -1, IServiceProvider? serviceProvider = null) {}
+ public MacAddressResolver(IPNetworkProfile? networkProfile, IServiceProvider? serviceProvider = null) {}
+ public MacAddressResolver(IPNetworkProfile? networkProfile, TimeSpan neighborDiscoveryInterval, IServiceProvider? serviceProvider = null) {}
+ public MacAddressResolver(TimeSpan neighborDiscoveryInterval, INeighborTable? neighborTable = null, INeighborDiscoverer? neighborDiscoverer = null, IServiceProvider? serviceProvider = null) {}
+
+ public override bool HasInvalidated { get; }
+
+ protected override void Dispose(bool disposing) {}
+ protected override void InvalidateCore(IPAddress ipAddress) {}
+ protected override void InvalidateCore(PhysicalAddress macAddress) {}
+ protected override ValueTask RefreshCacheAsyncCore(CancellationToken cancellationToken = default) {}
+ protected override ValueTask RefreshInvalidatedCacheAsyncCore(CancellationToken cancellationToken = default) {}
+ protected override async ValueTask<PhysicalAddress?> ResolveIPAddressToMacAddressAsyncCore(IPAddress ipAddress, CancellationToken cancellationToken) {}
+ protected override async ValueTask<IPAddress?> ResolveMacAddressToIPAddressAsyncCore(PhysicalAddress macAddress, CancellationToken cancellationToken) {}
+ }
+
+ public abstract class MacAddressResolverBase :
IAddressResolver<IPAddress, PhysicalAddress>,
IAddressResolver<PhysicalAddress, IPAddress>,
IDisposable
{
- protected static readonly PhysicalAddress AllZeroMacAddress; // = "000000000000"
+ protected static PhysicalAddress AllZeroMacAddress { get; }
+ public static MacAddressResolverBase Null { get; }
- public static MacAddressResolver Null { get; }
-
- public static MacAddressResolver Create(MacAddressResolverOptions? options = null, IServiceProvider? serviceProvider = null) {}
-
- protected MacAddres...
Smdn.Net.AddressResolution version 1.0.0-preview5
Released package
Release notes
The full release notes are available at gist.
Change log
Change log in this release:
- 2023-03-23 update assembly version
- 2023-03-23 bump Smdn.MSBuild.ProjectAssets.Library up to 1.4.7
- 2023-03-23 improve informational logs
- 2023-03-23 fix naming
- 2023-03-23 rename file
- 2023-03-23 add resolver implementation using 'arp-scan' command
- 2023-03-23 define the maximum number of parallel ARP scannings
- 2023-03-23 log the process exit code
- 2023-03-23 suppress warning SA1305
- 2023-03-23 change API to mark addresses as invalid with TAddress instead of TResolvedAddress
- 2023-03-23 add support for specifying '-e <iface>' for nmap options
API changes
API changes in this release:
diff --git a/doc/api-list/Smdn.Net.AddressResolution/Smdn.Net.AddressResolution-net6.0.apilist.cs b/doc/api-list/Smdn.Net.AddressResolution/Smdn.Net.AddressResolution-net6.0.apilist.cs
index 8de9632..235f0f0 100644
--- a/doc/api-list/Smdn.Net.AddressResolution/Smdn.Net.AddressResolution-net6.0.apilist.cs
+++ b/doc/api-list/Smdn.Net.AddressResolution/Smdn.Net.AddressResolution-net6.0.apilist.cs
@@ -1,88 +1,92 @@
-// Smdn.Net.AddressResolution.dll (Smdn.Net.AddressResolution-1.0.0-preview4)
+// Smdn.Net.AddressResolution.dll (Smdn.Net.AddressResolution-1.0.0-preview5)
// Name: Smdn.Net.AddressResolution
// AssemblyVersion: 1.0.0.0
-// InformationalVersion: 1.0.0-preview4+f17248a683dc95a5f8a1d3f3ec79fb49b8b2852f
+// InformationalVersion: 1.0.0-preview5+fe261fa7dd16c43347c28935b3055ec3b8ab0674
// TargetFramework: .NETCoreApp,Version=v6.0
// Configuration: Release
// Referenced assemblies:
// Microsoft.Extensions.DependencyInjection.Abstractions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60
// Microsoft.Extensions.Logging.Abstractions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60
// System.Collections.Concurrent, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.ComponentModel, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Diagnostics.Process, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Linq, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Memory, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
// System.Net.NetworkInformation, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Net.Primitives, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Runtime, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Runtime.InteropServices.RuntimeInformation, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+// System.Threading, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
#nullable enable annotations
using System;
using System.Net;
using System.Net.NetworkInformation;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Extensions.Logging;
using Smdn.Net.AddressResolution;
namespace Smdn.Net {
public static class PhysicalAddressExtensions {
public static string ToMacAddressString(this PhysicalAddress hardwareAddress, char delimiter = ':') {}
}
}
namespace Smdn.Net.AddressResolution {
public interface IAddressResolver<TAddress, TResolvedAddress> {
- void Invalidate(TResolvedAddress resolvedAddress);
+ void Invalidate(TAddress address);
ValueTask<TResolvedAddress> ResolveAsync(TAddress address, CancellationToken cancellationToken);
}
public abstract class MacAddressResolver :
IAddressResolver<IPAddress, PhysicalAddress>,
IAddressResolver<PhysicalAddress, IPAddress>,
IDisposable
{
protected static readonly PhysicalAddress AllZeroMacAddress; // = "000000000000"
public static MacAddressResolver Null { get; }
public static MacAddressResolver Create(MacAddressResolverOptions? options = null, IServiceProvider? serviceProvider = null) {}
protected MacAddressResolver(ILogger? logger = null) {}
public abstract bool HasInvalidated { get; }
protected ILogger? Logger { get; }
protected virtual void Dispose(bool disposing) {}
public void Dispose() {}
- public void Invalidate(IPAddress resolvedIPAddress) {}
- public void Invalidate(PhysicalAddress resolvedMacAddress) {}
- protected abstract void InvalidateCore(IPAddress resolvedIPAddress);
- protected abstract void InvalidateCore(PhysicalAddress resolvedMacAddress);
+ public void Invalidate(IPAddress ipAddress) {}
+ public void Invalidate(PhysicalAddress macAddress) {}
+ protected abstract void InvalidateCore(IPAddress ipAddress);
+ protected abstract void InvalidateCore(PhysicalAddress macAddress);
public ValueTask RefreshCacheAsync(CancellationToken cancellationToken = default) {}
protected virtual ValueTask RefreshCacheAsyncCore(CancellationToken cancellationToken) {}
public ValueTask RefreshInvalidatedCacheAsync(CancellationToken cancellationToken = default) {}
protected virtual ValueTask RefreshInvalidatedCacheAsyncCore(CancellationToken cancellationToken) {}
public ValueTask<PhysicalAddress?> ResolveIPAddressToMacAddressAsync(IPAddress ipAddress, CancellationToken cancellationToken = default) {}
protected abstract ValueTask<PhysicalAddress?> ResolveIPAddressToMacAddressAsyncCore(IPAddress ipAddress, CancellationToken cancellationToken);
public ValueTask<IPAddress?> ResolveMacAddressToIPAddressAsync(PhysicalAddress macAddress, CancellationToken cancellationToken = default) {}
protected abstract ValueTask<IPAddress?> ResolveMacAddressToIPAddressAsyncCore(PhysicalAddress macAddress, CancellationToken cancellationToken);
- void IAddressResolver<IPAddress, PhysicalAddress>.Invalidate(PhysicalAddress resolvedAddress) {}
+ void IAddressResolver<IPAddress, PhysicalAddress>.Invalidate(IPAddress address) {}
ValueTask<PhysicalAddress?> IAddressResolver<IPAddress, PhysicalAddress>.ResolveAsync(IPAddress address, CancellationToken cancellationToken) {}
- void IAddressResolver<PhysicalAddress, IPAddress>.Invalidate(IPAddress resolvedAddress) {}
+ void IAddressResolver<PhysicalAddress, IPAddress>.Invalidate(PhysicalAddress address) {}
ValueTask<IPAddress?> IAddressResolver<PhysicalAddress, IPAddress>.ResolveAsync(PhysicalAddress address, CancellationToken cancellationToken) {}
protected void ThrowIfDisposed() {}
}
public sealed class MacAddressResolverOptions {
public static readonly MacAddressResolverOptions Default; // = "Smdn.Net.AddressResolution.MacAddressResolverOptions"
public MacAddressResolverOptions() {}
- public string? NmapTargetSpecification { get; init; }
+ public string? ArpScanCommandInterfaceSpecification { get; init; }
+ public string? ArpScanCommandTargetSpecification { get; init; }
+ public string? NmapCommandInterfaceSpecification { get; init; }
+ public string? NmapCommandTargetSpecification { get; init; }
public TimeSpan ProcfsArpFullScanInterval { get; init; }
}
}
// API list generated by Smdn.Reflection.ReverseGenerating.ListApi.MSBuild.Tasks v1.2.1.0.
// Smdn.Reflection.ReverseGenerating.ListApi.Core v1.2.0.0 (https://github.com/smdn/Smdn.Reflection.ReverseGenerating)
diff --git a/doc/api-list/Smdn.Net.AddressResolution/Smdn.Net.AddressResolution-net7.0.apilist.cs b/doc/api-list/Smdn.Net.AddressResolution/Smdn.Net.AddressResolution-net7.0.apilist.cs
new file mode 100644
index 0000000..d9d912b
--- /dev/null
+++ b/doc/api-list/Smdn.Net.AddressResolution/Smdn.Net.AddressResolution-net7.0.apilist.cs
@@ -0,0 +1,91 @@
+// Smdn.Net.AddressResolution.dll (Smdn.Net.AddressResolution-1.0.0-preview5)
+// Name: Smdn.Net.AddressResolution
+// AssemblyVersion: 1.0.0.0
+// InformationalVersion: 1.0.0-preview5+fe261fa7dd16c43347c28935b3055ec3b8ab0674
+// TargetFramework: .NETCoreApp,Version=v7.0
+// Configuration: Release
+// Referenced assemblies:
+// Microsoft.Extensions.DependencyInjection.Abstractions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60
+// Microsoft.Extensions.Logging.Abstractions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60
+// System.Collections.Concurrent, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+// System.ComponentModel, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+// System.Diagnosti...
Smdn.Net.AddressResolution version 1.0.0-preview4
Released package
Release notes
The full release notes are available at gist.
Change log
Change log in this release:
- 2023-03-15 update package version
- 2023-03-15 add APIs to mark unresolvable addresses as invalid and update them manually
- 2023-03-14 simplify log message format
API changes
API changes in this release:
diff --git a/doc/api-list/Smdn.Net.AddressResolution/Smdn.Net.AddressResolution-net6.0.apilist.cs b/doc/api-list/Smdn.Net.AddressResolution/Smdn.Net.AddressResolution-net6.0.apilist.cs
index 0fcaecd..8de9632 100644
--- a/doc/api-list/Smdn.Net.AddressResolution/Smdn.Net.AddressResolution-net6.0.apilist.cs
+++ b/doc/api-list/Smdn.Net.AddressResolution/Smdn.Net.AddressResolution-net6.0.apilist.cs
@@ -1,77 +1,88 @@
-// Smdn.Net.AddressResolution.dll (Smdn.Net.AddressResolution-1.0.0-preview3)
+// Smdn.Net.AddressResolution.dll (Smdn.Net.AddressResolution-1.0.0-preview4)
// Name: Smdn.Net.AddressResolution
// AssemblyVersion: 1.0.0.0
-// InformationalVersion: 1.0.0-preview3+b0d0efec19a7bb78ed612cabd93d8e805a1a32f8
+// InformationalVersion: 1.0.0-preview4+f17248a683dc95a5f8a1d3f3ec79fb49b8b2852f
// TargetFramework: .NETCoreApp,Version=v6.0
// Configuration: Release
// Referenced assemblies:
// Microsoft.Extensions.DependencyInjection.Abstractions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60
// Microsoft.Extensions.Logging.Abstractions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60
+// System.Collections.Concurrent, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.ComponentModel, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Diagnostics.Process, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Linq, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Memory, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
// System.Net.NetworkInformation, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Net.Primitives, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Runtime, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Runtime.InteropServices.RuntimeInformation, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
#nullable enable annotations
using System;
using System.Net;
using System.Net.NetworkInformation;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Extensions.Logging;
using Smdn.Net.AddressResolution;
namespace Smdn.Net {
public static class PhysicalAddressExtensions {
public static string ToMacAddressString(this PhysicalAddress hardwareAddress, char delimiter = ':') {}
}
}
namespace Smdn.Net.AddressResolution {
public interface IAddressResolver<TAddress, TResolvedAddress> {
+ void Invalidate(TResolvedAddress resolvedAddress);
ValueTask<TResolvedAddress> ResolveAsync(TAddress address, CancellationToken cancellationToken);
}
public abstract class MacAddressResolver :
IAddressResolver<IPAddress, PhysicalAddress>,
IAddressResolver<PhysicalAddress, IPAddress>,
IDisposable
{
protected static readonly PhysicalAddress AllZeroMacAddress; // = "000000000000"
public static MacAddressResolver Null { get; }
public static MacAddressResolver Create(MacAddressResolverOptions? options = null, IServiceProvider? serviceProvider = null) {}
protected MacAddressResolver(ILogger? logger = null) {}
+ public abstract bool HasInvalidated { get; }
protected ILogger? Logger { get; }
protected virtual void Dispose(bool disposing) {}
public void Dispose() {}
+ public void Invalidate(IPAddress resolvedIPAddress) {}
+ public void Invalidate(PhysicalAddress resolvedMacAddress) {}
+ protected abstract void InvalidateCore(IPAddress resolvedIPAddress);
+ protected abstract void InvalidateCore(PhysicalAddress resolvedMacAddress);
public ValueTask RefreshCacheAsync(CancellationToken cancellationToken = default) {}
protected virtual ValueTask RefreshCacheAsyncCore(CancellationToken cancellationToken) {}
+ public ValueTask RefreshInvalidatedCacheAsync(CancellationToken cancellationToken = default) {}
+ protected virtual ValueTask RefreshInvalidatedCacheAsyncCore(CancellationToken cancellationToken) {}
public ValueTask<PhysicalAddress?> ResolveIPAddressToMacAddressAsync(IPAddress ipAddress, CancellationToken cancellationToken = default) {}
protected abstract ValueTask<PhysicalAddress?> ResolveIPAddressToMacAddressAsyncCore(IPAddress ipAddress, CancellationToken cancellationToken);
public ValueTask<IPAddress?> ResolveMacAddressToIPAddressAsync(PhysicalAddress macAddress, CancellationToken cancellationToken = default) {}
protected abstract ValueTask<IPAddress?> ResolveMacAddressToIPAddressAsyncCore(PhysicalAddress macAddress, CancellationToken cancellationToken);
+ void IAddressResolver<IPAddress, PhysicalAddress>.Invalidate(PhysicalAddress resolvedAddress) {}
ValueTask<PhysicalAddress?> IAddressResolver<IPAddress, PhysicalAddress>.ResolveAsync(IPAddress address, CancellationToken cancellationToken) {}
+ void IAddressResolver<PhysicalAddress, IPAddress>.Invalidate(IPAddress resolvedAddress) {}
ValueTask<IPAddress?> IAddressResolver<PhysicalAddress, IPAddress>.ResolveAsync(PhysicalAddress address, CancellationToken cancellationToken) {}
protected void ThrowIfDisposed() {}
}
public sealed class MacAddressResolverOptions {
public static readonly MacAddressResolverOptions Default; // = "Smdn.Net.AddressResolution.MacAddressResolverOptions"
public MacAddressResolverOptions() {}
public string? NmapTargetSpecification { get; init; }
- public TimeSpan ProcfsArpScanInterval { get; init; }
+ public TimeSpan ProcfsArpFullScanInterval { get; init; }
}
}
// API list generated by Smdn.Reflection.ReverseGenerating.ListApi.MSBuild.Tasks v1.2.1.0.
// Smdn.Reflection.ReverseGenerating.ListApi.Core v1.2.0.0 (https://github.com/smdn/Smdn.Reflection.ReverseGenerating)
diff --git a/doc/api-list/Smdn.Net.AddressResolution/Smdn.Net.AddressResolution-netstandard2.0.apilist.cs b/doc/api-list/Smdn.Net.AddressResolution/Smdn.Net.AddressResolution-netstandard2.0.apilist.cs
index 44fe7a4..f9d6a20 100644
--- a/doc/api-list/Smdn.Net.AddressResolution/Smdn.Net.AddressResolution-netstandard2.0.apilist.cs
+++ b/doc/api-list/Smdn.Net.AddressResolution/Smdn.Net.AddressResolution-netstandard2.0.apilist.cs
@@ -1,72 +1,82 @@
-// Smdn.Net.AddressResolution.dll (Smdn.Net.AddressResolution-1.0.0-preview3)
+// Smdn.Net.AddressResolution.dll (Smdn.Net.AddressResolution-1.0.0-preview4)
// Name: Smdn.Net.AddressResolution
// AssemblyVersion: 1.0.0.0
-// InformationalVersion: 1.0.0-preview3+b0d0efec19a7bb78ed612cabd93d8e805a1a32f8
+// InformationalVersion: 1.0.0-preview4+f17248a683dc95a5f8a1d3f3ec79fb49b8b2852f
// TargetFramework: .NETStandard,Version=v2.0
// Configuration: Release
// Referenced assemblies:
// Microsoft.Bcl.AsyncInterfaces, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
// Microsoft.Extensions.DependencyInjection.Abstractions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60
// Microsoft.Extensions.Logging.Abstractions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60
// System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
// netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
#nullable enable annotations
using System;
using System.Net;
using System.Net.NetworkInformation;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Extensions.Logging;
using Smdn.Net.AddressResolution;
namespace Smdn.Net {
public static class PhysicalAddressExtensions {
public static string ToMacAddressString(this PhysicalAddress hardwareAddress, char delimiter = ':') {}
}
}
namespace Smdn.Net.AddressResolution {
public interface IAddressResolver<TAddress, TResolvedAddress> {
+ void Invalidate(TResolvedAddress resolvedAddress);
ValueTask<TResolvedAddress> ResolveAsync(TAddress address, CancellationToken cancellationToken);
}
public abstract class MacAddressResolver :
IAddressResolver<IPAddress, PhysicalAddress>,
IAddressResolver<PhysicalAddress, IPAddress>,
IDisposable
{
protected static readonly PhysicalAddress AllZeroMacAddress; // = "000000000000"
public static MacAddressResolver Null { get; }
public static MacAddressResolver Create(MacAddressResolverOptions? options = null, IServiceProvider? serviceProvider = null) {}
protected MacAddressResolver(ILogger? logger = null) {}
+ public abstract bool HasInvalidated { get; }
protected ILogger? Logger { get; }
protected virtual void Dispose(bool disposing) {}
public void Dispose() {}
+ public void Invalidate(IPAddress resolvedIPAddress) {}
+ public void Invalidate(PhysicalAddress resolvedMacAddress) {}
+ protected abstract void InvalidateCore(IPAddress resolvedIPAddress);
+ protected abstract void InvalidateCore(PhysicalAddress resolvedMacAddress);
public ValueTask Ref...
Smdn.Net.AddressResolution version 1.0.0-preview3
Released package
Release notes
The full release notes are available at gist.
Change log
Change log in this release:
- 2023-03-11 update assembly version
- 2023-03-11 simplify logging
- 2023-03-11 redirect the stdout and stderr regardless of whether the log should be output or not
API changes
API changes in this release:
diff --git a/doc/api-list/Smdn.Net.AddressResolution/Smdn.Net.AddressResolution-net6.0.apilist.cs b/doc/api-list/Smdn.Net.AddressResolution/Smdn.Net.AddressResolution-net6.0.apilist.cs
index 9e5728f..0fcaecd 100644
--- a/doc/api-list/Smdn.Net.AddressResolution/Smdn.Net.AddressResolution-net6.0.apilist.cs
+++ b/doc/api-list/Smdn.Net.AddressResolution/Smdn.Net.AddressResolution-net6.0.apilist.cs
@@ -1,77 +1,77 @@
-// Smdn.Net.AddressResolution.dll (Smdn.Net.AddressResolution-1.0.0-preview2)
+// Smdn.Net.AddressResolution.dll (Smdn.Net.AddressResolution-1.0.0-preview3)
// Name: Smdn.Net.AddressResolution
// AssemblyVersion: 1.0.0.0
-// InformationalVersion: 1.0.0-preview2+5edee5ba8620fb382ebb22676635228ad7c81bd2
+// InformationalVersion: 1.0.0-preview3+b0d0efec19a7bb78ed612cabd93d8e805a1a32f8
// TargetFramework: .NETCoreApp,Version=v6.0
// Configuration: Release
// Referenced assemblies:
// Microsoft.Extensions.DependencyInjection.Abstractions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60
// Microsoft.Extensions.Logging.Abstractions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60
// System.ComponentModel, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Diagnostics.Process, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Linq, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Memory, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
// System.Net.NetworkInformation, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Net.Primitives, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Runtime, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Runtime.InteropServices.RuntimeInformation, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
#nullable enable annotations
using System;
using System.Net;
using System.Net.NetworkInformation;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Extensions.Logging;
using Smdn.Net.AddressResolution;
namespace Smdn.Net {
public static class PhysicalAddressExtensions {
public static string ToMacAddressString(this PhysicalAddress hardwareAddress, char delimiter = ':') {}
}
}
namespace Smdn.Net.AddressResolution {
public interface IAddressResolver<TAddress, TResolvedAddress> {
ValueTask<TResolvedAddress> ResolveAsync(TAddress address, CancellationToken cancellationToken);
}
public abstract class MacAddressResolver :
IAddressResolver<IPAddress, PhysicalAddress>,
IAddressResolver<PhysicalAddress, IPAddress>,
IDisposable
{
protected static readonly PhysicalAddress AllZeroMacAddress; // = "000000000000"
public static MacAddressResolver Null { get; }
public static MacAddressResolver Create(MacAddressResolverOptions? options = null, IServiceProvider? serviceProvider = null) {}
protected MacAddressResolver(ILogger? logger = null) {}
protected ILogger? Logger { get; }
protected virtual void Dispose(bool disposing) {}
public void Dispose() {}
public ValueTask RefreshCacheAsync(CancellationToken cancellationToken = default) {}
protected virtual ValueTask RefreshCacheAsyncCore(CancellationToken cancellationToken) {}
public ValueTask<PhysicalAddress?> ResolveIPAddressToMacAddressAsync(IPAddress ipAddress, CancellationToken cancellationToken = default) {}
protected abstract ValueTask<PhysicalAddress?> ResolveIPAddressToMacAddressAsyncCore(IPAddress ipAddress, CancellationToken cancellationToken);
public ValueTask<IPAddress?> ResolveMacAddressToIPAddressAsync(PhysicalAddress macAddress, CancellationToken cancellationToken = default) {}
protected abstract ValueTask<IPAddress?> ResolveMacAddressToIPAddressAsyncCore(PhysicalAddress macAddress, CancellationToken cancellationToken);
ValueTask<PhysicalAddress?> IAddressResolver<IPAddress, PhysicalAddress>.ResolveAsync(IPAddress address, CancellationToken cancellationToken) {}
ValueTask<IPAddress?> IAddressResolver<PhysicalAddress, IPAddress>.ResolveAsync(PhysicalAddress address, CancellationToken cancellationToken) {}
protected void ThrowIfDisposed() {}
}
public sealed class MacAddressResolverOptions {
public static readonly MacAddressResolverOptions Default; // = "Smdn.Net.AddressResolution.MacAddressResolverOptions"
public MacAddressResolverOptions() {}
public string? NmapTargetSpecification { get; init; }
public TimeSpan ProcfsArpScanInterval { get; init; }
}
}
// API list generated by Smdn.Reflection.ReverseGenerating.ListApi.MSBuild.Tasks v1.2.1.0.
// Smdn.Reflection.ReverseGenerating.ListApi.Core v1.2.0.0 (https://github.com/smdn/Smdn.Reflection.ReverseGenerating)
diff --git a/doc/api-list/Smdn.Net.AddressResolution/Smdn.Net.AddressResolution-netstandard2.0.apilist.cs b/doc/api-list/Smdn.Net.AddressResolution/Smdn.Net.AddressResolution-netstandard2.0.apilist.cs
index dc886f6..44fe7a4 100644
--- a/doc/api-list/Smdn.Net.AddressResolution/Smdn.Net.AddressResolution-netstandard2.0.apilist.cs
+++ b/doc/api-list/Smdn.Net.AddressResolution/Smdn.Net.AddressResolution-netstandard2.0.apilist.cs
@@ -1,72 +1,72 @@
-// Smdn.Net.AddressResolution.dll (Smdn.Net.AddressResolution-1.0.0-preview2)
+// Smdn.Net.AddressResolution.dll (Smdn.Net.AddressResolution-1.0.0-preview3)
// Name: Smdn.Net.AddressResolution
// AssemblyVersion: 1.0.0.0
-// InformationalVersion: 1.0.0-preview2+5edee5ba8620fb382ebb22676635228ad7c81bd2
+// InformationalVersion: 1.0.0-preview3+b0d0efec19a7bb78ed612cabd93d8e805a1a32f8
// TargetFramework: .NETStandard,Version=v2.0
// Configuration: Release
// Referenced assemblies:
// Microsoft.Bcl.AsyncInterfaces, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
// Microsoft.Extensions.DependencyInjection.Abstractions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60
// Microsoft.Extensions.Logging.Abstractions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60
// System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
// netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
#nullable enable annotations
using System;
using System.Net;
using System.Net.NetworkInformation;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Extensions.Logging;
using Smdn.Net.AddressResolution;
namespace Smdn.Net {
public static class PhysicalAddressExtensions {
public static string ToMacAddressString(this PhysicalAddress hardwareAddress, char delimiter = ':') {}
}
}
namespace Smdn.Net.AddressResolution {
public interface IAddressResolver<TAddress, TResolvedAddress> {
ValueTask<TResolvedAddress> ResolveAsync(TAddress address, CancellationToken cancellationToken);
}
public abstract class MacAddressResolver :
IAddressResolver<IPAddress, PhysicalAddress>,
IAddressResolver<PhysicalAddress, IPAddress>,
IDisposable
{
protected static readonly PhysicalAddress AllZeroMacAddress; // = "000000000000"
public static MacAddressResolver Null { get; }
public static MacAddressResolver Create(MacAddressResolverOptions? options = null, IServiceProvider? serviceProvider = null) {}
protected MacAddressResolver(ILogger? logger = null) {}
protected ILogger? Logger { get; }
protected virtual void Dispose(bool disposing) {}
public void Dispose() {}
public ValueTask RefreshCacheAsync(CancellationToken cancellationToken = default) {}
protected virtual ValueTask RefreshCacheAsyncCore(CancellationToken cancellationToken) {}
public ValueTask<PhysicalAddress?> ResolveIPAddressToMacAddressAsync(IPAddress ipAddress, CancellationToken cancellationToken = default) {}
protected abstract ValueTask<PhysicalAddress?> ResolveIPAddressToMacAddressAsyncCore(IPAddress ipAddress, CancellationToken cancellationToken);
public ValueTask<IPAddress?> ResolveMacAddressToIPAddressAsync(PhysicalAddress macAddress, CancellationToken cancellationToken = default) {}
protected abstract ValueTask<IPAddress?> ResolveMacAddressToIPAddressAsyncCore(PhysicalAddress macAddress, CancellationToken cancellationToken);
ValueTask<PhysicalAddress?> IAddressResolver<IPAddress, PhysicalAddress>.ResolveAsync(IPAddress address, CancellationToken cancellationToken) {}
ValueTask<IPAddress?> IAddressResolver<PhysicalAddress, IPAddress>.ResolveAsync(PhysicalAddress address, CancellationToken cancellationToken) {}
protected void ThrowIfDisposed() {}
}
public sealed class MacAddressResolverOptions {
public static readonly MacAddressResolverOptions Default; // = "Smdn.Net.AddressResolution.MacAddressResolverOptions"
public MacAddressResolverOptions() {}
public string? NmapTarget...