Documentation ¶
Index ¶
- Constants
- type APILease
- type APILeaseInfo
- type APILeasesDeleteInput
- type APILeasesGetInput
- type APILeasesGetOutput
- type APILeasesPutInput
- type APILeasesWOLInput
- type APIRoleConfigInput
- type APIRoleConfigOutput
- type APIScope
- type APIScopesDeleteInput
- type APIScopesGetInput
- type APIScopesGetOutput
- type APIScopesPutInput
- type Handler4
- type IPAM
- type InternalIPAM
- type Lease
- type Request4
- type Role
- func (r *Role) APILeasesDelete() usecase.Interactor
- func (r *Role) APILeasesGet() usecase.Interactor
- func (r *Role) APILeasesPut() usecase.Interactor
- func (r *Role) APILeasesWOL() usecase.Interactor
- func (r *Role) APIRoleConfigGet() usecase.Interactor
- func (r *Role) APIRoleConfigPut() usecase.Interactor
- func (r *Role) APIScopesDelete() usecase.Interactor
- func (r *Role) APIScopesGet() usecase.Interactor
- func (r *Role) APIScopesPut() usecase.Interactor
- func (r *Role) DeviceIdentifier(m *dhcpv4.DHCPv4) string
- func (r *Role) FindLease(req *Request4) *Lease
- func (r *Role) HandleDHCPDecline4(req *Request4) *dhcpv4.DHCPv4
- func (r *Role) HandleDHCPDiscover4(req *Request4) *dhcpv4.DHCPv4
- func (r *Role) HandleDHCPRequest4(req *Request4) *dhcpv4.DHCPv4
- func (r *Role) Handler4(re *Request4) *dhcpv4.DHCPv4
- func (r *Role) NewLease(identifier string) *Lease
- func (r *Role) NewRequest4(dhcp *dhcpv4.DHCPv4) *Request4
- func (r *Role) NewScope(name string) *Scope
- func (r *Role) Start(ctx context.Context, config []byte) error
- func (r *Role) Stop()
- type RoleConfig
- type Scope
- type ScopeDNS
Constants ¶
View Source
const InternalIPAMType = "internal"
View Source
const MaxDatagram = 1 << 16
MaxDatagram is the maximum length of message that can be received.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APILease ¶
type APILease struct { Identifier string `json:"identifier" required:"true"` Address string `json:"address" required:"true"` Hostname string `json:"hostname" required:"true"` AddressLeaseTime string `json:"addressLeaseTime" required:"true"` ScopeKey string `json:"scopeKey" required:"true"` DNSZone string `json:"dnsZone"` Info *APILeaseInfo `json:"info"` }
type APILeaseInfo ¶ added in v0.3.13
type APILeaseInfo struct {
Vendor string `json:"vendor"`
}
type APILeasesDeleteInput ¶
type APILeasesGetInput ¶
type APILeasesGetOutput ¶
type APILeasesGetOutput struct {
Leases []*APILease `json:"leases" required:"true"`
}
type APILeasesPutInput ¶
type APILeasesPutInput struct { Identifier string `query:"identifier" required:"true" maxLength:"255"` Scope string `query:"scope" required:"true" maxLength:"255"` Address string `json:"address" required:"true" maxLength:"40"` Hostname string `json:"hostname" required:"true" maxLength:"255"` AddressLeaseTime string `json:"addressLeaseTime" required:"true" maxLength:"40"` DNSZone string `json:"dnsZone" maxLength:"255"` }
type APILeasesWOLInput ¶
type APIRoleConfigInput ¶
type APIRoleConfigInput struct {
Config RoleConfig `json:"config" required:"true"`
}
type APIRoleConfigOutput ¶
type APIRoleConfigOutput struct {
Config RoleConfig `json:"config" required:"true"`
}
type APIScope ¶
type APIScope struct { Name string `json:"scope" required:"true"` SubnetCIDR string `json:"subnetCidr" required:"true"` Default bool `json:"default" required:"true"` Options []*types.DHCPOption `json:"options" required:"true"` TTL int64 `json:"ttl" required:"true"` IPAM map[string]string `json:"ipam" required:"true"` DNS *ScopeDNS `json:"dns"` }
type APIScopesDeleteInput ¶
type APIScopesDeleteInput struct {
Scope string `query:"scope" required:"true"`
}
type APIScopesGetInput ¶ added in v0.4.6
type APIScopesGetInput struct {
Name string `query:"name" description:"Optionally get DHCP Scope by name"`
}
type APIScopesGetOutput ¶
type APIScopesGetOutput struct {
Scopes []*APIScope `json:"scopes" required:"true"`
}
type APIScopesPutInput ¶
type APIScopesPutInput struct { Name string `query:"scope" required:"true" maxLength:"255"` SubnetCIDR string `json:"subnetCidr" required:"true" maxLength:"40"` Default bool `json:"default" required:"true"` Options []*types.DHCPOption `json:"options" required:"true"` TTL int64 `json:"ttl" required:"true"` IPAM map[string]string `json:"ipam"` DNS *ScopeDNS `json:"dns"` }
type InternalIPAM ¶
type InternalIPAM struct { SubnetCIDR netip.Prefix Start netip.Addr End netip.Addr // contains filtered or unexported fields }
func NewInternalIPAM ¶
func NewInternalIPAM(role *Role, s *Scope) (*InternalIPAM, error)
func (*InternalIPAM) GetSubnetMask ¶
func (i *InternalIPAM) GetSubnetMask() net.IPMask
func (*InternalIPAM) NextFreeAddress ¶
func (i *InternalIPAM) NextFreeAddress() *netip.Addr
type Lease ¶
type Role ¶
type Role struct {
// contains filtered or unexported fields
}
func (*Role) APILeasesDelete ¶
func (r *Role) APILeasesDelete() usecase.Interactor
func (*Role) APILeasesGet ¶
func (r *Role) APILeasesGet() usecase.Interactor
func (*Role) APILeasesPut ¶
func (r *Role) APILeasesPut() usecase.Interactor
func (*Role) APILeasesWOL ¶
func (r *Role) APILeasesWOL() usecase.Interactor
func (*Role) APIRoleConfigGet ¶
func (r *Role) APIRoleConfigGet() usecase.Interactor
func (*Role) APIRoleConfigPut ¶
func (r *Role) APIRoleConfigPut() usecase.Interactor
func (*Role) APIScopesDelete ¶
func (r *Role) APIScopesDelete() usecase.Interactor
func (*Role) APIScopesGet ¶
func (r *Role) APIScopesGet() usecase.Interactor
func (*Role) APIScopesPut ¶
func (r *Role) APIScopesPut() usecase.Interactor
type RoleConfig ¶
Source Files ¶
- api_leases.go
- api_scopes.go
- dhcp_handler4.go
- dhcp_handler4_decline.go
- dhcp_handler4_discover.go
- dhcp_handler4_request.go
- ethernet.go
- event_handler.go
- ipam.go
- ipam_internal.go
- leasees_wol.go
- leases.go
- leases_watch.go
- metrics.go
- middleware.go
- role.go
- role_config.go
- role_oui.go
- scopes.go
- scopes_watch.go
Click to show internal directories.
Click to hide internal directories.