From nobody Wed Jun 29 08:19:11 2022 X-Original-To: dev-commits-src-all@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 C6D3D8A705E; Wed, 29 Jun 2022 08:19:11 +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 4LXvWM3z1bz4kLy; Wed, 29 Jun 2022 08:19:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1656490751; 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=n30dpOH043HnAMd2D0rL3GRaN9pngfKncUtp5S1ZRIs=; b=p4aJsd57cZprIzvhE90A2VkKWOqEdGOfdgfZDVz/kpSYdD7N3e37SOhFwrWVIMimOJzX9x 2M7fe3PFUx9GN+0adahEItdWhi988GTvpAIgldXJM0Jgg+rpKMT3E5mSEILjbwSa/SAlFQ LR3Vftqu06qDQewVX00/Ph4/FA//0VGWL5AiVKy9DT+4UKS8dynQxkavwhNIOjsgiB9jga OZ6QlR+F97kNggizc4qxWzLGp12oik91XKPC8ed+gMDi0zb8XArnSPtuKqNNhQBre9DiLx xMrAXIb76xeYJ/TRlvk8FXhU8VNMqd+/N/JWi95ocr1GfsRuA1nKVPIsG5XuXw== 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 525D26118; Wed, 29 Jun 2022 08:19:11 +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 25T8JBnp004952; Wed, 29 Jun 2022 08:19:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 25T8JBFL004951; Wed, 29 Jun 2022 08:19:11 GMT (envelope-from git) Date: Wed, 29 Jun 2022 08:19:11 GMT Message-Id: <202206290819.25T8JBFL004951@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 5fa8bc5a5e7b - stable/13 - ifconfig.8: Clean up formatting of -f documentation List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 5fa8bc5a5e7bd0a62f81575de0c98111ae5a5a6b Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1656490751; 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=n30dpOH043HnAMd2D0rL3GRaN9pngfKncUtp5S1ZRIs=; b=bUqVXR4CZvTQsREhbOYgKmYS8hNsSz3Bx9ygp2lW2NmpU/d5mEPBJIbkCMlSMa4v9hmD3/ zGTz7RGgmeiTkUdcqJV9uTML+mvu7cN36lBrlUX8fMe+yBS1V32tBn4sok5U/ZJU1J0rxi rPrdtIX5pl/n1HWVcYIWmMasLlR4Ri0e57TqVakLlIPNh+Lis7DdeO9w8VmqzCXfFPmCPV 55GbVjp5QCKSA4WttH5M6hO31YSC5HAPr5dWdDoRkuiBF2vGniCt6G3+HhuNFH64sa9+ep e/yyg9c03BAb/q9JnWmWtaBmNSIaOIGxmZ92rVGs0/e8kUlSKykyrSAA65xDhg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1656490751; a=rsa-sha256; cv=none; b=b7nane8lcmnhy5HOGRhEDbceYmZYiUX1IS6CfPH6frcLPt1INr60qLACYZFhMRWPcxPu5h ggHtsLyv3RfWvos6AbJdO6lzLkdfh1RoNrkigrLfWcNuYwp5tYSiuIyAw+ZjKR8GIozn+K j3bY9DjY6ouuI7acx2Lj3OwRWWoGedZkbjesUNFKTKnvvsFDLJk22NCb86x7GFFaZdwdRJ TjsPGLdYMJXyqemQBDeRwcM+2mgPbkOyw+Kmzc2OA1dvjKtJ1OgOqg1t1h/xpzdfMLw/ut 8GVl09ttzfOCtO8v6wnsNXoM4Fj1h9tdIqZVTG8cBihMcttONpaVNI89mSofvg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by 0mp (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=5fa8bc5a5e7bd0a62f81575de0c98111ae5a5a6b commit 5fa8bc5a5e7bd0a62f81575de0c98111ae5a5a6b Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2022-03-30 10:40:53 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2022-06-29 08:05:45 +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 (cherry picked from commit f4f02fa1e33a0fdbe8e225574beb07ab672128ea) --- 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 9260a8c508d3..4deeee1dbb5d 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 ,