From nobody Wed Jun 29 08:19:35 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 2C4F78605A2; Wed, 29 Jun 2022 08:19:36 +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 4LXvWq3hRRz4kJ9; Wed, 29 Jun 2022 08:19:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1656490775; 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=+NA/n9BNscgqtLdvu6+qjUodzJ85++yv9cIKbhzk05k=; b=ydl9cMW3SOnuGkH5nrp+bRSNSfr91lumjDZbmcND2p33tZ9meWiz2zCGQCJ7pFvpKuQJNT VZWjs1I7kJrF3tD2WD7C+ed5hD+R80HNzzwlKsMd62O4stq5d1PKGElTYwP8hHqm1jKjoN 03zK6jFq/ZpxvHWnxXJn6epwJRowfsQp40O0PLOWbxPFw7ZukvTqUSa6l3ZNEIAhwnmW49 4vqXhbNtwOcoT+JnEDzuYcO7aqonL1MrCyK3lsc9cXsKEzU873SUsPTQxAE4SXFo/XmIZH ZE/PM3ki7oHpIuVn4UoR0MK5TnIrTCc3BWSoQSHAz/Zvrx+0Sv7BkyH7RFhi5A== 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 4A73C5D39; Wed, 29 Jun 2022 08:19:35 +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 25T8JZYm005480; Wed, 29 Jun 2022 08:19:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 25T8JZ8c005479; Wed, 29 Jun 2022 08:19:35 GMT (envelope-from git) Date: Wed, 29 Jun 2022 08:19:35 GMT Message-Id: <202206290819.25T8JZ8c005479@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: b879d2b81a4d - stable/13 - ifconfig.8: Document "ifconfig -g groupname" 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: b879d2b81a4da43536856842472c48ff5fb7267c Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1656490775; 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=+NA/n9BNscgqtLdvu6+qjUodzJ85++yv9cIKbhzk05k=; b=YesRTCm5nJBICfyZ0OCtTjl4Mq3y0bcfe783/gOA/a29RCfcl0RJpHs28cwlY+vo5vcg2m rqUx9bCGFmDf7jmN+MpU07f4EIKRBmIfVcxTfZC1muPjXTk/kq8hSsaCH050lRrV88Y/m6 rHf/LQOHIW2Hr423OglXMrFP4QNbiW5Sz+0SveFXcLbTBkqTD6/AIKVjRQzV14P/EEw7FC FXwfpOnS4gLtorV0LwH4AqIoytNQHFLKTbAE5nu2OTLX5Ef9zYSTQfr2v79yT7jLDyMSQE /YcZfbOO3Z1N84neFfC1//EyzPdiPe/J2VQPdomer2kJhABNJGeTSvjSLtuCCA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1656490775; a=rsa-sha256; cv=none; b=aDy/IDg8IluwQfZqbIgB+LMtD8lfWg9Twy2bK1qa6OI/5pDrXB7zC3JhXb7mK+zH1mqD2i 9ElnFuTdgwmAKjB7lSeK2cQHOsKxEzfzmp0ZoV564KeiDhd8KkDautcGcchFKvFc3sa/S2 5me8y2hGlKSpc6K7vGpIdHCt3XmAYne/8py8S4V1A6K/ovIMDTi9/4up1QZdcUnSUNPlZI aG3sSPKztJas+9lXnteBkY5y3TmwFWrFOvhFXQIq84TdeMso2CbzvF+z0vAsZCQUAN18AW E9uVQMlR0g8LRqcSSDd2exNa4mObfniN13cyHH0b0sFfmOKYyltSqiALMhf0nw== 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=b879d2b81a4da43536856842472c48ff5fb7267c commit b879d2b81a4da43536856842472c48ff5fb7267c Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2022-03-31 14:30:29 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2022-06-29 08:15:14 +0000 ifconfig.8: Document "ifconfig -g groupname" "ifconfig -g groupname" prints a list of interface names, which could be confusing, because it differs from the behavior of "ifconfig -a -g groupname". While here, add two examples showing the difference between "ifconfig -a -g groupname" and "ifconfig -g groupname". Fixes: 0dad3f0e1512 Import interface groups from OpenBSD. MFC after: 2 weeks (cherry picked from commit 4d91c53a789ca4cb8f6951d7bdc8a1bf80e858ff) --- sbin/ifconfig/ifconfig.8 | 50 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/sbin/ifconfig/ifconfig.8 b/sbin/ifconfig/ifconfig.8 index 7bd3b8cfe255..2b83d180e60d 100644 --- a/sbin/ifconfig/ifconfig.8 +++ b/sbin/ifconfig/ifconfig.8 @@ -202,6 +202,19 @@ may contain shell patterns in which case it should be quoted. Limit the output to the members of the specified .Ar groupname . .Pp +If +.Fl g +is specified before other significant flags like, e.g., +.Fl a , +.Fl l , +or +.Fl C , +then +.Nm +lists names of interfaces beloning to +.Ar groupname . +Any other flags and arguments are ignored in this case. +.Pp Only one option .Fl g should be specified as later override previous ones @@ -3129,6 +3142,43 @@ Display inet and inet6 address subnet masks in CIDR notation Display interfaces that are up with the exception of loopback .Dl # ifconfig -a -u -G lo .Pp +Display a list of interface names beloning to the wlan group: +.Bd -literal -offset indent -compact +# ifconfig -g wlan +wlan0 +wlan1 +.Ed +.Pp +Display details about the interfaces belonging to the wlan group: +.Bd -literal -offset indent -compact +# ifconfig -a -g wlan +wlan0: flags=8843 metric 0 mtu 1500 + ether 75:4c:61:6b:7a:73 + inet6 fe80::4c75:636a:616e:ffd8%wlan0 prefixlen 64 scopeid 0x3 + inet6 2001:5761:6e64:6152:6f6d:616e:fea4:ffe2 prefixlen 64 autoconf + inet 192.168.10.5 netmask 0xffffff00 broadcast 192.168.10.255 + groups: wlan + ssid "Hotspot" channel 11 (2462 MHz 11g) bssid 12:34:ff:ff:43:21 + regdomain ETSI country DE authmode WPA2/802.11i privacy ON + deftxkey UNDEF AES-CCM 2:128-bit AES-CCM 3:128-bit txpower 30 bmiss 10 + scanvalid 60 protmode CTS wme roaming MANUAL + parent interface: iwm0 + media: IEEE 802.11 Wireless Ethernet DS/2Mbps mode 11g + status: associated + nd6 options=23 +wlan1: flags=8843 metric 0 mtu 1500 + ether 00:50:69:6f:74:72 + groups: wlan + ssid "" channel 2 (2417 MHz 11g) + regdomain FCC country US authmode OPEN privacy OFF txpower 30 bmiss 7 + scanvalid 60 bgscan bgscanintvl 300 bgscanidle 250 roam:rssi 7 + roam:rate 5 protmode CTS wme bintval 0 + parent interface: rum0 + media: IEEE 802.11 Wireless Ethernet autoselect (autoselect) + status: no carrier + nd6 options=29 +.Ed +.Pp Set a randomly-generated MAC address on tap0: .Dl # ifconfig tap0 ether random .Sh DIAGNOSTICS