Documentation ¶
Index ¶
- Constants
- func AddIPAddress(linkName string, IP string) error
- func AddVlan(name string, parentName string, vlanID int, vlanProtocol netlink.VlanProtocol) (bool, error)
- func CheckLinkConfigExistense(name string) (bool, error)
- func ConfigReader(filePath string) (io.Reader, error)
- func ConfigWriter(r io.Reader, filePath string) (bool, error)
- func CreateAddressSection(ip net.IPNet) *sdc.Section
- func CreateLinkConfig(link netlink.Link) io.Reader
- func CreateLinkSection(mac net.HardwareAddr, mtu int, multicast bool) *sdc.Section
- func CreateMatchSection(name string, mac net.HardwareAddr, linkType string) *sdc.Section
- func DelIPAddress(linkName string, IP string) error
- func DelLink(name string) (bool, error)
- func GetAllLinks() ([]netlink.Link, error)
- func GetLink(name string) (netlink.Link, error)
- func InitCurrentConfigs() error
- func NetworkConfigWriter(r io.Reader, name string) (bool, error)
- func ParseIPAddress(IP string) (*netlink.Addr, error)
- type DyaneLink
Constants ¶
View Source
const ( BASE_SYSTEMD_NETWORKD_CONFIG_PATH = "/etc/systemd/network/" NETWORKD_LINK_CONFIG_SUFFIX = ".network" )
Variables ¶
This section is empty.
Functions ¶
func AddIPAddress ¶
func AddVlan ¶
func AddVlan(name string, parentName string, vlanID int, vlanProtocol netlink.VlanProtocol) (bool, error)
AddVlan adds a VLan with its parent link name and it configs
func CreateLinkSection ¶
func CreateMatchSection ¶
func DelIPAddress ¶
func GetAllLinks ¶
func InitCurrentConfigs ¶
func InitCurrentConfigs() error
Types ¶
type DyaneLink ¶
type DyaneLink struct { Valid bool `json:"valid"` Type string `json:"type"` Index int `json:"index"` Name string `json:"name"` HardwareAddr string `json:"mac"` Flags string `json:"flags"` RawFlags uint32 `json:"raw flags"` MTU int `json:"mtu"` ParentIndex int `json:"parent index"` MasterIndex int `json:"master index"` Alias string `json:"alias"` }
Click to show internal directories.
Click to hide internal directories.