Files
dnsmasq-webui/src/DnsmasqWebUI/Models/DhcpHostEntry.cs
T
alex e99b2d0453 Initial commit: dnsmasq web UI
- ASP.NET Core 9 Blazor Web App + Web API
- Hosts file management (read/write, hosts(5) format)
- DHCP static hosts (dhcp-host=, dnsmasq config)
- DHCP leases (read-only, dnsmasq lease file format)
- Reload and status commands (configurable)
- Docker: standalone app image + Dockerfile.dnsmasq (app + dnsmasq)
- docker-compose.test.yml: app + dhcp-client, testdata mount
- Unit tests (Hosts, DhcpHost, Leases, DnsmasqConfig parsers) using testdata
2026-01-31 03:06:46 +10:00

21 lines
771 B
C#

namespace DnsmasqWebUI.Models;
public class DhcpHostEntry
{
public int LineNumber { get; set; }
/// <summary>Stable identifier (content-based: MACs|Address|Name, with ":LineNumber" for uniqueness). Set by server on GET; used to match entries on PUT so reordering is safe.</summary>
public string Id { get; set; } = "";
public string RawLine { get; set; } = "";
public bool IsComment { get; set; }
public bool IsDeleted { get; set; }
public bool Ignore { get; set; }
public List<string> MacAddresses { get; set; } = new();
public string? Name { get; set; }
public string? Address { get; set; }
public string? Lease { get; set; }
public List<string> Extra { get; set; } = new();
public string? Comment { get; set; }
}