21 lines
677 B
C#
21 lines
677 B
C#
using AmtScanner.Api.Models;
|
|
|
|
namespace AmtScanner.Api.Services;
|
|
|
|
public interface IAmtScannerService
|
|
{
|
|
Task<List<AmtDevice>> ScanNetworkAsync(string taskId, string networkSegment, string subnetMask, IProgress<ScanProgress> progress, CancellationToken cancellationToken = default);
|
|
void CancelScan(string taskId);
|
|
}
|
|
|
|
public class ScanProgress
|
|
{
|
|
public string TaskId { get; set; } = string.Empty;
|
|
public int ScannedCount { get; set; }
|
|
public int TotalCount { get; set; }
|
|
public int FoundDevices { get; set; }
|
|
public double ProgressPercentage { get; set; }
|
|
public string? CurrentIp { get; set; }
|
|
public AmtDevice? LatestDevice { get; set; }
|
|
}
|