Repository navigation
Expand file tree
/
Copy pathIPScannerOptions.cs
More file actions
85 lines (70 loc) · 2.75 KB
/
Copy pathIPScannerOptions.cs
File metadata and controls
85 lines (70 loc) · 2.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
namespace NETworkManager.Models.Network;
/// <summary>
/// Class contains the options for the IP scanner. A record, so a copy with other values can be created with
/// <c>with</c> (e.g. for a rescan).
/// </summary>
public record IPScannerOptions
{
/// <summary>
/// Max concurrent threads for the host scan.
/// </summary>
public required int MaxHostThreads { get; init; }
/// <summary>
/// Max concurrent threads for the port scan of each host.
/// </summary>
public required int MaxPortThreads { get; init; }
/// <summary>
/// Number of attempts to ping a host.
/// </summary>
public required int ICMPAttempts { get; init; }
/// <summary>
/// Timeout in milliseconds after which a ping is considered lost.
/// </summary>
public required int ICMPTimeout { get; init; }
/// <summary>
/// Size of the buffer used in the ping in bytes. A size, not the buffer, so options with the same values are
/// equal (records compare arrays by reference).
/// </summary>
public required int ICMPBufferSize { get; init; }
/// <summary>
/// Resolve the hostname for an IP address.
/// </summary>
public required bool ResolveHostname { get; init; }
/// <summary>
/// Scan the ports of the host.
/// </summary>
public required bool PortScanEnabled { get; init; }
/// <summary>
/// Ports to scan.
/// </summary>
public required int[] PortScanPorts { get; init; }
/// <summary>
/// Timeout in milliseconds after which a port is considered closed.
/// </summary>
public required int PortScanTimeout { get; init; }
/// <summary>
/// Number of attempts to connect to a port if there was no answer (timed out).
/// </summary>
public required int PortScanAttempts { get; init; }
/// <summary>
/// Resolve the NetBIOS name for an IP address.
/// </summary>
public required bool NetBIOSEnabled { get; init; }
/// <summary>
/// Timeout in milliseconds after which a NetBIOS request is considered lost.
/// </summary>
public required int NetBIOSTimeout { get; init; }
/// <summary>
/// Resolve the MAC address for the host from ARP.
/// </summary>
public required bool ResolveMACAddress { get; init; }
/// <summary>
/// Include unreachable IP addresses in the result.
/// </summary>
public required bool ShowAllResults { get; init; }
/// <summary>
/// Raise every host in <see cref="IPScanner.HostFound" />, also unreachable ones (e.g. for a rescan of shown
/// hosts), without showing all ports like <see cref="ShowAllResults" />.
/// </summary>
public required bool ReportAllHosts { get; init; }
}