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 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
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -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();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
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.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();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue