// AddressMaps retrieves the list of child AddressMaps of the PATNATPool
517758
func (o *PATNATPool) AddressMaps(info *bambou.FetchingInfo) (AddressMapsList, *bambou.Error) {

	var list AddressMapsList
	err := bambou.CurrentSession().FetchChildren(o, AddressMapIdentity, &list, info)
	return list, err
}
1016348
func (c *CloudPersister) ListMaps() ([]*models.Map, error) {
	ctx := context.Background()
	Maps := make([]*models.Map, 0)
	q := datastore.NewQuery("Map")

	keys, err := c.DatastoreClient().GetAll(ctx, q, &Maps)

	if err != nil {
		return nil, fmt.Errorf("datastoredb: could not list Maps: %v", err)
	}

	for i, k := range keys {
		Maps[i].ID = k.ID()
	}

	return Maps, nil
}
986204
func (n *healthNode) Addresses() map[*models.NodeAddressingElement]bool {
	addresses := map[*models.NodeAddressingElement]bool{}
	if n.NodeElement.PrimaryAddress != nil {
		addr := n.NodeElement.PrimaryAddress
		addresses[addr.IPV4] = addr.IPV4.Enabled
		addresses[addr.IPV6] = addr.IPV6.Enabled
	}
	if n.NodeElement.HealthEndpointAddress != nil {
		addresses[n.NodeElement.HealthEndpointAddress.IPV4] = false
		addresses[n.NodeElement.HealthEndpointAddress.IPV6] = false
	}
	for _, elem := range n.NodeElement.SecondaryAddresses {
		addresses[elem] = false
	}
	return addresses
}
418855
func (dev *LinkLayerDevice) Addresses() ([]*Address, error) {
	var allAddresses []*Address
	callbackFunc := func(resultDoc *ipAddressDoc) {
		allAddresses = append(allAddresses, newIPAddress(dev.st, *resultDoc))
	}

	findQuery := findAddressesQuery(dev.doc.MachineID, dev.doc.Name)
	if err := dev.st.forEachIPAddressDoc(findQuery, callbackFunc); err != nil {
		return nil, errors.Trace(err)
	}
	return allAddresses, nil
}
122028
func mapFields(fields []string) map[string]uint16 {
	rv := make(map[string]uint16, len(fields))
	for i, fieldName := range fields {
		rv[fieldName] = uint16(i) + 1
	}
	return rv
}
364990
func (c *Client) NodeMap(id int32, m map[string]int32) error {
	msg := osc.Message{
		Address: nodeMapAddress,
		Arguments: osc.Arguments{
			osc.Int(id),
		},
	}
	for k, v := range m {
		msg.Arguments = append(msg.Arguments, osc.String(k))
		msg.Arguments = append(msg.Arguments, osc.Int(v))
	}
	return c.oscConn.Send(msg)
}
106266
func maps(e CtEndpoint, ipv4, ipv6 bool) []*Map {
	result := make([]*Map, 0, mapCount)
	if e == nil {
		if ipv4 {
			result = append(result, NewMap(MapNameTCP4Global, MapTypeIPv4TCPGlobal))
			result = append(result, NewMap(MapNameAny4Global, MapTypeIPv4AnyGlobal))
		}
		if ipv6 {
			result = append(result, NewMap(MapNameTCP6Global, MapTypeIPv6TCPGlobal))
			result = append(result, NewMap(MapNameAny6Global, MapTypeIPv6AnyGlobal))
		}
	} else {
		if ipv4 {
			result = append(result, NewMap(bpf.LocalMapName(MapNameTCP4, uint16(e.GetID())),
				MapTypeIPv4TCPLocal))
			result = append(result, NewMap(bpf.LocalMapName(MapNameAny4, uint16(e.GetID())),
				MapTypeIPv4AnyLocal))
		}
		if ipv6 {
			result = append(result, NewMap(bpf.LocalMapName(MapNameTCP6, uint16(e.GetID())),
				MapTypeIPv6TCPLocal))
			result = append(result, NewMap(bpf.LocalMapName(MapNameAny6, uint16(e.GetID())),
				MapTypeIPv6AnyLocal))
		}
	}
	return result
}
200969
func (e Endpoints) GetAddresses(ctx context.Context, profileID string) ([]Address, error) {
	request := getAddressesRequest{ProfileID: profileID}
	response, err := e.GetAddressesEndpoint(ctx, request)
	if err != nil {
		return nil, err
	}
	resp := response.(getAddressesResponse)
	return resp.Addresses, resp.Err
}
972778
func (n *NIC) Addresses() []tcpip.ProtocolAddress {
	n.mu.RLock()
	defer n.mu.RUnlock()
	addrs := make([]tcpip.ProtocolAddress, 0, len(n.endpoints))
	for nid, ep := range n.endpoints {
		addrs = append(addrs, tcpip.ProtocolAddress{
			Protocol: ep.protocol,
			Address:  nid.LocalAddress,
		})
	}
	return addrs
}
933989
func (p *PUPolicy) IPAddresses() ExtendedMap {
	p.Lock()
	defer p.Unlock()

	return p.ips.Copy()
}
628180
func (o *MultiCastList) MultiCastChannelMaps(info *bambou.FetchingInfo) (MultiCastChannelMapsList, *bambou.Error) {

	var list MultiCastChannelMapsList
	err := bambou.CurrentSession().FetchChildren(o, MultiCastChannelMapIdentity, &list, info)
	return list, err
}
285291
func (a *InstancePollerAPI) ProviderAddresses(args params.Entities) (params.MachineAddressesResults, error) {
	result := params.MachineAddressesResults{
		Results: make([]params.MachineAddressesResult, len(args.Entities)),
	}
	canAccess, err := a.accessMachine()
	if err != nil {
		return result, err
	}
	for i, arg := range args.Entities {
		machine, err := a.getOneMachine(arg.Tag, canAccess)
		if err == nil {
			addrs := machine.ProviderAddresses()
			result.Results[i].Addresses = params.FromNetworkAddresses(addrs...)
		}
		result.Results[i].Error = common.ServerError(err)
	}
	return result, nil
}
669631
func NetworkAddresses(addrs ...Address) []network.Address {
	naddrs := make([]network.Address, len(addrs))
	for i, addr := range addrs {
		naddrs[i] = addr.NetworkAddress()
	}
	return naddrs
}
195988
func (m *Machine) ProviderAddresses() (addresses []network.Address) {
	for _, address := range m.doc.Addresses {
		addresses = append(addresses, address.networkAddress())
	}
	return
}
961312
func (o *Me) PATMappers(info *bambou.FetchingInfo) (PATMappersList, *bambou.Error) {

	var list PATMappersList
	err := bambou.CurrentSession().FetchChildren(o, PATMapperIdentity, &list, info)
	return list, err
}
652640
func (m *Machine) MachineAddresses() (addresses []network.Address) {
	for _, address := range m.doc.MachineAddresses {
		addresses = append(addresses, address.networkAddress())
	}
	return
}
746016
func DirEntryMapToDirEntries(entryMap map[string]DirEntry) DirEntries {
	dirEntries := make(DirEntries, 0, len(entryMap))
	for name, entry := range entryMap {
		dirEntries = append(dirEntries, DirEntryWithName{entry, name})
	}
	return dirEntries
}