main/Smdn.Net.AddressResolution-1.0.2
Created
May 15, 2023 15:38
-
-
Save smdn/7413193ce0b7242e974102ba81f65bcb to your computer and use it in GitHub Desktop.
Smdn.Net.AddressResolution 1.0.2 Release Notes
- 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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 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, IPAddress>.ResolveAsync(PhysicalAddress address, CancellationToken cancellationToken) {} | |
protected void ThrowIfDisposed() {} | |
} | |
} | |
namespace Smdn.Net.AddressTables { | |
public interface IAddressTable : IDisposable { | |
IAsyncEnumerable<AddressTableEntry> EnumerateEntriesAsync(CancellationToken cancellationToken); | |
} | |
public enum AddressTableEntryState : int { | |
Delay = 4, | |
Incomplete = 1, | |
None = 0, | |
Probe = 5, | |
Reachable = 2, | |
Stale = 3, | |
} | |
public abstract class AddressTable : IAddressTable { | |
public static IAddressTable Null { get; } | |
public static IAddressTable Create(IServiceProvider? serviceProvider = null) {} | |
protected AddressTable(ILogger? logger = null) {} | |
protected ILogger? Logger { get; } | |
protected virtual void Dispose(bool disposing) {} | |
public void Dispose() {} | |
public IAsyncEnumerable<AddressTableEntry> EnumerateEntriesAsync(CancellationToken cancellationToken = default) {} | |
protected abstract IAsyncEnumerable<AddressTableEntry> EnumerateEntriesAsyncCore(CancellationToken cancellationToken); | |
protected void ThrowIfDisposed() {} | |
} | |
public sealed class IpHlpApiAddressTable : AddressTable { | |
public static bool IsSupported { get; } | |
public IpHlpApiAddressTable(IServiceProvider? serviceProvider = null) {} | |
[AsyncIteratorStateMachine(typeof(IpHlpApiAddressTable.<EnumerateEntriesAsyncCore>d__4))] | |
protected override IAsyncEnumerable<AddressTableEntry> EnumerateEntriesAsyncCore([EnumeratorCancellation] CancellationToken cancellationToken) {} | |
} | |
public sealed class ProcfsArpAddressTable : AddressTable { | |
public static bool IsSupported { get; } | |
public ProcfsArpAddressTable(IServiceProvider? serviceProvider = null) {} | |
[AsyncIteratorStateMachine(typeof(ProcfsArpAddressTable.<EnumerateEntriesAsyncCore>d__5))] | |
protected override IAsyncEnumerable<AddressTableEntry> EnumerateEntriesAsyncCore([EnumeratorCancellation] CancellationToken cancellationToken) {} | |
} | |
public readonly struct AddressTableEntry : | |
IEquatable<AddressTableEntry>, | |
IEquatable<IPAddress>, | |
IEquatable<PhysicalAddress> | |
{ | |
public static readonly AddressTableEntry Empty; // = "{IP=, MAC=(null), IsPermanent=False, State=None, Iface=}" | |
public static IEqualityComparer<AddressTableEntry> DefaultEqualityComparer { get; } | |
public static IEqualityComparer<AddressTableEntry> ExceptStateEqualityComparer { get; } | |
public AddressTableEntry(IPAddress ipAddress, PhysicalAddress? physicalAddress, bool isPermanent, AddressTableEntryState state, string? interfaceId) {} | |
public IPAddress? IPAddress { get; } | |
public string? InterfaceId { get; } | |
[MemberNotNullWhen(false, "IPAddress")] | |
public bool IsEmpty { [MemberNotNullWhen(false, "IPAddress")] get; } | |
public bool IsPermanent { get; } | |
public PhysicalAddress? PhysicalAddress { get; } | |
public AddressTableEntryState State { get; } | |
public bool Equals(AddressTableEntry other) {} | |
public bool Equals(IPAddress? other) {} | |
public bool Equals(PhysicalAddress? other) {} | |
public override bool Equals(object? obj) {} | |
public override int GetHashCode() {} | |
public override string ToString() {} | |
} | |
} | |
namespace Smdn.Net.NetworkScanning { | |
public interface INetworkScanner : IDisposable { | |
ValueTask ScanAsync(CancellationToken cancellationToken); | |
ValueTask ScanAsync(IEnumerable<IPAddress> addresses, CancellationToken cancellationToken); | |
} | |
public sealed class ArpScanCommandNetworkScanner : CommandNetworkScanner { | |
public static bool IsSupported { get; } | |
public ArpScanCommandNetworkScanner(IPNetworkProfile? networkProfile, IServiceProvider? serviceProvider = null) {} | |
protected override bool GetCommandLineArguments(IEnumerable<IPAddress> addressesToScan, out string executable, out string arguments) {} | |
protected override bool GetCommandLineArguments(out string executable, out string arguments) {} | |
} | |
public abstract class CommandNetworkScanner : INetworkScanner { | |
public interface IProcessFactory { | |
Process CreateProcess(ProcessStartInfo processStartInfo); | |
} | |
protected readonly struct Command { | |
public Command(string name, string? executablePath) {} | |
public bool IsAvailable { get; } | |
public string Name { get; } | |
public string GetExecutablePathOrThrow() {} | |
} | |
protected static IReadOnlyCollection<string> DefaultCommandPaths { get; } | |
protected static CommandNetworkScanner.Command FindCommand(string command, IEnumerable<string> paths) {} | |
protected CommandNetworkScanner(ILogger? logger, IServiceProvider? serviceProvider) {} | |
protected virtual void Dispose(bool disposing) {} | |
public void Dispose() {} | |
protected abstract bool GetCommandLineArguments(IEnumerable<IPAddress> addressesToScan, out string executable, out string? arguments); | |
protected abstract bool GetCommandLineArguments(out string executable, out string? arguments); | |
public virtual ValueTask ScanAsync(CancellationToken cancellationToken = default) {} | |
public virtual ValueTask ScanAsync(IEnumerable<IPAddress> addresses, CancellationToken cancellationToken = default) {} | |
protected void ThrowIfDisposed() {} | |
} | |
public sealed class IpHlpApiNetworkScanner : NetworkScanner { | |
public static bool IsSupported { get; } | |
public IpHlpApiNetworkScanner(IPNetworkProfile networkProfile, IServiceProvider? serviceProvider = null) {} | |
protected override async ValueTask ScanAsyncCore(IPAddress address, CancellationToken cancellationToken = default) {} | |
} | |
public abstract class NetworkScanner : INetworkScanner { | |
public static INetworkScanner Null { get; } | |
public static INetworkScanner Create(IPNetworkProfile? networkProfile, IServiceProvider? serviceProvider = null) {} | |
protected NetworkScanner(IPNetworkProfile networkProfile, ILogger? logger = null) {} | |
protected ILogger? Logger { get; } | |
protected IPNetworkProfile NetworkProfile { get; } | |
protected virtual void Dispose(bool disposing) {} | |
public void Dispose() {} | |
public virtual ValueTask ScanAsync(CancellationToken cancellationToken = default) {} | |
public virtual ValueTask ScanAsync(IEnumerable<IPAddress> addresses, CancellationToken cancellationToken = default) {} | |
protected virtual ValueTask ScanAsyncCore(IPAddress address, CancellationToken cancellationToken) {} | |
protected void ThrowIfDisposed() {} | |
} | |
public sealed class NmapCommandNetworkScanner : CommandNetworkScanner { | |
public static bool IsSupported { get; } | |
public NmapCommandNetworkScanner(IPNetworkProfile networkProfile, IServiceProvider? serviceProvider = null) {} | |
protected override bool GetCommandLineArguments(IEnumerable<IPAddress> addressesToScan, out string executable, out string arguments) {} | |
protected override bool GetCommandLineArguments(out string executable, out string arguments) {} | |
} | |
public sealed class PingNetworkScanner : NetworkScanner { | |
public static bool IsSupported { get; } | |
public PingNetworkScanner(IPNetworkProfile networkProfile, IServiceProvider? serviceProvider = null) {} | |
protected override void Dispose(bool disposing) {} | |
protected override async ValueTask ScanAsyncCore(IPAddress address, CancellationToken cancellationToken = default) {} | |
} | |
} | |
-// API list generated by Smdn.Reflection.ReverseGenerating.ListApi.MSBuild.Tasks v1.2.1.0. | |
+// API list generated by Smdn.Reflection.ReverseGenerating.ListApi.MSBuild.Tasks v1.2.2.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 | |
index a813ee7..ae2eaaf 100644 | |
--- 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 | |
@@ -1,298 +1,298 @@ | |
-// 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=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, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a | |
// System.Collections.Concurrent, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a | |
// System.ComponentModel, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a | |
// System.ComponentModel.Primitives, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a | |
// System.Diagnostics.Process, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a | |
// System.Linq, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a | |
// System.Memory, Version=7.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 | |
// System.Net.NetworkInformation, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a | |
// System.Net.Ping, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a | |
// System.Net.Primitives, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a | |
// System.Runtime, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a | |
// System.Runtime.InteropServices, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a | |
// System.Threading, Version=7.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 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, IPAddress>.ResolveAsync(PhysicalAddress address, CancellationToken cancellationToken) {} | |
protected void ThrowIfDisposed() {} | |
} | |
} | |
namespace Smdn.Net.AddressTables { | |
public interface IAddressTable : IDisposable { | |
IAsyncEnumerable<AddressTableEntry> EnumerateEntriesAsync(CancellationToken cancellationToken); | |
} | |
public enum AddressTableEntryState : int { | |
Delay = 4, | |
Incomplete = 1, | |
None = 0, | |
Probe = 5, | |
Reachable = 2, | |
Stale = 3, | |
} | |
public abstract class AddressTable : IAddressTable { | |
public static IAddressTable Null { get; } | |
public static IAddressTable Create(IServiceProvider? serviceProvider = null) {} | |
protected AddressTable(ILogger? logger = null) {} | |
protected ILogger? Logger { get; } | |
protected virtual void Dispose(bool disposing) {} | |
public void Dispose() {} | |
public IAsyncEnumerable<AddressTableEntry> EnumerateEntriesAsync(CancellationToken cancellationToken = default) {} | |
protected abstract IAsyncEnumerable<AddressTableEntry> EnumerateEntriesAsyncCore(CancellationToken cancellationToken); | |
protected void ThrowIfDisposed() {} | |
} | |
public sealed class IpHlpApiAddressTable : AddressTable { | |
public static bool IsSupported { get; } | |
public IpHlpApiAddressTable(IServiceProvider? serviceProvider = null) {} | |
[AsyncIteratorStateMachine(typeof(IpHlpApiAddressTable.<EnumerateEntriesAsyncCore>d__4))] | |
protected override IAsyncEnumerable<AddressTableEntry> EnumerateEntriesAsyncCore([EnumeratorCancellation] CancellationToken cancellationToken) {} | |
} | |
public sealed class ProcfsArpAddressTable : AddressTable { | |
public static bool IsSupported { get; } | |
public ProcfsArpAddressTable(IServiceProvider? serviceProvider = null) {} | |
[AsyncIteratorStateMachine(typeof(ProcfsArpAddressTable.<EnumerateEntriesAsyncCore>d__5))] | |
protected override IAsyncEnumerable<AddressTableEntry> EnumerateEntriesAsyncCore([EnumeratorCancellation] CancellationToken cancellationToken) {} | |
} | |
public readonly struct AddressTableEntry : | |
IEquatable<AddressTableEntry>, | |
IEquatable<IPAddress>, | |
IEquatable<PhysicalAddress> | |
{ | |
public static readonly AddressTableEntry Empty; // = "{IP=, MAC=(null), IsPermanent=False, State=None, Iface=}" | |
public static IEqualityComparer<AddressTableEntry> DefaultEqualityComparer { get; } | |
public static IEqualityComparer<AddressTableEntry> ExceptStateEqualityComparer { get; } | |
public AddressTableEntry(IPAddress ipAddress, PhysicalAddress? physicalAddress, bool isPermanent, AddressTableEntryState state, string? interfaceId) {} | |
public IPAddress? IPAddress { get; } | |
public string? InterfaceId { get; } | |
[MemberNotNullWhen(false, "IPAddress")] | |
public bool IsEmpty { [MemberNotNullWhen(false, "IPAddress")] get; } | |
public bool IsPermanent { get; } | |
public PhysicalAddress? PhysicalAddress { get; } | |
public AddressTableEntryState State { get; } | |
public bool Equals(AddressTableEntry other) {} | |
public bool Equals(IPAddress? other) {} | |
public bool Equals(PhysicalAddress? other) {} | |
public override bool Equals(object? obj) {} | |
public override int GetHashCode() {} | |
public override string ToString() {} | |
} | |
} | |
namespace Smdn.Net.NetworkScanning { | |
public interface INetworkScanner : IDisposable { | |
ValueTask ScanAsync(CancellationToken cancellationToken); | |
ValueTask ScanAsync(IEnumerable<IPAddress> addresses, CancellationToken cancellationToken); | |
} | |
public sealed class ArpScanCommandNetworkScanner : CommandNetworkScanner { | |
public static bool IsSupported { get; } | |
public ArpScanCommandNetworkScanner(IPNetworkProfile? networkProfile, IServiceProvider? serviceProvider = null) {} | |
protected override bool GetCommandLineArguments(IEnumerable<IPAddress> addressesToScan, out string executable, out string arguments) {} | |
protected override bool GetCommandLineArguments(out string executable, out string arguments) {} | |
} | |
public abstract class CommandNetworkScanner : INetworkScanner { | |
public interface IProcessFactory { | |
Process CreateProcess(ProcessStartInfo processStartInfo); | |
} | |
protected readonly struct Command { | |
public Command(string name, string? executablePath) {} | |
public bool IsAvailable { get; } | |
public string Name { get; } | |
public string GetExecutablePathOrThrow() {} | |
} | |
protected static IReadOnlyCollection<string> DefaultCommandPaths { get; } | |
protected static CommandNetworkScanner.Command FindCommand(string command, IEnumerable<string> paths) {} | |
protected CommandNetworkScanner(ILogger? logger, IServiceProvider? serviceProvider) {} | |
protected virtual void Dispose(bool disposing) {} | |
public void Dispose() {} | |
protected abstract bool GetCommandLineArguments(IEnumerable<IPAddress> addressesToScan, out string executable, out string? arguments); | |
protected abstract bool GetCommandLineArguments(out string executable, out string? arguments); | |
public virtual ValueTask ScanAsync(CancellationToken cancellationToken = default) {} | |
public virtual ValueTask ScanAsync(IEnumerable<IPAddress> addresses, CancellationToken cancellationToken = default) {} | |
protected void ThrowIfDisposed() {} | |
} | |
public sealed class IpHlpApiNetworkScanner : NetworkScanner { | |
public static bool IsSupported { get; } | |
public IpHlpApiNetworkScanner(IPNetworkProfile networkProfile, IServiceProvider? serviceProvider = null) {} | |
protected override async ValueTask ScanAsyncCore(IPAddress address, CancellationToken cancellationToken = default) {} | |
} | |
public abstract class NetworkScanner : INetworkScanner { | |
public static INetworkScanner Null { get; } | |
public static INetworkScanner Create(IPNetworkProfile? networkProfile, IServiceProvider? serviceProvider = null) {} | |
protected NetworkScanner(IPNetworkProfile networkProfile, ILogger? logger = null) {} | |
protected ILogger? Logger { get; } | |
protected IPNetworkProfile NetworkProfile { get; } | |
protected virtual void Dispose(bool disposing) {} | |
public void Dispose() {} | |
public virtual ValueTask ScanAsync(CancellationToken cancellationToken = default) {} | |
public virtual ValueTask ScanAsync(IEnumerable<IPAddress> addresses, CancellationToken cancellationToken = default) {} | |
protected virtual ValueTask ScanAsyncCore(IPAddress address, CancellationToken cancellationToken) {} | |
protected void ThrowIfDisposed() {} | |
} | |
public sealed class NmapCommandNetworkScanner : CommandNetworkScanner { | |
public static bool IsSupported { get; } | |
public NmapCommandNetworkScanner(IPNetworkProfile networkProfile, IServiceProvider? serviceProvider = null) {} | |
protected override bool GetCommandLineArguments(IEnumerable<IPAddress> addressesToScan, out string executable, out string arguments) {} | |
protected override bool GetCommandLineArguments(out string executable, out string arguments) {} | |
} | |
public sealed class PingNetworkScanner : NetworkScanner { | |
public static bool IsSupported { get; } | |
public PingNetworkScanner(IPNetworkProfile networkProfile, IServiceProvider? serviceProvider = null) {} | |
protected override void Dispose(bool disposing) {} | |
protected override async ValueTask ScanAsyncCore(IPAddress address, CancellationToken cancellationToken = default) {} | |
} | |
} | |
-// API list generated by Smdn.Reflection.ReverseGenerating.ListApi.MSBuild.Tasks v1.2.1.0. | |
+// API list generated by Smdn.Reflection.ReverseGenerating.ListApi.MSBuild.Tasks v1.2.2.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 9a44d04..1eb767c 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,288 +1,288 @@ | |
-// 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: .NETStandard,Version=v2.0 | |
// Configuration: Release | |
// Referenced assemblies: | |
// Microsoft.Bcl.AsyncInterfaces, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 | |
// Microsoft.Bcl.HashCode, Version=1.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.Memory, Version=4.0.1.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 | |
// System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 | |
// 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 | |
// netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 | |
#nullable enable annotations | |
using System; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
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 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, IPAddress>.ResolveAsync(PhysicalAddress address, CancellationToken cancellationToken) {} | |
protected void ThrowIfDisposed() {} | |
} | |
} | |
namespace Smdn.Net.AddressTables { | |
public interface IAddressTable : IDisposable { | |
IAsyncEnumerable<AddressTableEntry> EnumerateEntriesAsync(CancellationToken cancellationToken); | |
} | |
public enum AddressTableEntryState : int { | |
Delay = 4, | |
Incomplete = 1, | |
None = 0, | |
Probe = 5, | |
Reachable = 2, | |
Stale = 3, | |
} | |
public abstract class AddressTable : IAddressTable { | |
public static IAddressTable Null { get; } | |
public static IAddressTable Create(IServiceProvider? serviceProvider = null) {} | |
protected AddressTable(ILogger? logger = null) {} | |
protected ILogger? Logger { get; } | |
protected virtual void Dispose(bool disposing) {} | |
public void Dispose() {} | |
public IAsyncEnumerable<AddressTableEntry> EnumerateEntriesAsync(CancellationToken cancellationToken = default) {} | |
protected abstract IAsyncEnumerable<AddressTableEntry> EnumerateEntriesAsyncCore(CancellationToken cancellationToken); | |
protected void ThrowIfDisposed() {} | |
} | |
public sealed class IpHlpApiAddressTable : AddressTable { | |
public static bool IsSupported { get; } | |
public IpHlpApiAddressTable(IServiceProvider? serviceProvider = null) {} | |
[AsyncIteratorStateMachine(typeof(IpHlpApiAddressTable.<EnumerateEntriesAsyncCore>d__4))] | |
protected override IAsyncEnumerable<AddressTableEntry> EnumerateEntriesAsyncCore([EnumeratorCancellation] CancellationToken cancellationToken) {} | |
} | |
public sealed class ProcfsArpAddressTable : AddressTable { | |
public static bool IsSupported { get; } | |
public ProcfsArpAddressTable(IServiceProvider? serviceProvider = null) {} | |
[AsyncIteratorStateMachine(typeof(ProcfsArpAddressTable.<EnumerateEntriesAsyncCore>d__5))] | |
protected override IAsyncEnumerable<AddressTableEntry> EnumerateEntriesAsyncCore([EnumeratorCancellation] CancellationToken cancellationToken) {} | |
} | |
public readonly struct AddressTableEntry : | |
IEquatable<AddressTableEntry>, | |
IEquatable<IPAddress>, | |
IEquatable<PhysicalAddress> | |
{ | |
public static readonly AddressTableEntry Empty; // = "{IP=, MAC=(null), IsPermanent=False, State=None, Iface=}" | |
public static IEqualityComparer<AddressTableEntry> DefaultEqualityComparer { get; } | |
public static IEqualityComparer<AddressTableEntry> ExceptStateEqualityComparer { get; } | |
public AddressTableEntry(IPAddress ipAddress, PhysicalAddress? physicalAddress, bool isPermanent, AddressTableEntryState state, string? interfaceId) {} | |
public IPAddress? IPAddress { get; } | |
public string? InterfaceId { get; } | |
public bool IsEmpty { get; } | |
public bool IsPermanent { get; } | |
public PhysicalAddress? PhysicalAddress { get; } | |
public AddressTableEntryState State { get; } | |
public bool Equals(AddressTableEntry other) {} | |
public bool Equals(IPAddress? other) {} | |
public bool Equals(PhysicalAddress? other) {} | |
public override bool Equals(object? obj) {} | |
public override int GetHashCode() {} | |
public override string ToString() {} | |
} | |
} | |
namespace Smdn.Net.NetworkScanning { | |
public interface INetworkScanner : IDisposable { | |
ValueTask ScanAsync(CancellationToken cancellationToken); | |
ValueTask ScanAsync(IEnumerable<IPAddress> addresses, CancellationToken cancellationToken); | |
} | |
public sealed class ArpScanCommandNetworkScanner : CommandNetworkScanner { | |
public static bool IsSupported { get; } | |
public ArpScanCommandNetworkScanner(IPNetworkProfile? networkProfile, IServiceProvider? serviceProvider = null) {} | |
protected override bool GetCommandLineArguments(IEnumerable<IPAddress> addressesToScan, out string executable, out string arguments) {} | |
protected override bool GetCommandLineArguments(out string executable, out string arguments) {} | |
} | |
public abstract class CommandNetworkScanner : INetworkScanner { | |
public interface IProcessFactory { | |
Process CreateProcess(ProcessStartInfo processStartInfo); | |
} | |
protected readonly struct Command { | |
public Command(string name, string? executablePath) {} | |
public bool IsAvailable { get; } | |
public string Name { get; } | |
public string GetExecutablePathOrThrow() {} | |
} | |
protected static IReadOnlyCollection<string> DefaultCommandPaths { get; } | |
protected static CommandNetworkScanner.Command FindCommand(string command, IEnumerable<string> paths) {} | |
protected CommandNetworkScanner(ILogger? logger, IServiceProvider? serviceProvider) {} | |
protected virtual void Dispose(bool disposing) {} | |
public void Dispose() {} | |
protected abstract bool GetCommandLineArguments(IEnumerable<IPAddress> addressesToScan, out string executable, out string? arguments); | |
protected abstract bool GetCommandLineArguments(out string executable, out string? arguments); | |
public virtual ValueTask ScanAsync(CancellationToken cancellationToken = default) {} | |
public virtual ValueTask ScanAsync(IEnumerable<IPAddress> addresses, CancellationToken cancellationToken = default) {} | |
protected void ThrowIfDisposed() {} | |
} | |
public sealed class IpHlpApiNetworkScanner : NetworkScanner { | |
public static bool IsSupported { get; } | |
public IpHlpApiNetworkScanner(IPNetworkProfile networkProfile, IServiceProvider? serviceProvider = null) {} | |
protected override async ValueTask ScanAsyncCore(IPAddress address, CancellationToken cancellationToken = default) {} | |
} | |
public abstract class NetworkScanner : INetworkScanner { | |
public static INetworkScanner Null { get; } | |
public static INetworkScanner Create(IPNetworkProfile? networkProfile, IServiceProvider? serviceProvider = null) {} | |
protected NetworkScanner(IPNetworkProfile networkProfile, ILogger? logger = null) {} | |
protected ILogger? Logger { get; } | |
protected IPNetworkProfile NetworkProfile { get; } | |
protected virtual void Dispose(bool disposing) {} | |
public void Dispose() {} | |
public virtual ValueTask ScanAsync(CancellationToken cancellationToken = default) {} | |
public virtual ValueTask ScanAsync(IEnumerable<IPAddress> addresses, CancellationToken cancellationToken = default) {} | |
protected virtual ValueTask ScanAsyncCore(IPAddress address, CancellationToken cancellationToken) {} | |
protected void ThrowIfDisposed() {} | |
} | |
public sealed class NmapCommandNetworkScanner : CommandNetworkScanner { | |
public static bool IsSupported { get; } | |
public NmapCommandNetworkScanner(IPNetworkProfile networkProfile, IServiceProvider? serviceProvider = null) {} | |
protected override bool GetCommandLineArguments(IEnumerable<IPAddress> addressesToScan, out string executable, out string arguments) {} | |
protected override bool GetCommandLineArguments(out string executable, out string arguments) {} | |
} | |
public sealed class PingNetworkScanner : NetworkScanner { | |
public static bool IsSupported { get; } | |
public PingNetworkScanner(IPNetworkProfile networkProfile, IServiceProvider? serviceProvider = null) {} | |
protected override void Dispose(bool disposing) {} | |
protected override async ValueTask ScanAsyncCore(IPAddress address, CancellationToken cancellationToken = default) {} | |
} | |
} | |
-// API list generated by Smdn.Reflection.ReverseGenerating.ListApi.MSBuild.Tasks v1.2.1.0. | |
+// API list generated by Smdn.Reflection.ReverseGenerating.ListApi.MSBuild.Tasks v1.2.2.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.1.apilist.cs b/doc/api-list/Smdn.Net.AddressResolution/Smdn.Net.AddressResolution-netstandard2.1.apilist.cs | |
index ce88513..7e12c8f 100644 | |
--- a/doc/api-list/Smdn.Net.AddressResolution/Smdn.Net.AddressResolution-netstandard2.1.apilist.cs | |
+++ b/doc/api-list/Smdn.Net.AddressResolution/Smdn.Net.AddressResolution-netstandard2.1.apilist.cs | |
@@ -1,284 +1,284 @@ | |
-// 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: .NETStandard,Version=v2.1 | |
// 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 | |
// 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 | |
// netstandard, Version=2.1.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 | |
#nullable enable annotations | |
using System; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
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 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, IPAddress>.ResolveAsync(PhysicalAddress address, CancellationToken cancellationToken) {} | |
protected void ThrowIfDisposed() {} | |
} | |
} | |
namespace Smdn.Net.AddressTables { | |
public interface IAddressTable : IDisposable { | |
IAsyncEnumerable<AddressTableEntry> EnumerateEntriesAsync(CancellationToken cancellationToken); | |
} | |
public enum AddressTableEntryState : int { | |
Delay = 4, | |
Incomplete = 1, | |
None = 0, | |
Probe = 5, | |
Reachable = 2, | |
Stale = 3, | |
} | |
public abstract class AddressTable : IAddressTable { | |
public static IAddressTable Null { get; } | |
public static IAddressTable Create(IServiceProvider? serviceProvider = null) {} | |
protected AddressTable(ILogger? logger = null) {} | |
protected ILogger? Logger { get; } | |
protected virtual void Dispose(bool disposing) {} | |
public void Dispose() {} | |
public IAsyncEnumerable<AddressTableEntry> EnumerateEntriesAsync(CancellationToken cancellationToken = default) {} | |
protected abstract IAsyncEnumerable<AddressTableEntry> EnumerateEntriesAsyncCore(CancellationToken cancellationToken); | |
protected void ThrowIfDisposed() {} | |
} | |
public sealed class IpHlpApiAddressTable : AddressTable { | |
public static bool IsSupported { get; } | |
public IpHlpApiAddressTable(IServiceProvider? serviceProvider = null) {} | |
[AsyncIteratorStateMachine(typeof(IpHlpApiAddressTable.<EnumerateEntriesAsyncCore>d__4))] | |
protected override IAsyncEnumerable<AddressTableEntry> EnumerateEntriesAsyncCore([EnumeratorCancellation] CancellationToken cancellationToken) {} | |
} | |
public sealed class ProcfsArpAddressTable : AddressTable { | |
public static bool IsSupported { get; } | |
public ProcfsArpAddressTable(IServiceProvider? serviceProvider = null) {} | |
[AsyncIteratorStateMachine(typeof(ProcfsArpAddressTable.<EnumerateEntriesAsyncCore>d__5))] | |
protected override IAsyncEnumerable<AddressTableEntry> EnumerateEntriesAsyncCore([EnumeratorCancellation] CancellationToken cancellationToken) {} | |
} | |
public readonly struct AddressTableEntry : | |
IEquatable<AddressTableEntry>, | |
IEquatable<IPAddress>, | |
IEquatable<PhysicalAddress> | |
{ | |
public static readonly AddressTableEntry Empty; // = "{IP=, MAC=(null), IsPermanent=False, State=None, Iface=}" | |
public static IEqualityComparer<AddressTableEntry> DefaultEqualityComparer { get; } | |
public static IEqualityComparer<AddressTableEntry> ExceptStateEqualityComparer { get; } | |
public AddressTableEntry(IPAddress ipAddress, PhysicalAddress? physicalAddress, bool isPermanent, AddressTableEntryState state, string? interfaceId) {} | |
public IPAddress? IPAddress { get; } | |
public string? InterfaceId { get; } | |
public bool IsEmpty { get; } | |
public bool IsPermanent { get; } | |
public PhysicalAddress? PhysicalAddress { get; } | |
public AddressTableEntryState State { get; } | |
public bool Equals(AddressTableEntry other) {} | |
public bool Equals(IPAddress? other) {} | |
public bool Equals(PhysicalAddress? other) {} | |
public override bool Equals(object? obj) {} | |
public override int GetHashCode() {} | |
public override string ToString() {} | |
} | |
} | |
namespace Smdn.Net.NetworkScanning { | |
public interface INetworkScanner : IDisposable { | |
ValueTask ScanAsync(CancellationToken cancellationToken); | |
ValueTask ScanAsync(IEnumerable<IPAddress> addresses, CancellationToken cancellationToken); | |
} | |
public sealed class ArpScanCommandNetworkScanner : CommandNetworkScanner { | |
public static bool IsSupported { get; } | |
public ArpScanCommandNetworkScanner(IPNetworkProfile? networkProfile, IServiceProvider? serviceProvider = null) {} | |
protected override bool GetCommandLineArguments(IEnumerable<IPAddress> addressesToScan, out string executable, out string arguments) {} | |
protected override bool GetCommandLineArguments(out string executable, out string arguments) {} | |
} | |
public abstract class CommandNetworkScanner : INetworkScanner { | |
public interface IProcessFactory { | |
Process CreateProcess(ProcessStartInfo processStartInfo); | |
} | |
protected readonly struct Command { | |
public Command(string name, string? executablePath) {} | |
public bool IsAvailable { get; } | |
public string Name { get; } | |
public string GetExecutablePathOrThrow() {} | |
} | |
protected static IReadOnlyCollection<string> DefaultCommandPaths { get; } | |
protected static CommandNetworkScanner.Command FindCommand(string command, IEnumerable<string> paths) {} | |
protected CommandNetworkScanner(ILogger? logger, IServiceProvider? serviceProvider) {} | |
protected virtual void Dispose(bool disposing) {} | |
public void Dispose() {} | |
protected abstract bool GetCommandLineArguments(IEnumerable<IPAddress> addressesToScan, out string executable, out string? arguments); | |
protected abstract bool GetCommandLineArguments(out string executable, out string? arguments); | |
public virtual ValueTask ScanAsync(CancellationToken cancellationToken = default) {} | |
public virtual ValueTask ScanAsync(IEnumerable<IPAddress> addresses, CancellationToken cancellationToken = default) {} | |
protected void ThrowIfDisposed() {} | |
} | |
public sealed class IpHlpApiNetworkScanner : NetworkScanner { | |
public static bool IsSupported { get; } | |
public IpHlpApiNetworkScanner(IPNetworkProfile networkProfile, IServiceProvider? serviceProvider = null) {} | |
protected override async ValueTask ScanAsyncCore(IPAddress address, CancellationToken cancellationToken = default) {} | |
} | |
public abstract class NetworkScanner : INetworkScanner { | |
public static INetworkScanner Null { get; } | |
public static INetworkScanner Create(IPNetworkProfile? networkProfile, IServiceProvider? serviceProvider = null) {} | |
protected NetworkScanner(IPNetworkProfile networkProfile, ILogger? logger = null) {} | |
protected ILogger? Logger { get; } | |
protected IPNetworkProfile NetworkProfile { get; } | |
protected virtual void Dispose(bool disposing) {} | |
public void Dispose() {} | |
public virtual ValueTask ScanAsync(CancellationToken cancellationToken = default) {} | |
public virtual ValueTask ScanAsync(IEnumerable<IPAddress> addresses, CancellationToken cancellationToken = default) {} | |
protected virtual ValueTask ScanAsyncCore(IPAddress address, CancellationToken cancellationToken) {} | |
protected void ThrowIfDisposed() {} | |
} | |
public sealed class NmapCommandNetworkScanner : CommandNetworkScanner { | |
public static bool IsSupported { get; } | |
public NmapCommandNetworkScanner(IPNetworkProfile networkProfile, IServiceProvider? serviceProvider = null) {} | |
protected override bool GetCommandLineArguments(IEnumerable<IPAddress> addressesToScan, out string executable, out string arguments) {} | |
protected override bool GetCommandLineArguments(out string executable, out string arguments) {} | |
} | |
public sealed class PingNetworkScanner : NetworkScanner { | |
public static bool IsSupported { get; } | |
public PingNetworkScanner(IPNetworkProfile networkProfile, IServiceProvider? serviceProvider = null) {} | |
protected override void Dispose(bool disposing) {} | |
protected override async ValueTask ScanAsyncCore(IPAddress address, CancellationToken cancellationToken = default) {} | |
} | |
} | |
-// API list generated by Smdn.Reflection.ReverseGenerating.ListApi.MSBuild.Tasks v1.2.1.0. | |
+// API list generated by Smdn.Reflection.ReverseGenerating.ListApi.MSBuild.Tasks v1.2.2.0. | |
// Smdn.Reflection.ReverseGenerating.ListApi.Core v1.2.0.0 (https://github.com/smdn/Smdn.Reflection.ReverseGenerating) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- Smdn.Net.AddressResolution.latest.nuspec | |
+++ Smdn.Net.AddressResolution.1.0.2.nuspec | |
@@ -1,41 +1,42 @@ | |
<?xml version="1.0" encoding="utf-8"?> | |
-<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd"> | |
+<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd"> | |
<metadata> | |
<id>Smdn.Net.AddressResolution</id> | |
- <version>1.0.1</version> | |
+ <version>1.0.2</version> | |
<title>Smdn.Net.AddressResolution</title> | |
<authors>smdn</authors> | |
<license type="expression">MIT</license> | |
<licenseUrl>https://licenses.nuget.org/MIT</licenseUrl> | |
<icon>Smdn.Net.AddressResolution.png</icon> | |
<readme>README.md</readme> | |
<projectUrl>https://github.com/smdn/Smdn.Net.AddressResolution</projectUrl> | |
<description>A network address resolution library for .NET. This library provides APIs for resolving between IP addresses and MAC addresses, mainly the `MacAddressResolver` class in the `Smdn.Net.AddressResolution` namespace. This library also provides a functionality for referencing the system's address table such as the ARP table (`Smdn.Net.AddressTables` namespace), and a network scan functionality to refresh the address cache mainly using the installed commands (`Smdn.Net.NetworkScanning` namespace).</description> | |
+ <releaseNotes>https://github.com/smdn/Smdn.Net.AddressResolution/releases/tag/releases%2FSmdn.Net.AddressResolution-1.0.2</releaseNotes> | |
<copyright>Copyright © 2022 smdn</copyright> | |
<tags>smdn.jp ARP arp-scan arp-table ip-address mac-address hardware-address address-lookup address-resolution</tags> | |
- <repository type="git" url="https://github.com/smdn/Smdn.Net.AddressResolution" branch="main" commit="12cda679d681acbeb81dac8a0cb03dbf6a3a0a3d" /> | |
+ <repository type="git" url="https://github.com/smdn/Smdn.Net.AddressResolution" commit="34189a504878bfc5e98c592355e026ca8e4ee848" /> | |
<dependencies> | |
<group targetFramework="net6.0"> | |
<dependency id="Microsoft.Extensions.DependencyInjection.Abstractions" version="6.0.0" exclude="Build,Analyzers" /> | |
<dependency id="Microsoft.Extensions.Logging.Abstractions" version="6.0.0" exclude="Build,Analyzers" /> | |
<dependency id="Vanara.PInvoke.IpHlpApi" version="3.4.13" exclude="Build,Analyzers" /> | |
</group> | |
<group targetFramework="net7.0"> | |
<dependency id="Microsoft.Extensions.DependencyInjection.Abstractions" version="6.0.0" exclude="Build,Analyzers" /> | |
<dependency id="Microsoft.Extensions.Logging.Abstractions" version="6.0.0" exclude="Build,Analyzers" /> | |
<dependency id="Vanara.PInvoke.IpHlpApi" version="3.4.13" exclude="Build,Analyzers" /> | |
</group> | |
<group targetFramework=".NETStandard2.0"> | |
<dependency id="Microsoft.Bcl.HashCode" version="1.0.0" exclude="Build,Analyzers" /> | |
<dependency id="Microsoft.Extensions.DependencyInjection.Abstractions" version="6.0.0" exclude="Build,Analyzers" /> | |
<dependency id="Microsoft.Extensions.Logging.Abstractions" version="6.0.0" exclude="Build,Analyzers" /> | |
<dependency id="Vanara.PInvoke.IpHlpApi" version="3.4.13" exclude="Build,Analyzers" /> | |
</group> | |
<group targetFramework=".NETStandard2.1"> | |
<dependency id="Microsoft.Extensions.DependencyInjection.Abstractions" version="6.0.0" exclude="Build,Analyzers" /> | |
<dependency id="Microsoft.Extensions.Logging.Abstractions" version="6.0.0" exclude="Build,Analyzers" /> | |
<dependency id="Vanara.PInvoke.IpHlpApi" version="3.4.13" exclude="Build,Analyzers" /> | |
</group> | |
</dependencies> | |
</metadata> | |
</package> | |
\ No newline at end of file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/Smdn.Net.AddressResolution/Smdn.Net.AddressResolution.csproj b/src/Smdn.Net.AddressResolution/Smdn.Net.AddressResolution.csproj | |
index 64a810c..57c249c 100644 | |
--- a/src/Smdn.Net.AddressResolution/Smdn.Net.AddressResolution.csproj | |
+++ b/src/Smdn.Net.AddressResolution/Smdn.Net.AddressResolution.csproj | |
@@ -7,9 +7,10 @@ SPDX-License-Identifier: MIT | |
<TargetFrameworks>netstandard2.0;netstandard2.1;net6.0</TargetFrameworks> | |
<TargetFrameworks Condition="$([MSBuild]::VersionGreaterThanOrEquals('$(NETCoreSdkVersion)', '7.0.0'))">net7.0;$(TargetFrameworks)</TargetFrameworks> | |
<TargetFrameworks Condition="$([MSBuild]::VersionGreaterThanOrEquals('$(NETCoreSdkVersion)', '8.0.0'))">net8.0;$(TargetFrameworks)</TargetFrameworks> | |
- <VersionPrefix>1.0.1</VersionPrefix> | |
+ <VersionPrefix>1.0.2</VersionPrefix> | |
<VersionSuffix></VersionSuffix> | |
<PackageValidationBaselineVersion>1.0.0</PackageValidationBaselineVersion> | |
+ <RootNamespace/> <!-- empty the root namespace so that the namespace is determined only by the directory name, for code style rule IDE0030 --> | |
<Nullable>enable</Nullable> | |
<GenerateDocumentationFile>true</GenerateDocumentationFile> | |
<NoWarn>CA1848;$(NoWarn)</NoWarn> <!-- use the LoggerMessage delegates instead --> | |
diff --git a/src/Smdn.Net.AddressResolution/Smdn.Net.AddressResolution/MacAddressResolver.AddressResolution.cs b/src/Smdn.Net.AddressResolution/Smdn.Net.AddressResolution/MacAddressResolver.AddressResolution.cs | |
index d97bed5..1abfcfb 100644 | |
--- a/src/Smdn.Net.AddressResolution/Smdn.Net.AddressResolution/MacAddressResolver.AddressResolution.cs | |
+++ b/src/Smdn.Net.AddressResolution/Smdn.Net.AddressResolution/MacAddressResolver.AddressResolution.cs | |
@@ -90,6 +90,9 @@ partial class MacAddressResolver { | |
CancellationToken cancellationToken | |
) | |
{ | |
+ if (predicate is null) | |
+ throw new ArgumentNullException(nameof(predicate)); | |
+ | |
AddressTableEntry priorCandidate = default; | |
AddressTableEntry candidate = default; | |
diff --git a/src/Smdn.Net.AddressResolution/Smdn.Net.AddressResolution/MacAddressResolver.NetworkScanning.cs b/src/Smdn.Net.AddressResolution/Smdn.Net.AddressResolution/MacAddressResolver.NetworkScanning.cs | |
index db82dff..722c088 100644 | |
--- a/src/Smdn.Net.AddressResolution/Smdn.Net.AddressResolution/MacAddressResolver.NetworkScanning.cs | |
+++ b/src/Smdn.Net.AddressResolution/Smdn.Net.AddressResolution/MacAddressResolver.NetworkScanning.cs | |
@@ -1,5 +1,8 @@ | |
// SPDX-FileCopyrightText: 2022 smdn <smdn@smdn.jp> | |
// SPDX-License-Identifier: MIT | |
+#if DEBUG | |
+using System; | |
+#endif | |
using System.Diagnostics; | |
using System.Net; | |
using System.Net.NetworkInformation; | |
diff --git a/src/Smdn.Net.AddressResolution/Smdn.Net.AddressResolution/MacAddressResolverBase.cs b/src/Smdn.Net.AddressResolution/Smdn.Net.AddressResolution/MacAddressResolverBase.cs | |
index 6f17a60..3fa67dc 100644 | |
--- a/src/Smdn.Net.AddressResolution/Smdn.Net.AddressResolution/MacAddressResolverBase.cs | |
+++ b/src/Smdn.Net.AddressResolution/Smdn.Net.AddressResolution/MacAddressResolverBase.cs | |
@@ -88,6 +88,7 @@ public abstract class MacAddressResolverBase : | |
/* | |
* IPAddress -> PhysicalAddress | |
*/ | |
+#pragma warning disable CA1033 | |
ValueTask<PhysicalAddress?> IAddressResolver<IPAddress, PhysicalAddress>.ResolveAsync( | |
IPAddress address, | |
CancellationToken cancellationToken | |
@@ -101,6 +102,7 @@ public abstract class MacAddressResolverBase : | |
IPAddress address | |
) | |
=> Invalidate(ipAddress: address); | |
+#pragma warning restore CA1033 | |
/// <summary> | |
/// Resolves from an IP address to its corresponding MAC address. | |
@@ -185,6 +187,7 @@ public abstract class MacAddressResolverBase : | |
/* | |
* PhysicalAddress -> IPAddress | |
*/ | |
+#pragma warning disable CA1033 | |
ValueTask<IPAddress?> IAddressResolver<PhysicalAddress, IPAddress>.ResolveAsync( | |
PhysicalAddress address, | |
CancellationToken cancellationToken | |
@@ -198,6 +201,7 @@ public abstract class MacAddressResolverBase : | |
PhysicalAddress address | |
) | |
=> Invalidate(macAddress: address); | |
+#pragma warning restore CA1033 | |
/// <summary> | |
/// Resolves from a MAC address to its corresponding IP address. | |
diff --git a/src/Smdn.Net.AddressResolution/Smdn.Net.AddressTables/IpHlpApiAddressTable.cs b/src/Smdn.Net.AddressResolution/Smdn.Net.AddressTables/IpHlpApiAddressTable.cs | |
index 56db615..97cd190 100644 | |
--- a/src/Smdn.Net.AddressResolution/Smdn.Net.AddressTables/IpHlpApiAddressTable.cs | |
+++ b/src/Smdn.Net.AddressResolution/Smdn.Net.AddressTables/IpHlpApiAddressTable.cs | |
@@ -73,7 +73,9 @@ public sealed class IpHlpApiAddressTable : AddressTable { | |
ValueTask<MIB_IPNET_TABLE2> GetIpNetTable2Async() | |
{ | |
+#pragma warning disable CA2000 | |
var ret = GetIpNetTable2(ADDRESS_FAMILY.AF_UNSPEC, out var table); | |
+#pragma warning restore CA2000 | |
if (ret.Failed) { | |
Logger?.LogWarning("GetIpNetTable2 {Result}", ret.ToString()); | |
diff --git a/src/Smdn.Net.AddressResolution/Smdn.Net.NetworkScanning/CommandNetworkScanner.cs b/src/Smdn.Net.AddressResolution/Smdn.Net.NetworkScanning/CommandNetworkScanner.cs | |
index 5f78b46..8a4ac97 100644 | |
--- a/src/Smdn.Net.AddressResolution/Smdn.Net.NetworkScanning/CommandNetworkScanner.cs | |
+++ b/src/Smdn.Net.AddressResolution/Smdn.Net.NetworkScanning/CommandNetworkScanner.cs | |
@@ -316,6 +316,7 @@ public abstract class CommandNetworkScanner : INetworkScanner { | |
); | |
} | |
} | |
+#pragma warning disable CA1031 | |
catch (Exception ex) { | |
logger?.LogError( | |
ex, | |
@@ -324,5 +325,6 @@ public abstract class CommandNetworkScanner : INetworkScanner { | |
commandProcessStartInfo.Arguments | |
); | |
} | |
+#pragma warning restore CA1031 | |
} | |
} | |
diff --git a/src/Smdn.Net.AddressResolution/Smdn.Net.NetworkScanning/NetworkScanner.cs b/src/Smdn.Net.AddressResolution/Smdn.Net.NetworkScanning/NetworkScanner.cs | |
index f16daad..b11c023 100644 | |
--- a/src/Smdn.Net.AddressResolution/Smdn.Net.NetworkScanning/NetworkScanner.cs | |
+++ b/src/Smdn.Net.AddressResolution/Smdn.Net.NetworkScanning/NetworkScanner.cs | |
@@ -96,7 +96,7 @@ public abstract partial class NetworkScanner : INetworkScanner { | |
foreach (var address in addresses) { | |
cancellationToken.ThrowIfCancellationRequested(); | |
- await ScanAsyncCore(address, cancellationToken); | |
+ await ScanAsyncCore(address, cancellationToken).ConfigureAwait(false); | |
} | |
} | |
} | |
diff --git a/src/Smdn.Net.AddressResolution/Smdn.Net.NetworkScanning/PingNetworkScanner.cs b/src/Smdn.Net.AddressResolution/Smdn.Net.NetworkScanning/PingNetworkScanner.cs | |
index 8a46576..8ebb8d9 100644 | |
--- a/src/Smdn.Net.AddressResolution/Smdn.Net.NetworkScanning/PingNetworkScanner.cs | |
+++ b/src/Smdn.Net.AddressResolution/Smdn.Net.NetworkScanning/PingNetworkScanner.cs | |
@@ -65,6 +65,7 @@ public sealed class PingNetworkScanner : NetworkScanner { | |
reply.RoundtripTime | |
); | |
} | |
+#pragma warning disable CA1031 | |
catch (Exception ex) { | |
Logger?.LogWarning( | |
exception: ex, | |
@@ -72,5 +73,6 @@ public sealed class PingNetworkScanner : NetworkScanner { | |
address | |
); | |
} | |
+#pragma warning restore CA1031 | |
} | |
} | |
diff --git a/src/Smdn.Net.AddressResolution/System.Runtime.CompilerServices/IsExternalInit.cs b/src/Smdn.Net.AddressResolution/System.Runtime.CompilerServices/IsExternalInit.cs | |
index 5971d2c..4f95971 100644 | |
--- a/src/Smdn.Net.AddressResolution/System.Runtime.CompilerServices/IsExternalInit.cs | |
+++ b/src/Smdn.Net.AddressResolution/System.Runtime.CompilerServices/IsExternalInit.cs | |
@@ -1,5 +1,6 @@ | |
// SPDX-FileCopyrightText: 2022 smdn <smdn@smdn.jp> | |
// SPDX-License-Identifier: MIT | |
+#pragma warning disable CA1812 | |
#if !SYSTEM_RUNTIME_COMPILERSERVICES_ISEXTERNALINIT | |
namespace System.Runtime.CompilerServices; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment