This commit is contained in:
Jöran Malek 2023-11-17 17:23:39 +01:00
parent 95fa18ffd4
commit 41b067cbb4
5 changed files with 29 additions and 31 deletions

View file

@ -5,13 +5,13 @@ public record struct KeaDhcp4Lease(
string Address, string Address,
string HWAddr, string HWAddr,
string? ClientId, string? ClientId,
UInt32 ValidLifetime, uint ValidLifetime,
UInt64 Expire, ulong Expire,
string SubnetId, string SubnetId,
byte FqdnFwd, byte FqdnFwd,
byte FqdnRev, byte FqdnRev,
string Hostname, string Hostname,
UInt32 State, uint State,
string UserContext, string UserContext,
UInt32 PoolId uint PoolId
); );

View file

@ -4,20 +4,20 @@ namespace pdns_dhcp.Kea;
public record struct KeaDhcp6Lease( public record struct KeaDhcp6Lease(
string Address, string Address,
string DUId, string DUId,
UInt32 ValidLifetime, uint ValidLifetime,
UInt64 Expire, ulong Expire,
string SubnetId, string SubnetId,
UInt32 PrefLifetime, uint PrefLifetime,
LeaseType LeaseType, LeaseType LeaseType,
UInt32 IAId, uint IAId,
Byte PrefixLen, byte PrefixLen,
byte FqdnFwd, byte FqdnFwd,
byte FqdnRev, byte FqdnRev,
string Hostname, string Hostname,
string HWAddr, string HWAddr,
UInt32 State, uint State,
string UserContext, string UserContext,
UInt16? HWType, ushort? HWType,
UInt32? HWAddrSource, uint? HWAddrSource,
UInt32 PoolId uint PoolId
); );

View file

@ -1,4 +1,3 @@
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Options; using Microsoft.Extensions.Options;
@ -6,18 +5,17 @@ using pdns_dhcp.Options;
namespace pdns_dhcp.Services; namespace pdns_dhcp.Services;
public class DhcpLeaseWatcher : IHostedService public class DhcpLeaseWatcher : BackgroundService
{ {
public DhcpLeaseWatcher(IOptions<DhcpOptions> options) public DhcpLeaseWatcher(IOptions<DhcpOptions> options)
{ {
var dhcpOptions = options.Value;
if (dhcpOptions.Kea is { } keaOptions)
{
}
} }
public Task StartAsync(CancellationToken cancellationToken) protected override Task ExecuteAsync(CancellationToken stoppingToken)
{
throw new NotImplementedException();
}
public Task StopAsync(CancellationToken cancellationToken)
{ {
throw new NotImplementedException(); throw new NotImplementedException();
} }

View file

@ -0,0 +1,8 @@
using Stl.Interception;
namespace pdns_dhcp.Services;
public interface IDhcpLeaseWatcherFactory : IRequiresFullProxy
{
}

View file

@ -1,6 +1,3 @@
using System.Net.Sockets;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Options; using Microsoft.Extensions.Options;
@ -9,7 +6,7 @@ using pdns_dhcp.PowerDns;
namespace pdns_dhcp.Services; namespace pdns_dhcp.Services;
public class PowerDnsBackend : IHostedService public class PowerDnsBackend : BackgroundService
{ {
private readonly PowerDnsOptions _options; private readonly PowerDnsOptions _options;
@ -18,12 +15,7 @@ public class PowerDnsBackend : IHostedService
_options = options.Value; _options = options.Value;
} }
public Task StartAsync(CancellationToken cancellationToken) protected override Task ExecuteAsync(CancellationToken stoppingToken)
{
throw new NotImplementedException();
}
public Task StopAsync(CancellationToken cancellationToken)
{ {
throw new NotImplementedException(); throw new NotImplementedException();
} }