Documentation ¶
Overview ¶
SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2022, Unikraft GmbH and The KraftKit Authors. Licensed under the BSD-3-Clause License (the "License"). You may not use this file except in compliance with the License.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateMacAddress ¶
func GenerateMacAddress(startAtZero bool) (net.HardwareAddr, error)
GenerateMacAddress generates a pseudo-random MAC address. A positional argument startAtZero can be set to true which results in the MAC address returning a pseudo-random MAC address with its last byte set to zero. This is useful for iterative sequences of MAC addresses based on the same pseudo-random set.
func IncrementMacAddress ¶
func IncrementMacAddress(mac net.HardwareAddr) net.HardwareAddr
IncrementMacAddress increases the provided MAC address by 1 such that the implementer can use this method to sequence a series of MAC addresses in a set.
Types ¶
This section is empty.