func (s *netlinkConfigSource) Interfaces() ([]ConfigSourceNIC, error) {
	links, err := s.linkList()
	if err != nil {
		return nil, errors.Trace(err)
	}

	getAddrs := func(l netlink.Link) ([]netlink.Addr, error) {
		return netlink.AddrList(l, netlink.FAMILY_ALL)
	}

	nics := make([]ConfigSourceNIC, len(links))
	for i := range links {
		nics[i] = &netlinkNIC{
			nic:      links[i],
			getAddrs: getAddrs,
		}
	}
	return nics, nil
}
// Interfaces returns the network interfaces on the machine.
Interfaces returns the network interfaces on the machine.
// Interfaces returns the network interfaces on the machine .
func (s *netlinkConfigSource) Interfaces() ([]ConfigSourceNIC, error) {
	links, err := s.linkList()
	if err != nil {
		return nil, errors.Trace(err)
	}
	getAddrs := func(l netlink.Link) ([]netlink.Addr, error) {
		return netlink.AddrList(l, netlink.FAMILY_ALL)
	}
	nics := make([]ConfigSourceNIC, len(links))
	for i := range links {
		nics[i] = &netlinkNIC{
			nic:      links[i],
			getAddrs: getAddrs,
		}
	}
	return nics, nil
}
func ( s * netlinkConfigSource ) Interfaces ( ) ( [ ] ConfigSourceNIC , error ) { links , err := s . linkList ( ) if err != nil { return nil , errors . Trace ( err ) } getAddrs := func ( l netlink . Link ) ( [ ] netlink . Addr , error ) { return netlink . AddrList ( l , netlink . FAMILY_ALL ) } nics := make ( [ ] ConfigSourceNIC , len ( links ) ) for i := range links { nics [ i ] = & netlinkNIC { nic : links [ i ] , getAddrs : getAddrs , } } return nics , nil }
Interfaces returns the network interfaces on the machine.
Interfaces returns the network interfaces on the machine .