From owner-dev-commits-src-branches@freebsd.org  Fri Aug 20 21:36:22 2021
Return-Path: <owner-dev-commits-src-branches@freebsd.org>
Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2698A667E9A;
 Fri, 20 Aug 2021 21:36:22 +0000 (UTC) (envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org
 [IPv6:2610:1c1:1:606c::19:3])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
 client-signature RSA-PSS (4096 bits) client-digest SHA256)
 (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id 4Grw1f0Yzmz3HQL;
 Fri, 20 Aug 2021 21:36:22 +0000 (UTC) (envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:5])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
 (Client did not present a certificate)
 by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EFCFA205B3;
 Fri, 20 Aug 2021 21:36:21 +0000 (UTC) (envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
 by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17KLaLsM082351;
 Fri, 20 Aug 2021 21:36:21 GMT (envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
 by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17KLaLFT082350;
 Fri, 20 Aug 2021 21:36:21 GMT (envelope-from git)
Date: Fri, 20 Aug 2021 21:36:21 GMT
Message-Id: <202108202136.17KLaLFT082350@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
 dev-commits-src-branches@FreeBSD.org
From: Kevin Bowling <kbowling@FreeBSD.org>
Subject: git: 778488b9254b - stable/12 - man: document ether_gen_addr(9)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: kbowling
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/12
X-Git-Reftype: branch
X-Git-Commit: 778488b9254ba53e1a86e139f25df90fabe0784a
Auto-Submitted: auto-generated
X-BeenThere: dev-commits-src-branches@freebsd.org
X-Mailman-Version: 2.1.34
Precedence: list
List-Id: Commits to the stable branches of the FreeBSD src repository
 <dev-commits-src-branches.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/dev-commits-src-branches>, 
 <mailto:dev-commits-src-branches-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/dev-commits-src-branches/>
List-Post: <mailto:dev-commits-src-branches@freebsd.org>
List-Help: <mailto:dev-commits-src-branches-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/dev-commits-src-branches>, 
 <mailto:dev-commits-src-branches-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Fri, 20 Aug 2021 21:36:22 -0000

The branch stable/12 has been updated by kbowling (ports committer):

URL: https://cgit.FreeBSD.org/src/commit/?id=778488b9254ba53e1a86e139f25df90fabe0784a

commit 778488b9254ba53e1a86e139f25df90fabe0784a
Author:     Kyle Evans <kevans@FreeBSD.org>
AuthorDate: 2021-04-16 01:08:27 +0000
Commit:     Kevin Bowling <kbowling@FreeBSD.org>
CommitDate: 2021-08-20 21:35:34 +0000

    man: document ether_gen_addr(9)
    
    This KPI is used to assign a MAC address to an interface that doesn't
    already have one assigned.
    
    Reviewed by:    bcr, gnn, imp, kbowling, kp
    MFC after:      3 days
    Differential Revision:  https://reviews.freebsd.org/D29787
    
    (cherry picked from commit e58a65ccdac352712e19a60fffa57a86afabbde9)
---
 share/man/man9/Makefile         |  1 +
 share/man/man9/ether_gen_addr.9 | 79 +++++++++++++++++++++++++++++++++++++++++
 2 files changed, 80 insertions(+)

diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile
index 7a4fc64f5f88..ef9c1cc9c674 100644
--- a/share/man/man9/Makefile
+++ b/share/man/man9/Makefile
@@ -127,6 +127,7 @@ MAN=	accept_filter.9 \
 	DRIVER_MODULE.9 \
 	efirt.9 \
 	epoch.9 \
+	ether_gen_addr.9 \
 	EVENTHANDLER.9 \
 	eventtimers.9 \
 	extattr.9 \
diff --git a/share/man/man9/ether_gen_addr.9 b/share/man/man9/ether_gen_addr.9
new file mode 100644
index 000000000000..1b98a841736d
--- /dev/null
+++ b/share/man/man9/ether_gen_addr.9
@@ -0,0 +1,79 @@
+.\"
+.\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+.\"
+.\" Copyright (C) 2021 Kyle Evans <kevans@FreeBSD.org>
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice(s), this list of conditions and the following disclaimer as
+.\"    the first lines of this file unmodified other than the possible
+.\"    addition of one or more copyright notices.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice(s), this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``AS IS'' AND ANY
+.\" EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+.\" DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) BE LIABLE FOR ANY
+.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+.\" CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+.\" DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd June 1, 2021
+.Dt ETHER_GEN_ADDR 9
+.Os
+.Sh NAME
+.Nm ether_gen_addr
+.Nd "generate an arbitrary MAC address for use"
+.Sh SYNOPSIS
+.In sys/types.h
+.In sys/socket.h
+.In net/if.h
+.In net/if_var.h
+.In net/ethernet.h
+.Ft void
+.Fn ether_gen_addr "struct ifnet *ifp" "struct ether_addr *hwaddr"
+.Sh DESCRIPTION
+The
+.Fn ether_gen_addr
+function generates an arbitrary MAC address for use by an ethernet interface
+that does not have an assigned address.
+.Pp
+By default,
+.Nm
+attempts to generate a stable MAC address using the hostid of the jail that
+the
+.Ar ifp
+is being added to.
+During early boot, the hostid may not be set on machines that haven't yet
+populated
+.Pa /etc/hostid ,
+or on machines that do not use
+.Xr loader 8 .
+.Pp
+.Nm
+can fail to derive a MAC address due to memory allocation failure.
+In this case, a locally-administered unicast MAC address will be randomly
+generated and returned via the
+.Ar hwaddr
+parameter.
+.Pp
+If
+.Nm
+succeeds, then it will return a MAC address in the FreeBSD Foundation OUI,
+.Dq 58:9c:fc ,
+via the
+.Ar hwaddr
+parameter.
+.Sh AUTHORS
+This manual page was written by
+.An Kyle Evans Aq Mt kevans@FreeBSD.org .