Versions in this module Expand all Collapse all v1 v1.0.1 Jun 23, 2022 Changes in this version + func CreateMatchSection(m *configfile.Meta, link string) error + func CreateNetDevNetworkFile(link string, kind string) error + func CreateNetworkFile(link string) (*configfile.Meta, error) + func CreateOrParseLinkFile(link string) (*configfile.Meta, error) + func CreateOrParseNetDevFile(link string, kind string) (*configfile.Meta, string, error) + func CreateOrParseNetworkFile(l string) (*configfile.Meta, error) + func ParseLinkActivationPolicy(ifindex int) (string, error) + func ParseLinkAddressState(ifindex int) (string, error) + func ParseLinkCarrierState(ifindex int) (string, error) + func ParseLinkDNS(ifindex int) ([]string, error) + func ParseLinkDomains(ifindex int) ([]string, error) + func ParseLinkIPv4AddressState(ifindex int) (string, error) + func ParseLinkIPv6AddressState(ifindex int) (string, error) + func ParseLinkNTP(ifindex int) ([]string, error) + func ParseLinkNetworkFile(ifindex int) (string, error) + func ParseLinkOnlineState(ifindex int) (string, error) + func ParseLinkOperationalState(ifindex int) (string, error) + func ParseLinkSetupState(ifindex int) (string, error) + func ParseLinkString(ifindex int, key string) (string, error) + func ParseNetworkAddressState() (string, error) + func ParseNetworkCarrierState() (string, error) + func ParseNetworkDNS() ([]string, error) + func ParseNetworkDomains() ([]string, error) + func ParseNetworkIPv4AddressState() (string, error) + func ParseNetworkIPv6AddressState() (string, error) + func ParseNetworkNTP() ([]string, error) + func ParseNetworkOnlineState() (string, error) + func ParseNetworkOperationalState() (string, error) + func ParseNetworkRouteDomains() ([]string, error) + func ParseNetworkState(key string) (string, error) + func RegisterRouterNetworkd(router *mux.Router) + func RemoveNetDev(link string, kind string) error + func RemoveNetDevNetworkFile(link string, kind string) error + type AddressSection struct + Address string + Label string + Peer string + Scope string + type Bond struct + ARPAllTargets string + ARPIPTargets string + ARPIntervalSec int + ARPValidate string + AdActorSystem string + AdActorSystemPriority int + AdSelect string + AdUserPortKey int + AllSlavesActive bool + DownDelaySec int + DynamicTransmitLoadBalancing bool + FailOverMACPolicy string + GratuitousARP int + LACPTransmitRate string + LearnPacketIntervalSec int + MIIMonitorSec string + MinLinks int + Mode string + PacketsPerSlave int + PrimaryReselectPolicy string + ResendIGMP int + TransmitHashPolicy string + UpDelaySec int + type Bridge struct + AgeingTimeSec string + DefaultPVID int + ForwardDelaySec string + GroupForwardMask int + HelloTimeSec string + MaxAgeSec string + MulticastIGMPVersion int + MulticastQuerier bool + MulticastSnooping bool + Priority int + STP string + VLANFiltering bool + VLANProtocol string + type DHCPv4Section struct + ClientIdentifier string + DUIDRawData string + DUIDType string + IAID string + RequestOptions []string + SendOption string + UseDNS string + UseDomains string + UseGateway string + UseHostname string + UseMTU string + UseNTP string + UseRoutes string + UseSIP string + UseTimezone string + VendorClassIdentifier string + type DHCPv4ServerSection struct + DNS []string + DefaultLeaseTimeSec string + EmitDNS string + EmitNTP string + EmitRouter string + MaxLeaseTimeSec string + PoolOffset string + PoolSize string + type DHCPv6Section struct + DUIDRawData string + DUIDType string + IAID string + MUDURL string + PrefixDelegationHint string + RequestOptions []string + SendOption string + SendVendorOption string + UseAddress string + UseDNS string + UseDelegatedPrefix string + UseDomains string + UseHostname string + UseNTP string + UserClass []string + VendorClass []string + WithoutRA string + type IPv6PrefixSection struct + Assign string + PreferredLifetimeSec string + Prefix string + ValidLifetimeSec string + type IPv6RoutePrefixSection struct + LifetimeSec string + Route string + type IPv6SendRASection struct + DNS []string + DNSLifetimeSec string + Domains []string + EmitDNS string + EmitDomains string + RouterPreference string + type IpVLan struct + Flags string + Mode string + type Link struct + Advertise []string + Alias string + AlternativeName string + AlternativeNamesPolicy []string + AutoNegotiation string + AutoNegotiationFlowControl string + BitsPerSecond string + CoalescePacketRateHigh uint + CoalescePacketRateLow uint + CoalescePacketRateSampleIntervalSec uint + CombinedChannels string + Description string + Duplex string + GenericReceiveOffload string + GenericReceiveOffloadHardware string + GenericSegmentOffloadMaxBytes uint + GenericSegmentOffloadMaxSegments uint + GenericSegmentationOffload string + LargeReceiveOffload string + Link string + MACAddress string + MACAddressPolicy string + MTUBytes string + MatchSection MatchSection + NTupleFilter string + Name string + NamePolicy []string + OtherChannels string + Port string + ReceiveChecksumOffload string + ReceiveQueues uint + ReceiveVLANCTAGFilter string + ReceiveVLANCTAGHardwareAcceleration string + RxBufferSize string + RxChannels string + RxCoalesceHighSec uint + RxCoalesceIrqSec uint + RxCoalesceLowSec uint + RxCoalesceSec uint + RxFlowControl string + RxJumboBufferSize string + RxMaxCoalescedFrames uint + RxMaxCoalescedHighFrames uint + RxMaxCoalescedIrqFrames uint + RxMaxCoalescedLowFrames uint + RxMiniBufferSize string + StatisticsBlockCoalesceSec uint + TCP6SegmentationOffload string + TCPSegmentationOffload string + TransmitChecksumOffload string + TransmitQueueLength uint + TransmitQueues uint + TransmitVLANCTAGHardwareAcceleration string + TransmitVLANSTAGHardwareAcceleration string + TxBufferSize string + TxChannels string + TxCoalesceHighSec uint + TxCoalesceIrqSec uint + TxCoalesceLowSec uint + TxCoalesceSec uint + TxFlowControl string + TxMaxCoalescedFrames uint + TxMaxCoalescedHighFrames uint + TxMaxCoalescedIrqFrames uint + TxMaxCoalescedLowFrames uint + UseAdaptiveRxCoalesce string + UseAdaptiveTxCoalesce string + WakeOnLan []string + WakeOnLanPassword string + func (l *Link) BuildLinkSection(m *configfile.Meta) error + func (l *Link) ConfigureLink(ctx context.Context, w http.ResponseWriter) error + type LinkDescribe struct + AddressState string + AlternativeNames []string + CarrierState string + Driver string + IPv4AddressState string + IPv6AddressState string + Index int + LinkFile string + Manufacturer string + Model string + Name string + NetworkFile string + OnlineState string + OperationalState string + Path string + SetupState string + Type string + Vendor string + type LinkSection struct + ARP string + ActivationPolicy string + AllMulticast string + Group string + MACAddress string + MTUBytes string + Multicast string + Promiscuous string + RequiredFamilyForOnline string + RequiredForOnline string + Unmanaged string + type LinksDescribe struct + Interfaces []LinkDescribe + func AcquireLinks(ctx context.Context) (*LinksDescribe, error) + type MacVLan struct + BroadcastMulticastQueueLength string + Mode string + SourceMACAddress string + type MatchSection struct + Name string + type NetDev struct + BondSection Bond + BridgeSection Bridge + Description string + IpVLanSection IpVLan + Kind string + Links []string + MACAddress string + MTUBytes string + MacVLanSection MacVLan + MatchSection MatchSection + Name string + VLanSection VLan + VxLanSection VxLan + WireGuardPeerSection WireGuardPeer + WireGuardSection WireGuard + func (n *NetDev) BuildKindInLinkNetworkFile() error + func (n *NetDev) BuildKindSection(m *configfile.Meta) error + func (n *NetDev) BuildNetDevSection(m *configfile.Meta) error + func (n *NetDev) ConfigureNetDev(ctx context.Context, w http.ResponseWriter) error + func (n *NetDev) RemoveNetDev(ctx context.Context, w http.ResponseWriter) error + type Network struct + AddressSections []AddressSection + DHCPv4Section DHCPv4Section + DHCPv4ServerSection DHCPv4ServerSection + DHCPv6Section DHCPv6Section + IPv6PrefixSections []IPv6PrefixSection + IPv6RoutePrefixSections []IPv6RoutePrefixSection + IPv6SendRASection IPv6SendRASection + Link string + LinkSection LinkSection + MatchSection MatchSection + NetworkSection NetworkSection + RouteSections []RouteSection + RoutingPolicyRuleSections []RoutingPolicyRuleSection + func (n *Network) ConfigureNetwork(ctx context.Context, w http.ResponseWriter) error + func (n *Network) RemoveNetwork(ctx context.Context, w http.ResponseWriter) error + type NetworkDescribe struct + AddressState string + CarrierState string + DNS []string + Domains []string + IPv4AddressState string + IPv6AddressState string + NTP []string + OnlineState string + OperationalState string + RouteDomains []string + func AcquireNetworkState(ctx context.Context) (*NetworkDescribe, error) + type NetworkSection struct + Address string + DHCP string + DHCPServer string + DNS []string + Domains []string + Gateway string + IPv6AcceptRA string + IPv6SendRA string + LinkLocalAddressing string + MulticastDNS string + NTP []string + VLAN string + type RouteSection struct + Destination string + Gateway string + GatewayOnlink string + PreferredSource string + Scope string + Source string + Table string + type RoutingPolicyRuleSection struct + DestinationPort string + Family string + FirewallMark string + From string + IPProtocol string + IncomingInterface string + InvertRule string + OutgoingInterface string + Priority string + SourcePort string + SuppressInterfaceGroup string + SuppressPrefixLength string + Table string + To string + Type string + TypeOfService string + User string + type SDConnection struct + func NewSDConnection() (*SDConnection, error) + func (c *SDConnection) Close() + func (c *SDConnection) DBusLinkDescribe(ctx context.Context) (*LinksDescribe, error) + func (c *SDConnection) DBusNetworkReconfigureLink(ctx context.Context, index int) error + func (c *SDConnection) DBusNetworkReload(ctx context.Context) error + type VLan struct + Id uint + type VxLan struct + DestinationPort string + Group string + Independent string + Local string + Remote string + VNI string + type WireGuard struct + FirewallMark string + ListenPort string + PrivateKey string + PrivateKeyFile string + RouteMetric string + RouteTable string + type WireGuardPeer struct + AllowedIPs []string + Endpoint string + PersistentKeepalive string + PresharedKey string + PresharedKeyFile string + PublicKey string + RouteMetric string + RouteTable string