Versions in this module Expand all Collapse all v0 v0.0.1 Aug 30, 2023 Changes in this version + const DnsInterfaceSettingsFlagDOH + const DnsInterfaceSettingsFlagDOHProfile + const DnsInterfaceSettingsFlagDisableUnconstrainedQueries + const DnsInterfaceSettingsFlagDomain + const DnsInterfaceSettingsFlagEnableLLMNR + const DnsInterfaceSettingsFlagHostname + const DnsInterfaceSettingsFlagIPv6 + const DnsInterfaceSettingsFlagNameserver + const DnsInterfaceSettingsFlagProfileNameserver + const DnsInterfaceSettingsFlagQueryAdapterName + const DnsInterfaceSettingsFlagRegisterAdapterName + const DnsInterfaceSettingsFlagRegistrationEnabled + const DnsInterfaceSettingsFlagSearchList + const DnsInterfaceSettingsFlagSupplementalSearchList + const DnsInterfaceSettingsVersion1 + const DnsInterfaceSettingsVersion2 + const DnsInterfaceSettingsVersion3 + const IfTypeA12mppswitch + const IfTypeAal2 + const IfTypeAal5 + const IfTypeAdsl + const IfTypeAflane8023 + const IfTypeAflane8025 + const IfTypeArap + const IfTypeArcnet + const IfTypeArcnetPlus + const IfTypeAsync + const IfTypeAtm + const IfTypeAtmDxi + const IfTypeAtmFuni + const IfTypeAtmIma + const IfTypeAtmLogical + const IfTypeAtmRadio + const IfTypeAtmSubinterface + const IfTypeAtmVciEndpt + const IfTypeAtmVirtual + const IfTypeBasicISDN + const IfTypeBgpPolicyAccounting + const IfTypeBsc + const IfTypeCctemul + const IfTypeCes + const IfTypeChannel + const IfTypeCnr + const IfTypeCoffee + const IfTypeCompositelink + const IfTypeDcn + const IfTypeDdnX25 + const IfTypeDigitalWrapperOverheadChannel + const IfTypeDigitalpowerline + const IfTypeDlsw + const IfTypeDocscableDownstream + const IfTypeDocscableMaclayer + const IfTypeDocscableUpstream + const IfTypeDs0 + const IfTypeDs0Bundle + const IfTypeDs1 + const IfTypeDs1Fdl + const IfTypeDs3 + const IfTypeDtm + const IfTypeDvbAsiIn + const IfTypeDvbAsiOut + const IfTypeDvbrccDownstream + const IfTypeDvbrccMaclayer + const IfTypeDvbrccUpstream + const IfTypeE1 + const IfTypeEon + const IfTypeEplrs + const IfTypeEscon + const IfTypeEthernet3Mbit + const IfTypeEthernetCSMACD + const IfTypeFast + const IfTypeFastether + const IfTypeFastetherFX + const IfTypeFddi + const IfTypeFibrechannel + const IfTypeFrDlciEndpt + const IfTypeFrForward + const IfTypeFramerelay + const IfTypeFramerelayInterconnect + const IfTypeFramerelayMpi + const IfTypeFramerelayService + const IfTypeFrf16MfrBundle + const IfTypeG703_2mb + const IfTypeG703_64k + const IfTypeGigabitethernet + const IfTypeGr303Idt + const IfTypeGr303Rdt + const IfTypeH323Gatekeeper + const IfTypeH323Proxy + const IfTypeHdh1822 + const IfTypeHdlc + const IfTypeHdsl2 + const IfTypeHiperlan2 + const IfTypeHippi + const IfTypeHippiinterface + const IfTypeHostpad + const IfTypeHssi + const IfTypeHyperchannel + const IfTypeIBM370parchan + const IfTypeIEEE1394 + const IfTypeIEEE80211 + const IfTypeIEEE80212 + const IfTypeIEEE802154 + const IfTypeIEEE80216Wman + const IfTypeIEEE8023adLag + const IfTypeIP + const IfTypeISDN + const IfTypeISDNS + const IfTypeISDNU + const IfTypeISO88023CSMACD + const IfTypeISO88024Tokenbus + const IfTypeISO88025Tokenring + const IfTypeISO88026Man + const IfTypeIdsl + const IfTypeIfGsn + const IfTypeImt + const IfTypeInterleave + const IfTypeIpforward + const IfTypeIpoverAtm + const IfTypeIpoverCdlc + const IfTypeIpoverClaw + const IfTypeIpswitch + const IfTypeIso88022LLC + const IfTypeIso88025Crfprint + const IfTypeIso88025Fiber + const IfTypeIso88025rDtr + const IfTypeIsup + const IfTypeL2Vlan + const IfTypeL3Ipvlan + const IfTypeL3Ipxvlan + const IfTypeLapB + const IfTypeLapD + const IfTypeLapF + const IfTypeLocaltalk + const IfTypeMediamailoverip + const IfTypeMfSiglink + const IfTypeMioX25 + const IfTypeModem + const IfTypeMpc + const IfTypeMpls + const IfTypeMplsTunnel + const IfTypeMsdsl + const IfTypeMvl + const IfTypeMyrinet + const IfTypeNfas + const IfTypeNsip + const IfTypeOpticalChannel + const IfTypeOpticalTransport + const IfTypeOther + const IfTypePPP + const IfTypePPPmultilinkbundle + const IfTypePara + const IfTypePlc + const IfTypePos + const IfTypePrimaryISDN + const IfTypePropBwaP2MP + const IfTypePropCnls + const IfTypePropDocsWirelessDownstream + const IfTypePropDocsWirelessMaclayer + const IfTypePropDocsWirelessUpstream + const IfTypePropMultiplexor + const IfTypePropPoint2PointSerial + const IfTypePropVirtual + const IfTypePropWirelessP2P + const IfTypeProteon10Mbit + const IfTypeProteon80Mbit + const IfTypeQllc + const IfTypeRadioMac + const IfTypeRadsl + const IfTypeReachDsl + const IfTypeRegular1822 + const IfTypeRfc1483 + const IfTypeRfc877X25 + const IfTypeRs232 + const IfTypeRsrb + const IfTypeSdlc + const IfTypeSdsl + const IfTypeShdsl + const IfTypeSip + const IfTypeSlip + const IfTypeSmdsDxi + const IfTypeSmdsIcip + const IfTypeSoftwareLoopback + const IfTypeSonet + const IfTypeSonetOverheadChannel + const IfTypeSonetPath + const IfTypeSonetVt + const IfTypeSrp + const IfTypeSs7Siglink + const IfTypeStacktostack + const IfTypeStarlan + const IfTypeTdlc + const IfTypeTermpad + const IfTypeTr008 + const IfTypeTransphdlc + const IfTypeTunnel + const IfTypeUltra + const IfTypeUsb + const IfTypeV11 + const IfTypeV35 + const IfTypeV36 + const IfTypeV37 + const IfTypeVdsl + const IfTypeVirtualipaddress + const IfTypeVoiceEm + const IfTypeVoiceEncap + const IfTypeVoiceFxo + const IfTypeVoiceFxs + const IfTypeVoiceOverip + const IfTypeVoiceoveratm + const IfTypeVoiceoverframerelay + const IfTypeWwanpp + const IfTypeWwanpp2 + const IfTypeX213 + const IfTypeX25Huntgroup + const IfTypeX25Mlp + const IfTypeX25Ple + const IfTypeXboxWireless + const ScopeLevelAdmin + const ScopeLevelCount + const ScopeLevelGlobal + const ScopeLevelInterface + const ScopeLevelLink + const ScopeLevelOrganization + const ScopeLevelSite + const ScopeLevelSubnet + const TunnelType6to4 + const TunnelTypeDirect + const TunnelTypeIPHTTPS + const TunnelTypeIsatap + const TunnelTypeNone + const TunnelTypeOther + const TunnelTypeTeredo + func SetInterfaceDnsSettings(guid windows.GUID, settings *DnsInterfaceSettings) error + type AddressFamily uint16 + type ChangeCallback interface + Unregister func() error + type DadState uint32 + const DadStateDeprecated + const DadStateDuplicate + const DadStateInvalid + const DadStatePreferred + const DadStateTentative + type DnsInterfaceSettings struct + Domain *uint16 + EnableLLMNR uint32 + Flags uint64 + NameServer *uint16 + ProfileNameServer *uint16 + QueryAdapterName uint32 + RegisterAdapterName uint32 + RegistrationEnabled uint32 + SearchList *uint16 + Version uint32 + type GAAFlags uint32 + const GAAFlagDefault + const GAAFlagIncludeAll + const GAAFlagIncludeAllCompartments + const GAAFlagIncludeAllInterfaces + const GAAFlagIncludeGateways + const GAAFlagIncludePrefix + const GAAFlagIncludeTunnelBindingOrder + const GAAFlagIncludeWinsInfo + const GAAFlagSkipAll + const GAAFlagSkipAnycast + const GAAFlagSkipDNSInfo + const GAAFlagSkipDNSServer + const GAAFlagSkipFriendlyName + const GAAFlagSkipMulticast + const GAAFlagSkipUnicast + type IPAAFlags uint32 + const IPAAFlagDdnsEnabled + const IPAAFlagDhcpv4Enabled + const IPAAFlagIpv4Enabled + const IPAAFlagIpv6Enabled + const IPAAFlagIpv6ManagedAddressConfigurationSupported + const IPAAFlagIpv6OtherStatefulConfig + const IPAAFlagNetbiosOverTcpipEnabled + const IPAAFlagNoMulticast + const IPAAFlagReceiveOnly + const IPAAFlagRegisterAdapterSuffix + type IPAdapterAddresses struct — darwin/amd64, linux/amd64, windows/amd64 + CompartmentID uint32 + ConnectionType NetIfConnectionType + DHCPv4Server windows.SocketAddress + DHCPv6IAID uint32 + DHCPv6Server windows.SocketAddress + FirstAnycastAddress *windows.IpAdapterAnycastAddress + FirstDNSServerAddress *windows.IpAdapterDnsServerAdapter + FirstDNSSuffix *IPAdapterDNSSuffix + FirstGatewayAddress *IPAdapterGatewayAddress + FirstMulticastAddress *windows.IpAdapterMulticastAddress + FirstPrefix *windows.IpAdapterPrefix + FirstUnicastAddress *windows.IpAdapterUnicastAddress + FirstWINSServerAddress *IPAdapterWINSServerAddress + Flags IPAAFlags + IPv6IfIndex uint32 + IfIndex uint32 + IfType IfType + Ipv4Metric uint32 + Ipv6Metric uint32 + LUID LUID + Length uint32 + MTU uint32 + NetworkGUID windows.GUID + Next *IPAdapterAddresses + OperStatus IfOperStatus + ReceiveLinkSpeed uint64 + TransmitLinkSpeed uint64 + TunnelType TunnelType + ZoneIndices [16]uint32 + func GetAdaptersAddresses(family AddressFamily, flags GAAFlags) ([]*IPAdapterAddresses, error) + func (addr *IPAdapterAddresses) AdapterName() string + func (addr *IPAdapterAddresses) DHCPv6ClientDUID() []byte + func (addr *IPAdapterAddresses) DNSSuffix() string + func (addr *IPAdapterAddresses) Description() string + func (addr *IPAdapterAddresses) FriendlyName() string + func (addr *IPAdapterAddresses) PhysicalAddress() []byte + type IPAdapterDNSSuffix struct + Next *IPAdapterDNSSuffix + func (obj *IPAdapterDNSSuffix) String() string + type IPAdapterGatewayAddress struct — darwin/amd64, linux/amd64, windows/amd64 + Address windows.SocketAddress + Length uint32 + Next *IPAdapterGatewayAddress + type IPAdapterWINSServerAddress struct — darwin/amd64, linux/amd64, windows/amd64 + Address windows.SocketAddress + Length uint32 + Next *IPAdapterWINSServerAddress + type IPAddressPrefix struct + PrefixLength uint8 + RawPrefix RawSockaddrInet + func (prefix *IPAddressPrefix) Prefix() netip.Prefix + func (prefix *IPAddressPrefix) SetPrefix(netPrefix netip.Prefix) error + type IfOperStatus uint32 + const IfOperStatusDormant + const IfOperStatusDown + const IfOperStatusLowerLayerDown + const IfOperStatusNotPresent + const IfOperStatusTesting + const IfOperStatusUnknown + const IfOperStatusUp + type IfType uint32 + type InterfaceAndOperStatusFlags uint8 + const IAOSFConnectorPresent + const IAOSFEndPointInterface + const IAOSFFilterInterface + const IAOSFHardwareInterface + const IAOSFLowPower + const IAOSFNotAuthenticated + const IAOSFNotMediaConnected + const IAOSFPaused + type LUID uint64 + func LUIDFromGUID(guid *windows.GUID) (LUID, error) + func LUIDFromIndex(index uint32) (LUID, error) + func (luid LUID) AddIPAddress(address netip.Prefix) error + func (luid LUID) AddIPAddresses(addresses []netip.Prefix) error + func (luid LUID) AddRoute(destination netip.Prefix, nextHop netip.Addr, metric uint32) error + func (luid LUID) AddRoutes(routesData []*RouteData) error + func (luid LUID) DNS() ([]netip.Addr, error) + func (luid LUID) DeleteIPAddress(address netip.Prefix) error + func (luid LUID) DeleteRoute(destination netip.Prefix, nextHop netip.Addr) error + func (luid LUID) FlushDNS(family AddressFamily) error + func (luid LUID) FlushIPAddresses(family AddressFamily) error + func (luid LUID) FlushRoutes(family AddressFamily) error + func (luid LUID) GUID() (*windows.GUID, error) + func (luid LUID) IPAddress(addr netip.Addr) (*MibUnicastIPAddressRow, error) + func (luid LUID) IPInterface(family AddressFamily) (*MibIPInterfaceRow, error) + func (luid LUID) Interface() (*MibIfRow2, error) + func (luid LUID) Route(destination netip.Prefix, nextHop netip.Addr) (*MibIPforwardRow2, error) + func (luid LUID) SetDNS(family AddressFamily, servers []netip.Addr, domains []string) error + func (luid LUID) SetIPAddresses(addresses []netip.Prefix) error + func (luid LUID) SetIPAddressesForFamily(family AddressFamily, addresses []netip.Prefix) error + func (luid LUID) SetRoutes(routesData []*RouteData) error + func (luid LUID) SetRoutesForFamily(family AddressFamily, routesData []*RouteData) error + type LinkLocalAddressBehavior int32 + const LinkLocalAddressAlwaysOff + const LinkLocalAddressAlwaysOn + const LinkLocalAddressDelayed + const LinkLocalAddressUnchanged + type MibAnycastIPAddressRow struct — darwin/amd64, linux/amd64, windows/amd64 + Address RawSockaddrInet + InterfaceIndex uint32 + InterfaceLUID LUID + ScopeID uint32 + func GetAnycastIPAddressTable(family AddressFamily) ([]MibAnycastIPAddressRow, error) + func (row *MibAnycastIPAddressRow) Create() error + func (row *MibAnycastIPAddressRow) Delete() error + type MibIPInterfaceRow struct — darwin/amd64, linux/amd64, windows/amd64 + AdvertiseDefaultRoute bool + AdvertisingEnabled bool + BaseReachableTime uint32 + Connected bool + DadTransmits uint32 + DisableDefaultRoutes bool + Family AddressFamily + ForwardingEnabled bool + InterfaceIdentifier uint64 + InterfaceIndex uint32 + InterfaceLUID LUID + LinkLocalAddressBehavior LinkLocalAddressBehavior + LinkLocalAddressTimeout uint32 + ManagedAddressConfigurationSupported bool + MaxReassemblySize uint32 + MaxRouterAdvertisementInterval uint32 + Metric uint32 + MinRouterAdvertisementInterval uint32 + NLMTU uint32 + OtherStatefulConfigurationSupported bool + PathMTUDiscoveryTimeout uint32 + ReachableTime uint32 + ReceiveOffload OffloadRod + RetransmitTime uint32 + RouterDiscoveryBehavior RouterDiscoveryBehavior + SitePrefixLength uint32 + SupportsNeighborDiscovery bool + SupportsRouterDiscovery bool + SupportsWakeUpPatterns bool + TransmitOffload OffloadRod + UseAutomaticMetric bool + UseNeighborUnreachabilityDetection bool + WeakHostReceive bool + WeakHostSend bool + ZoneIndices [ScopeLevelCount]uint32 + func GetIPInterfaceTable(family AddressFamily) ([]MibIPInterfaceRow, error) + func (row *MibIPInterfaceRow) Init() + func (row *MibIPInterfaceRow) Set() error + type MibIPforwardRow2 struct + Age uint32 + AutoconfigureAddress bool + DestinationPrefix IPAddressPrefix + Immortal bool + InterfaceIndex uint32 + InterfaceLUID LUID + Loopback bool + Metric uint32 + NextHop RawSockaddrInet + Origin RouteOrigin + PreferredLifetime uint32 + Protocol RouteProtocol + Publish bool + SitePrefixLength uint8 + ValidLifetime uint32 + func GetIPForwardTable2(family AddressFamily) ([]MibIPforwardRow2, error) + func (row *MibIPforwardRow2) Create() error + func (row *MibIPforwardRow2) Delete() error + func (row *MibIPforwardRow2) Init() + func (row *MibIPforwardRow2) Set() error + type MibIfEntryLevel uint32 + const MibIfEntryNormal + const MibIfEntryNormalWithoutStatistics + type MibIfRow2 struct — darwin/amd64, linux/amd64, windows/amd64 + AccessType NetIfAccessType + AdminStatus NetIfAdminStatus + ConnectionType NetIfConnectionType + DirectionType NetIfDirectionType + InBroadcastOctets uint64 + InDiscards uint64 + InErrors uint64 + InMulticastOctets uint64 + InNUcastPkts uint64 + InOctets uint64 + InUcastOctets uint64 + InUcastPkts uint64 + InUnknownProtos uint64 + InterfaceAndOperStatusFlags InterfaceAndOperStatusFlags + InterfaceGUID windows.GUID + InterfaceIndex uint32 + InterfaceLUID LUID + MTU uint32 + MediaConnectState NetIfMediaConnectState + MediaType NdisMedium + NetworkGUID windows.GUID + OperStatus IfOperStatus + OutBroadcastOctets uint64 + OutDiscards uint64 + OutErrors uint64 + OutMulticastOctets uint64 + OutNUcastPkts uint64 + OutOctets uint64 + OutQLen uint64 + OutUcastOctets uint64 + OutUcastPkts uint64 + PhysicalMediumType NdisPhysicalMedium + ReceiveLinkSpeed uint64 + TransmitLinkSpeed uint64 + TunnelType TunnelType + Type IfType + func GetIfTable2Ex(level MibIfEntryLevel) ([]MibIfRow2, error) + func (row *MibIfRow2) Alias() string + func (row *MibIfRow2) Description() string + func (row *MibIfRow2) PermanentPhysicalAddress() []byte + func (row *MibIfRow2) PhysicalAddress() []byte + type MibNotificationType uint32 + const MibAddInstance + const MibDeleteInstance + const MibInitialNotification + const MibParameterNotification + type MibUnicastIPAddressRow struct — darwin/amd64, linux/amd64, windows/amd64 + Address RawSockaddrInet + CreationTimeStamp int64 + DadState DadState + InterfaceIndex uint32 + InterfaceLUID LUID + OnLinkPrefixLength uint8 + PreferredLifetime uint32 + PrefixOrigin PrefixOrigin + ScopeID uint32 + SkipAsSource bool + SuffixOrigin SuffixOrigin + ValidLifetime uint32 + func GetUnicastIPAddressTable(family AddressFamily) ([]MibUnicastIPAddressRow, error) + func (row *MibUnicastIPAddressRow) Create() error + func (row *MibUnicastIPAddressRow) Delete() error + func (row *MibUnicastIPAddressRow) Init() + func (row *MibUnicastIPAddressRow) Set() error + type NdisMedium uint32 + const NdisMedium1394 + const NdisMedium802_3 + const NdisMedium802_5 + const NdisMediumArcnet878_2 + const NdisMediumArcnetRaw + const NdisMediumAtm + const NdisMediumBpc + const NdisMediumCoWan + const NdisMediumDix + const NdisMediumFddi + const NdisMediumIP + const NdisMediumInfiniBand + const NdisMediumIrda + const NdisMediumLocalTalk + const NdisMediumLoopback + const NdisMediumMax + const NdisMediumNative802_11 + const NdisMediumTunnel + const NdisMediumWan + const NdisMediumWiMAX + const NdisMediumWirelessWan + type NdisPhysicalMedium uint32 + const NdisPhysicalMedium1394 + const NdisPhysicalMedium802_3 + const NdisPhysicalMedium802_5 + const NdisPhysicalMediumBluetooth + const NdisPhysicalMediumCableModem + const NdisPhysicalMediumDSL + const NdisPhysicalMediumFibreChannel + const NdisPhysicalMediumInfiniband + const NdisPhysicalMediumIrda + const NdisPhysicalMediumMax + const NdisPhysicalMediumNative802_11 + const NdisPhysicalMediumNative802_15_4 + const NdisPhysicalMediumOther + const NdisPhysicalMediumPhoneLine + const NdisPhysicalMediumPowerLine + const NdisPhysicalMediumUWB + const NdisPhysicalMediumUnspecified + const NdisPhysicalMediumWiMax + const NdisPhysicalMediumWiredCoWan + const NdisPhysicalMediumWiredWAN + const NdisPhysicalMediumWirelessLan + const NdisPhysicalMediumWirelessWan + type NetIfAccessType uint32 + const NetIfAccessBroadcast + const NetIfAccessLoopback + const NetIfAccessMax + const NetIfAccessPointToMultiPoint + const NetIfAccessPointToPoint + type NetIfAdminStatus uint32 + const NetIfAdminStatusDown + const NetIfAdminStatusTesting + const NetIfAdminStatusUp + type NetIfConnectionType uint32 + const NetIfConnectionDedicated + const NetIfConnectionDemand + const NetIfConnectionMaximum + const NetIfConnectionPassive + type NetIfDirectionType uint32 + const NetIfDirectionMaximum + const NetIfDirectionReceiveOnly + const NetIfDirectionSendOnly + const NetIfDirectionSendReceive + type NetIfMediaConnectState uint32 + const MediaConnectStateConnected + const MediaConnectStateDisconnected + const MediaConnectStateUnknown + type OffloadRod uint8 + const ChecksumSupported + const DatagramChecksumSupported + const FastPathCompatible + const GiantSendOffloadSupported + const LargeSendOffloadSupported + const OptionsSupported + const StreamChecksumSupported + const StreamOptionsSupported + type PrefixOrigin uint32 + const PrefixOriginDHCP + const PrefixOriginManual + const PrefixOriginOther + const PrefixOriginRouterAdvertisement + const PrefixOriginUnchanged + const PrefixOriginWellKnown + type RawSockaddrInet struct + Family AddressFamily + func (addr *RawSockaddrInet) Addr() netip.Addr + func (addr *RawSockaddrInet) AddrPort() netip.AddrPort + func (addr *RawSockaddrInet) Port() uint16 + func (addr *RawSockaddrInet) SetAddr(netAddr netip.Addr) error + func (addr *RawSockaddrInet) SetAddrPort(addrPort netip.AddrPort) error + type RouteData struct + Destination netip.Prefix + Metric uint32 + NextHop netip.Addr + func (routeData *RouteData) String() string + type RouteOrigin uint32 + const RouteOrigin6to4 + const RouteOriginDHCP + const RouteOriginManual + const RouteOriginRouterAdvertisement + const RouteOriginWellKnown + type RouteProtocol uint32 + const RouteProtocolBbn + const RouteProtocolBgp + const RouteProtocolCisco + const RouteProtocolDHCP + const RouteProtocolDvmrp + const RouteProtocolEgp + const RouteProtocolEigrp + const RouteProtocolEsIs + const RouteProtocolGgp + const RouteProtocolHello + const RouteProtocolIcmp + const RouteProtocolIdpr + const RouteProtocolIsIs + const RouteProtocolLocal + const RouteProtocolNTAutostatic + const RouteProtocolNTStatic + const RouteProtocolNTStaticNonDOD + const RouteProtocolNetMgmt + const RouteProtocolOspf + const RouteProtocolOther + const RouteProtocolRip + const RouteProtocolRpl + type RouterDiscoveryBehavior int32 + const RouterDiscoveryDHCP + const RouterDiscoveryDisabled + const RouterDiscoveryEnabled + const RouterDiscoveryUnchanged + type ScopeLevel uint32 + type SuffixOrigin uint32 + const SuffixOriginDHCP + const SuffixOriginLinkLayerAddress + const SuffixOriginManual + const SuffixOriginOther + const SuffixOriginRandom + const SuffixOriginUnchanged + const SuffixOriginWellKnown + type TunnelType uint32