Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( ERROR_DHCP_SUBNET_NOT_PRESENT = windows.Errno(20005) ERROR_DHCP_FO_SCOPE_NOT_IN_RELATIONSHIP = windows.Errno(20116) )
var DHCP_SUBNET_STATE_NAMES = map[DHCP_SUBNET_STATE]string{ DhcpSubnetEnabled: "Enabled", DhcpSubnetDisabled: "Disabled", DhcpSubnetEnabledSwitched: "EnabledSwitched", DhcpSubnetDisabledSwitched: "DisabledSwitched", DhcpSubnetInvalidState: "InvalidState", }
Functions ¶
Types ¶
type DHCPV4Scope ¶
type DHCPV4Scope struct {
Name string
State DHCP_SUBNET_STATE
SuperScopeName string
SuperScopeNumber uint32
ScopeIPAddress net.IPNet
AddressesFree float64
AddressesFreeOnPartnerServer float64
AddressesFreeOnThisServer float64
AddressesInUse float64
AddressesInUseOnPartnerServer float64
AddressesInUseOnThisServer float64
PendingOffers float64
ReservedAddress float64
}
func GetDHCPV4ScopeStatistics ¶
func GetDHCPV4ScopeStatistics() ([]DHCPV4Scope, error)
GetDHCPV4ScopeStatistics returns the IPv4 scopes of the local DHCP server. A scope that fails is skipped and its error joined to the result, so the other scopes are still returned. A scope removed while the scopes are read is skipped without an error.
type DHCP_HOST_INFO ¶
type DHCP_HOST_INFO struct {
IpAddress DHCP_IP_ADDRESS
NetBiosName win32.LPWSTR
HostName win32.LPWSTR
}
type DHCP_IP_ADDRESS ¶
func (DHCP_IP_ADDRESS) IPv4 ¶
func (ip DHCP_IP_ADDRESS) IPv4() net.IP
type DHCP_IP_MASK ¶
func (DHCP_IP_MASK) IPv4Mask ¶
func (ip DHCP_IP_MASK) IPv4Mask() net.IPMask
type DHCP_MIB_INFO_V5 ¶
type DHCP_MIB_INFO_V5 struct {
Discovers win32.DWORD
Offers win32.DWORD
Requests win32.DWORD
Acks win32.DWORD
Naks win32.DWORD
Declines win32.DWORD
Releases win32.DWORD
ServerStartTime win32.DATE_TIME
QtnNumLeases win32.DWORD
QtnPctQtnLeases win32.DWORD
QtnProbationLeases win32.DWORD
QtnNonQtnLeases win32.DWORD
QtnExemptLeases win32.DWORD
QtnCapableClients win32.DWORD
QtnIASErrors win32.DWORD
DelayedOffers win32.DWORD
ScopesWithDelayedOffers win32.DWORD
Scopes win32.DWORD
ScopeInfo *DHCP_SUBNET_MIB_INFO_V5
}
type DHCP_SUBNET_INFO ¶
type DHCP_SUBNET_INFO struct {
SubnetAddress DHCP_IP_ADDRESS
SubnetMask DHCP_IP_MASK
SubnetName win32.LPWSTR
SubnetComment win32.LPWSTR
PrimaryHost DHCP_HOST_INFO
SubnetState DHCP_SUBNET_STATE
}
DHCP_SUBNET_INFO https://learn.microsoft.com/de-de/windows/win32/api/dhcpsapi/ns-dhcpsapi-dhcp_subnet_info
type DHCP_SUBNET_MIB_INFO_V5 ¶
type DHCP_SUBNET_STATE ¶
type DHCP_SUBNET_STATE uint32
DHCP_SUBNET_STATE https://learn.microsoft.com/de-de/windows/win32/api/dhcpsapi/ne-dhcpsapi-dhcp_subnet_state
const ( DhcpSubnetEnabled DHCP_SUBNET_STATE = 0 DhcpSubnetDisabled DHCP_SUBNET_STATE = 1 DhcpSubnetEnabledSwitched DHCP_SUBNET_STATE = 2 DhcpSubnetDisabledSwitched DHCP_SUBNET_STATE = 3 DhcpSubnetInvalidState DHCP_SUBNET_STATE = 4 )
type DHCP_SUPER_SCOPE_TABLE ¶
type DHCP_SUPER_SCOPE_TABLE struct {
Count win32.DWORD
Entries *DHCP_SUPER_SCOPE_TABLE_ENTRY
}