From nobody Thu Mar 31 15:08:45 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 8B4481A4FE10; Thu, 31 Mar 2022 15:08:45 +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 4KTmsT2d68z3tx3; Thu, 31 Mar 2022 15:08:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1648739325; 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=G7JnEfnKlnUEYi9C+9NIo2fuY6/Wvjfb5wc/mnXbXRg=; b=UvZ5APiuHJBfNlB7d3G02hn66Mu0BLVoMbYq3KNtLwbHKIyXZHatuse1GOo1acLEiwREaJ s9BGFGSoNf7EsuiYMvYIT4xaCI1XHm2Y4/n/S7NimhaKnlGoz3b/Ixwd6pREsZ9WEyBOGe aF/Nd/Kp+wVPW1PfL1LsYL8KVJkAwzGVULiSC2D0VtnHMA6Ib99XdgUoNBE87XkWcmWygV eB/nDftUCyb2FgJuxOoTJMihvwD9WLdC5CeO+46ntg4eF2gaM3c/VUVu3bRGip8WM09wCh XnKBZDeeKzuxwd47gKkIAYFAuHV7szEQzsUAzff898JNRQ0SqX6/ws39DWt+lQ== 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 2227329BD8; Thu, 31 Mar 2022 15:08:45 +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 22VF8jcT013656; Thu, 31 Mar 2022 15:08:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 22VF8jjI013655; Thu, 31 Mar 2022 15:08:45 GMT (envelope-from git) Date: Thu, 31 Mar 2022 15:08:45 GMT Message-Id: <202203311508.22VF8jjI013655@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: 4d91c53a789c - main - ifconfig.8: Document "ifconfig -g groupname" 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: 4d91c53a789ca4cb8f6951d7bdc8a1bf80e858ff Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1648739325; 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=G7JnEfnKlnUEYi9C+9NIo2fuY6/Wvjfb5wc/mnXbXRg=; b=OmX+S4rRQpgnKneBlBqBCXuufGLaGYScSgQhyRuWW6Ekv+OLjQlic/yaGAXoLsYiIMKkn9 jgTRioWsMVchfxhSFU5N5qPYnWseTKH2+eIds//dxY/HNssLEiex2C7udTMR/7h6S4cBif /DLSeyR/uNuiqBZzPasmtbMqElQrW8295nhUIcp5D3TGKgDu6zAXt9iEMfkfnSq2dZHm98 joKDvRclqclU5uVsAnx5nPWqnH14M5ZS9HqXp6at4JuwSAxmJUFGFQwnYkKw59HnfLvFpq 5MnbZsFzubm//aoOnhAEhc4HIVZN3luqcE98kryjav8lN7yb6cg+qeHyQmSo2A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1648739325; a=rsa-sha256; cv=none; b=iyPFH61odjrMdk5ZHH6ikKzQsW/Onp2F/LFZR2gU0zy+83EQjpRPtNTNKBTrtOl0FEenE5 gEKoDmYMXMWRGT2Sr7CSlgOM2K6XX2JbNWo8pu+7kKa9Q9hi8UQ9/z1pYf2x9TTrP2GN6h /wRCNytGnpBKZDDtEKE/NRv5JSpg7W3e62quFubSVN9SClenvBFloh0PwxdMlHJpbqnJqn 9kPrnWmWqc4/4HzSfA9Nf1NhANbh/EY/+gk/6Ey7BRD6voNQdvKKEANsbVGLDEqSAX/ZOR XyUaeZIk8BV6FrWESP5+EMWzzdsswRZHgKxEO3NHLy8theC1GYDabL7a8DPhgA== 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=4d91c53a789ca4cb8f6951d7bdc8a1bf80e858ff commit 4d91c53a789ca4cb8f6951d7bdc8a1bf80e858ff Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2022-03-31 14:30:29 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2022-03-31 15:07:15 +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 --- sbin/ifconfig/ifconfig.8 | 50 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/sbin/ifconfig/ifconfig.8 b/sbin/ifconfig/ifconfig.8 index df5f58b81309..d09e2b2f4507 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