From nobody Wed Mar 30 13:01:22 2022 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 0F3101A4166C; Wed, 30 Mar 2022 13:01:23 +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 4KT64y4hvBz4Z99; Wed, 30 Mar 2022 13:01:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1648645282; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wktWhlF2fBkaWm3Cq/PHhwyg6Tsh+5FuDlRy0BorOfk=; b=KA1XbkwkfdiuZIl0jeGz6ufG52YUrjHF2XUx1RehGxhjE2ezdhk2x4zDHuMOfneuT7whVt dQpd4qN6HBLqOnyz9HFris0Tp650E0NI+OOEDcOaU0P7mjgs9iomkG/Zf+pcrN60LwhKpK uQUBTOpGFvNp8PAu59mJlcXtvW/5rJhtM3Fo84fjcHJ/k0DMxu7RI9Pj5nQjLSVnXWZA+r ruG5zYMCexxK6zoKOKvjzzLNXA9t0w5uo1aerJNB7Fa1zSlPiqNrm8DlLyKJ6Pajf65+nT v2CYBTEFDOqTi/eHtjBIMEQ5LHr0hQW6izQyQlZlcUUq3uvG5pNCUzVfCGXKjA== 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 6AD5913841; Wed, 30 Mar 2022 13:01:22 +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 22UD1Mqp098571; Wed, 30 Mar 2022 13:01:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 22UD1MXI098570; Wed, 30 Mar 2022 13:01:22 GMT (envelope-from git) Date: Wed, 30 Mar 2022 13:01:22 GMT Message-Id: <202203301301.22UD1MXI098570@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: f4f02fa1e33a - main - ifconfig.8: Clean up formatting of -f documentation List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f4f02fa1e33a0fdbe8e225574beb07ab672128ea Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1648645282; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wktWhlF2fBkaWm3Cq/PHhwyg6Tsh+5FuDlRy0BorOfk=; b=ubTxX8Ft9bGnb57LmBSJZMmhdIdqrHRkv+EakVJup+56/NGxV9b0jkEqJqx/8wsJZnAn/x Tihp16P70Q7sTvu+9vcHRrNEi8lsWUs8r5HRVgVevT+2+YbU9FaSCJd2I8LSpfyF068w30 8DJjDYqQRH57cztgpam1m97ugTaQ/b5ItJJl70Ad/FXjY3KMVtnGP/cHWVKBBrAbmjad0N WcRukkgd+8+VKylULmoJaqi/IMs6dOMuiB/u106v/hmydPsW5TSIWvkljHzhlKdeKEkcl0 QxbmGdezloAbr8kmP0YNZCsor6KWlvwAL985ao14/fBHw1BFHLSWHdj/C0CTYQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1648645282; a=rsa-sha256; cv=none; b=WilLFv4AG3zCRuzXVFXaRhKwp2WZzkvpe4F8EFUA9SheNYl/BNLtEF8xBPRIXvzuhm+1LR hj+j7Nd+9XbpvUh2RGuku92F297c+3rZ0UqKViYDdFjjYI4gcbntT3ursn+PqNYlvxYOGa zyC+GRYE0VFmbyFsRDg0RY8IGKI6CgpVM0GkQUlXLopSqJPYyllg/g98lq+qyDl9edmdsD esAOhe2O2xNSi94SHfC0J04rUEB2V0I6Obfs3z+AJjeM5A9FZLJOjtRl3EZCRSEbYBs0Qj qP1AsqJ0x9b3sGgx/1tJ9UQDvCbVnCZw1uEqz+pVDLmFS5YcehHMtHRG8Kj/EA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by 0mp (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=f4f02fa1e33a0fdbe8e225574beb07ab672128ea commit f4f02fa1e33a0fdbe8e225574beb07ab672128ea Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2022-03-30 10:40:53 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2022-03-30 12:58:33 +0000 ifconfig.8: Clean up formatting of -f documentation This change is about moving the -f documentation into the right place in the manual. Also, document the IFCONFIG_FORMAT variable in the ENVIRONMENT section. MFC after: 2 weeks --- sbin/ifconfig/ifconfig.8 | 183 ++++++++++++++++++++++++++--------------------- 1 file changed, 100 insertions(+), 83 deletions(-) diff --git a/sbin/ifconfig/ifconfig.8 b/sbin/ifconfig/ifconfig.8 index b7c1c1153364..69ddbad73cab 100644 --- a/sbin/ifconfig/ifconfig.8 +++ b/sbin/ifconfig/ifconfig.8 @@ -82,6 +82,96 @@ or other operating parameters. .Pp The following options are available: .Bl -tag -width indent +.It Fl f Xo +.Ar type Ns Cm \&: Ns Ar format Ns +.Op Cm \&, Ns Ar type Ns Cm \&: Ns Ar format Ar ... +.Xc +Control the output format of +.Nm . +The format is specified as a comma-separated list of +.Ar type Ns Cm \&: Ns Ar format +pairs +.Po see the +.Sx EXAMPLES +section for more information +.Pc . +.Pp +The output format can also be specified via the +.Ev IFCONFIG_FORMAT +environment variable. +The +.Fl f +flag can be supplied multiple times. +.Pp +The +.Ar type Ns s +and their associated +.Ar format +strings are: +.Bl -tag -width ether +.It Cm addr +Adjust the display of inet and inet6 addresses: +.Bl -tag -width default +.It Cm default +Display inet and inet6 addresses in the default format, +.Cm numeric +.It Cm fqdn +Display inet and inet6 addresses as fully qualified domain names +.Pq FQDN +.It Cm host +Display inet and inet6 addresses as unqualified hostnames +.It Cm numeric +Display inet and inet6 addresses in numeric format +.El +.It Cm ether +Adjust the display of link-level ethernet (MAC) addresses: +.Bl -tag -width default +.It Cm colon +Separate address segments with a colon +.It Cm dash +Separate address segments with a dash +.It Cm default +Display ethernet addresses in the default format, +.Cm colon +.El +.It Cm inet +Adjust the display of inet address subnet masks: +.Bl -tag -width default +.It Cm cidr +Display subnet masks in CIDR notation, for example: +.Dl 10.0.0.0/8 +or +.Dl 203.0.113.224/26 +.It Cm default +Display subnet masks in the default format, +.Cm hex +.It Cm dotted +Display subnet masks in dotted quad notation, for example: +.Dl 255.255.0.0 +or +.Dl 255.255.255.192 +.It Cm hex +Display subnet masks in hexadecimal, for example: +.Dl 0xffff0000 +or +.Dl 0xffffffc0 +.El +.It Cm inet6 +Adjust the display of inet6 address prefixes (subnet masks): +.Bl -tag -width default +.It Cm cidr +Display subnet prefix in CIDR notation, for example: +.Dl ::1/128 +or +.Dl fe80::1%lo0/64 +.It Cm default +Display subnet prefix in the default format +.Cm numeric +.It Sy numeric +Display subnet prefix in integer format, for example: +.Dl prefixlen 64 +.El +.El .It Ar address For the DARPA-Internet family, the address is either a host name present in the host name data @@ -185,89 +275,6 @@ for example, .Dq Li em0 . .El .Pp -The output format of -.Nm -can be controlled using the -.Fl f -flag or the -.Ev IFCONFIG_FORMAT -environment variable. -The format is specified as a comma separated list of -.Sy type:format -pairs. -The -.Fl f -flag can be supplied multiple times. -See the -.Sx EXAMPLES -section for more information. -The -.Sy types -and their associated -.Sy format -strings are: -.Bl -tag -width ether -.It Sy addr -Adjust the display of inet and inet6 addresses -.Bl -tag -width default -.It Sy default -Display inet and inet6 addresses in the default format, -.Sy numeric -.It Sy fqdn -Display inet and inet6 addresses as fully qualified domain names -.Pq FQDN -.It Sy host -Display inet and inet6 addresses as unqualified hostnames -.It Sy numeric -Display inet and inet6 addresses in numeric format -.El -.It Sy ether -Adjust the display of link-level ethernet (MAC) addresses -.Bl -tag -width default -.It Sy colon -Separate address segments with a colon -.It Sy dash -Separate address segments with a dash -.It Sy default -Display ethernet addresses in the default format, -.Sy colon -.El -.It Sy inet -Adjust the display of inet address subnet masks: -.Bl -tag -width default -.It Sy cidr -Display subnet masks in CIDR notation, for example: -.br -10.0.0.0/8 or 203.0.113.224/26 -.It Sy default -Display subnet masks in the default format, -.Sy hex -.It Sy dotted -Display subnet masks in dotted quad notation, for example: -.br -255.255.0.0 or 255.255.255.192 -.It Sy hex -Display subnet masks in hexadecimal, for example: -.br -0xffff0000 or 0xffffffc0 -.El -.It Sy inet6 -Adjust the display of inet6 address prefixes (subnet masks): -.Bl -tag -width default -.It Sy cidr -Display subnet prefix in CIDR notation, for example: -.br -::1/128 or fe80::1%lo0/64 -.It Sy default -Display subnet prefix in the default format -.Sy numeric -.It Sy numeric -Display subnet prefix in integer format, for example: -.br -prefixlen 64 -.El -.El -.Pp The .Nm utility displays the current configuration for a network interface @@ -3007,6 +3014,16 @@ Set the authentication key to .It Cm state Ar MASTER|BACKUP Forcibly change state of a given vhid. .El +.Sh ENVIRONMENT +The following environment variables affect the execution of +.Nm : +.Bl -tag -width IFCONFIG_FORMAT +.It Ev IFCONFIG_FORMAT +This variable can contain a specification of the output format. +See the description of the +.Fl f +flag for more details. +.El .Sh EXAMPLES Assign the IPv4 address .Li 192.0.2.10 ,