| Summary: | [patch] ifconfig.8 man page address_family paragraph needs clarification | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Documentation | Reporter: | Andrew Merenbach <andrew> | ||||
| Component: | Books & Articles | Assignee: | freebsd-doc (Nobody) <doc> | ||||
| Status: | Closed FIXED | ||||||
| Severity: | Affects Only Me | ||||||
| Priority: | Normal | ||||||
| Version: | Latest | ||||||
| Hardware: | Any | ||||||
| OS: | Any | ||||||
| Attachments: |
|
||||||
Author: allanjude (doc committer) Date: Tue May 27 20:45:15 2014 New Revision: 266774 URL: http://svnweb.freebsd.org/changeset/base/266774 Log: improve ifconfig(8) man page by describing special behaviour of -l ether PR: docs/187644 Submitted by: Andrew Merenbach (original patch) Approved by: bcr (mentor) Modified: head/sbin/ifconfig/ifconfig.8 Modified: head/sbin/ifconfig/ifconfig.8 ============================================================================== --- head/sbin/ifconfig/ifconfig.8 Tue May 27 20:22:36 2014 (r266773) +++ head/sbin/ifconfig/ifconfig.8 Tue May 27 20:45:15 2014 (r266774) @@ -169,6 +169,18 @@ and .Dq lladdr are synonyms for .Dq link . +When using the +.Fl l +flag, the +.Dq ether +address family has special meaning and is no longer synonymous with +.Dq link +or +.Dq lladdr . +Specifying +.Fl l Dq ether +will list only ethernet interfaces, excluding all other interface types, +including the loopback interface. .It Ar dest_address Specify the address of the correspondent on the other end of a point to point link. @@ -2554,6 +2566,11 @@ The .Fl l flag may be used to list all available interfaces on the system, with no other additional information. +If an +.Ar address_family +is specified, only interfaces of that type will be listed. +.Fl l Dq ether +will list only ethernet adapters, excluding the loopback interface. Use of this flag is mutually exclusive with all other flags and commands, except for .Fl d _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" State Changed From-To: open->closed fix committed r266774 |
man 8 ifconfig states the following: address_family Specify the address family which affects interpretation of the remaining parameters. Since an interface can receive transmis‐ sions in differing protocols with different naming schemes, spec‐ ifying the address family is recommended. The address or proto‐ col families currently supported are inet, inet6, atalk, ipx, and link. The default if available is inet or other‐ wise link. ether and lladdr are synonyms for link. The last paragraph here asserts that link, ether, and lladdr are synonymous. When running ifconfig to check a list of available interfaces (-l flag) this does not appear to be the case. Fix: A patch is attached. I would not be surprised if someone knows of a better way to phrase this, though, so please let me know if I may revise. Fix is a modification to the last sentence of the man page, currently ifconfig.8:172-176. Preview of change included in patch: > The default if available is "inet" or otherwise "link". "ether" and "lladdr" are synonyms for "link". becomes > The default if available is "inet" or otherwise "link". "ether" and "lladdr" are synonyms for "link", with one caveat: if the -l flag is specified in conjunction with the ether address family, non-ethernet interfaces will be excluded in the output. Patch attached with submission follows: How-To-Repeat: What I see: $ ifconfig -l link em0 lo0 $ ifconfig -l lladdr em0 lo0 $ ifconfig -l ether em0 What I expected to see: $ ifconfig -l link em0 lo0 $ ifconfig -l lladdr em0 lo0 $ ifconfig -l ether em0 lo0 Since the source code (ifconfig.c:328) contains a 'special case for "ether" address family' that appears to exclude layer 2 vlan, bridge, and straight-out Ethernet interfaces, I feel that the documentation should be updated to reflect this.