Documentation ¶
Overview ¶
Package netexport reads network config data from windows. The package github.com/purecloudlabs/gprovision/pkg/netexport can then be used to writes config files compatible with systemd-networkd.
Requires Powershell, SaveRestore.ps1 (Intel). Some data is retrieved from the registry, while other data comes from the output of SaveRestore.ps1 or raw powershell commands.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PersistentDNS ¶
func PersistentIPs ¶
Types ¶
type IfMap ¶
func (IfMap) GetAddrs ¶
get ipv4 and ipv6 addresses for interfaces return comma-separated list of interfaces we care about - these are for use with powershell
func (IfMap) VlanChildren ¶
type Route ¶
func (Route) MarshalJSON ¶
type StringyMac ¶
type StringyMac struct {
net.HardwareAddr
}
wrapper to ensure the MAC gets converted to a JSON string correctly
func (StringyMac) MarshalJSON ¶
func (m StringyMac) MarshalJSON() ([]byte, error)
func (*StringyMac) UnmarshalJSON ¶
func (m *StringyMac) UnmarshalJSON(data []byte) error
type WinNic ¶
type WinNic struct { FriendlyName string //e.g. "Port 1 (WAN)", "Port 2 - VLAN 58" Mac StringyMac WinName string //"Intel(R) I350 Gigabit Network Connection #2 - VLAN : PureCloud Vlan=58" WinIndex int DHCP4 bool DHCP6 bool IPs []inet.IPNet Routes RouteList NameServers []net.IP HasVLANChildren bool //only true if this is a "real" interface that has vlans configured IsVLAN bool VLAN uint64 }
func (WinNic) MarshalJSON ¶
func (WinNic) VlanIfName ¶
Create a unique interface name for a vlan. Avoids `enoN.vlan` as at the point this runs we have no idea what linux will choose for the parent's interface name. Output is like `port1.123`.