macaddr

package
v0.8.3-49-g79ce693d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 18, 2024 License: BSD-3-Clause Imports: 2 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL