// MacAddress returns an mac address string
356105
func MacAddress() string {
	blocks := []string{}
	for i := 0; i < 6; i++ {
		number := fmt.Sprintf("%02x", privateRand.Intn(255))
		blocks = append(blocks, number)
	}

	return strings.Join(blocks, ":")
}
965082
func (s *NetworkInterface) SetMacAddress(v string) *NetworkInterface {
	s.MacAddress = &v
	return s
}
41535
func CreateAddress(b common.Address, nonce uint64) common.Address {
	data, _ := rlp.EncodeToBytes([]interface{}{b, nonce})
	return common.BytesToAddress(Keccak256(data)[12:])
}
951357
func ParseMAC(s string) (MACAddress, error) {
	hw, err := net.ParseMAC(s)
	return (MACAddress)(hw), err
}
99537
func (a arping) broadcastMACAddress(address boship.InterfaceAddress) {
	ip, err := address.GetIP()
	if err != nil {
		a.logger.Info(arpingLogTag, "Ignoring GetIP failure: %s", err.Error())
		return
	}

	ifaceName := address.GetInterfaceName()

	_, _, _, err = a.cmdRunner.RunCommand("arping", "-c", "1", "-U", "-I", ifaceName, ip)
	if err != nil {
		a.logger.Info(arpingLogTag, "Ignoring arping failure: %s", err.Error())
	}
}
699195
func (d *HypervPS4Driver) IpAddress(mac string) (string, error) {
	res, err := hyperv.IpAddress(mac)

	if err != nil {
		return res, err
	}

	if res == "" {
		err := fmt.Errorf("%s", "No ip address.")
		return res, err
	}
	return res, err
}
208294
func (h *CryptocurrencyHandler) RegisterAddress(nctx context.Context, arg keybase1.RegisterAddressArg) (keybase1.RegisterAddressRes, error) {
	uis := libkb.UIs{
		LogUI:     h.getLogUI(arg.SessionID),
		SecretUI:  h.getSecretUI(arg.SessionID, h.G()),
		SessionID: arg.SessionID,
	}
	eng := engine.NewCryptocurrencyEngine(h.G(), arg)
	m := libkb.NewMetaContext(nctx, h.G()).WithUIs(uis)
	err := engine.RunEngine2(m, eng)
	res := eng.Result()
	return res, err
}
1085860
func (s *PublicEndpoint) SetAddress(v string) *PublicEndpoint {
	s.Address = &v
	return s
}
827358
func putAddress(ns walletdb.ReadWriteBucket, scope *KeyScope,
	addressID []byte, row *dbAddressRow) error {

	scopedBucket, err := fetchWriteScopeBucket(ns, scope)
	if err != nil {
		return err
	}

	bucket := scopedBucket.NestedReadWriteBucket(addrBucketName)

	// Write the serialized value keyed by the hash of the address.  The
	// additional hash is used to conceal the actual address while still
	// allowed keyed lookups.
	addrHash := sha256.Sum256(addressID)
	err = bucket.Put(addrHash[:], serializeAddressRow(row))
	if err != nil {
		str := fmt.Sprintf("failed to store address %x", addressID)
		return managerError(ErrDatabase, str, err)
	}

	// Update address account index
	return putAddrAccountIndex(ns, scope, row.account, addrHash[:])
}
84284
func (ipv6 IPv6Addr) NetworkAddress() IPv6Network {
	addr := new(big.Int)
	addr.SetBytes((*ipv6.Address).Bytes())

	mask := new(big.Int)
	mask.SetBytes(*ipv6.NetIPMask())

	netAddr := new(big.Int)
	netAddr.And(addr, mask)

	return IPv6Network(netAddr)
}
374599
func (u *Unit) PublicAddress() (network.Address, error) {
	if !u.ShouldBeAssigned() {
		return u.scopedAddress("public")
	}
	m, err := u.machine()
	if err != nil {
		unitLogger.Tracef("%v", err)
		return network.Address{}, errors.Trace(err)
	}
	return m.PublicAddress()
}
911789
func IpV6Address() string {
	var ip net.IP
	for i := 0; i < net.IPv6len; i++ {
		number := uint8(privateRand.Intn(255))
		ip = append(ip, number)
	}
	return ip.String()
}
679622
func (o *DeleteNodesMacaddressDhcpWhitelistParams) WithMacaddress(macaddress string) *DeleteNodesMacaddressDhcpWhitelistParams {
	o.Macaddress = macaddress
	return o
}
771975
func (l *Link) SetLinkMacAddress(macaddr string) error {
	return netlink.NetworkSetMacAddress(l.NetInterface(), macaddr)
}
846456
func (c *Client) PublicAddress(target string) (string, error) {
	var results params.PublicAddressResults
	p := params.PublicAddress{Target: target}
	err := c.facade.FacadeCall("PublicAddress", p, &results)
	return results.PublicAddress, err
}
569521
func (c Context) MACAddr(key string, ha net.HardwareAddr) Context {
	c.l.context = enc.AppendMACAddr(enc.AppendKey(c.l.context, key), ha)
	return c
}
842542
func (msg *MsgAddr) AddAddress(na *NetAddress) error {
	if len(msg.AddrList)+1 > MaxAddrPerMsg {
		str := fmt.Sprintf("too many addresses in message [max %v]",
			MaxAddrPerMsg)
		return messageError("MsgAddr.AddAddress", str)
	}

	msg.AddrList = append(msg.AddrList, na)
	return nil
}