Types
This commit is contained in:
parent
95fa18ffd4
commit
41b067cbb4
5 changed files with 29 additions and 31 deletions
|
|
@ -5,13 +5,13 @@ public record struct KeaDhcp4Lease(
|
|||
string Address,
|
||||
string HWAddr,
|
||||
string? ClientId,
|
||||
UInt32 ValidLifetime,
|
||||
UInt64 Expire,
|
||||
uint ValidLifetime,
|
||||
ulong Expire,
|
||||
string SubnetId,
|
||||
byte FqdnFwd,
|
||||
byte FqdnRev,
|
||||
string Hostname,
|
||||
UInt32 State,
|
||||
uint State,
|
||||
string UserContext,
|
||||
UInt32 PoolId
|
||||
uint PoolId
|
||||
);
|
||||
|
|
|
|||
|
|
@ -4,20 +4,20 @@ namespace pdns_dhcp.Kea;
|
|||
public record struct KeaDhcp6Lease(
|
||||
string Address,
|
||||
string DUId,
|
||||
UInt32 ValidLifetime,
|
||||
UInt64 Expire,
|
||||
uint ValidLifetime,
|
||||
ulong Expire,
|
||||
string SubnetId,
|
||||
UInt32 PrefLifetime,
|
||||
uint PrefLifetime,
|
||||
LeaseType LeaseType,
|
||||
UInt32 IAId,
|
||||
Byte PrefixLen,
|
||||
uint IAId,
|
||||
byte PrefixLen,
|
||||
byte FqdnFwd,
|
||||
byte FqdnRev,
|
||||
string Hostname,
|
||||
string HWAddr,
|
||||
UInt32 State,
|
||||
uint State,
|
||||
string UserContext,
|
||||
UInt16? HWType,
|
||||
UInt32? HWAddrSource,
|
||||
UInt32 PoolId
|
||||
ushort? HWType,
|
||||
uint? HWAddrSource,
|
||||
uint PoolId
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using Microsoft.Extensions.Options;
|
||||
|
||||
|
|
@ -6,18 +5,17 @@ using pdns_dhcp.Options;
|
|||
|
||||
namespace pdns_dhcp.Services;
|
||||
|
||||
public class DhcpLeaseWatcher : IHostedService
|
||||
public class DhcpLeaseWatcher : BackgroundService
|
||||
{
|
||||
public DhcpLeaseWatcher(IOptions<DhcpOptions> options)
|
||||
{
|
||||
}
|
||||
|
||||
public Task StartAsync(CancellationToken cancellationToken)
|
||||
var dhcpOptions = options.Value;
|
||||
if (dhcpOptions.Kea is { } keaOptions)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public Task StopAsync(CancellationToken cancellationToken)
|
||||
protected override Task ExecuteAsync(CancellationToken stoppingToken)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
|
|
|||
8
src/pdns-dhcp/Services/IDhcpLeaseWatcherFactory.cs
Normal file
8
src/pdns-dhcp/Services/IDhcpLeaseWatcherFactory.cs
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
using Stl.Interception;
|
||||
|
||||
namespace pdns_dhcp.Services;
|
||||
|
||||
public interface IDhcpLeaseWatcherFactory : IRequiresFullProxy
|
||||
{
|
||||
|
||||
}
|
||||
|
|
@ -1,6 +1,3 @@
|
|||
using System.Net.Sockets;
|
||||
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using Microsoft.Extensions.Options;
|
||||
|
||||
|
|
@ -9,7 +6,7 @@ using pdns_dhcp.PowerDns;
|
|||
|
||||
namespace pdns_dhcp.Services;
|
||||
|
||||
public class PowerDnsBackend : IHostedService
|
||||
public class PowerDnsBackend : BackgroundService
|
||||
{
|
||||
private readonly PowerDnsOptions _options;
|
||||
|
||||
|
|
@ -18,12 +15,7 @@ public class PowerDnsBackend : IHostedService
|
|||
_options = options.Value;
|
||||
}
|
||||
|
||||
public Task StartAsync(CancellationToken cancellationToken)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public Task StopAsync(CancellationToken cancellationToken)
|
||||
protected override Task ExecuteAsync(CancellationToken stoppingToken)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue