mirror of
https://github.com/alexhopeoconnor/dnsmasq-webui.git
synced 2026-10-18 11:51:43 +10:00
- 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
20 lines
620 B
C#
20 lines
620 B
C#
namespace DnsmasqWebUI.Models;
|
|
|
|
/// <summary>Kind of line in a dnsmasq config file. Config format: one option per line, key=value (no leading --), # for comments.</summary>
|
|
public enum ConfigLineKind
|
|
{
|
|
Blank,
|
|
Comment,
|
|
DhcpHost,
|
|
Other
|
|
}
|
|
|
|
/// <summary>One line of a dnsmasq config file. For Blank/Comment/Other we preserve RawLine; for DhcpHost we have a parsed DhcpHostEntry.</summary>
|
|
public sealed class ConfigLine
|
|
{
|
|
public ConfigLineKind Kind { get; init; }
|
|
public int LineNumber { get; init; }
|
|
public string RawLine { get; init; } = "";
|
|
public DhcpHostEntry? DhcpHost { get; init; }
|
|
}
|