2 .\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD
4 .\" Copyright (C) 2021 Kyle Evans <kevans@FreeBSD.org>
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\" notice(s), this list of conditions and the following disclaimer as
11 .\" the first lines of this file unmodified other than the possible
12 .\" addition of one or more copyright notices.
13 .\" 2. Redistributions in binary form must reproduce the above copyright
14 .\" notice(s), this list of conditions and the following disclaimer in the
15 .\" documentation and/or other materials provided with the distribution.
17 .\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``AS IS'' AND ANY
18 .\" EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19 .\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20 .\" DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) BE LIABLE FOR ANY
21 .\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
22 .\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
23 .\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
24 .\" CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
36 .Nd "generate an arbitrary MAC address for use"
44 .Fn ether_gen_addr "struct ifnet *ifp" "struct ether_addr *hwaddr"
48 function generates an arbitrary MAC address for use by an ethernet interface
49 that does not have an assigned address.
53 attempts to generate a stable MAC address using the hostid of the jail that
57 During early boot, the hostid may not be set on machines that haven't yet
60 or on machines that do not use
64 can fail to derive a MAC address due to memory allocation failure, or because
65 the hostid has not been populated.
66 In these cases, a locally-administered unicast MAC address will be randomly
67 generated and returned via the
73 succeeds, then it will return a MAC address in the FreeBSD Foundation OUI,
79 This manual page was written by
80 .An Kyle Evans Aq Mt kevans@FreeBSD.org .