summaryrefslogtreecommitdiffstats
path: root/sbin/ifconfig
Commit message (Collapse)AuthorAgeFilesLines
* ifconfig: fix wlan creation when unit number is not providedavos2016-06-081-0/+7
| | | | | | | (was broken after r300738). Reported by: Yoshihiro Ota <ota@j.email.ne.jp>, adrian Tested by: Yoshihiro Ota <ota@j.email.ne.jp>
* Bump date on ifconfig(8) and vlan(4) to reflect the changes madearaujo2016-06-081-1/+1
| | | | on revision r301496.
* Add support to priority code point (PCP) that is an 3-bit fieldaraujo2016-06-062-6/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | which refers to IEEE 802.1p class of service and maps to the frame priority level. Values in order of priority are: 1 (Background (lowest)), 0 (Best effort (default)), 2 (Excellent effort), 3 (Critical applications), 4 (Video, < 100ms latency), 5 (Video, < 10ms latency), 6 (Internetwork control) and 7 (Network control (highest)). Example of usage: root# ifconfig em0.1 create root# ifconfig em0.1 vlanpcp 3 Note: The review D801 includes the pf(4) part, but as discussed with kristof, we won't commit the pf(4) bits for now. The credits of the original code is from rwatson. Differential Revision: https://reviews.freebsd.org/D801 Reviewed by: gnn, adrian, loos Discussed with: rwatson, glebius, kristof Tested by: many including Matthew Grooms <mgrooms__shrew.net> Obtained from: pfSense Relnotes: Yes
* Address feedback from hrs@ re: r301059 (ifconfig subnet mask)allanjude2016-06-025-67/+31
| | | | | | | | | | - Use NI_MAXHOST to size buffers for getnameinfo() - remove non-standard 'full' inet6 address printing - remove 'no scope' option - use strchr(3) to optimize replacing separator character in lladdrs Reviewed by: gnn, jhb Differential Revision: https://reviews.freebsd.org/D2856
* ifconfig(8) now supports some output formatting optionsallanjude2016-05-315-22/+250
| | | | | | | | | | | | | | | | specified by the -f flag or IFCONFIG_FORMAT environment variable, the user can request that inet4 subnet masks be printed in CIDR or dotted-quad notation, in addition to the traditional hex output. inet6 prefixes can be printed in CIDR as well. For more documentation see the ifconfig(8) man page. PR: 169072 Requested by: seanc, marcel, brd, many others Reviewed by: gnn, jhb (earlier version) Relnotes: yes Sponsored by: ScaleEngine Inc. Differential Revision: https://reviews.freebsd.org/D2856
* Add Documentation for missing ifconfig(8) flagsallanjude2016-05-291-0/+12
| | | | | | | | | | | autoconf / -autoconf deprecated / -deprecated pltime vltime PR: 209822 Submitted by: Sevan Janiyan <venture37@geeklan.co.uk> MFC after: 2 weeks
* ifconfig: set by default FCC regulatory domain for wireless interfaces.avos2016-05-261-0/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change default regulatory domain from DEBUG (no limitations; exposes all device channels) to FCC; as a result, newly created wireless interface with default settings will have less chances to violate country-specific regulations. This change will not affect drivers with pre-initialized regdomain structure (currentry ath(4) and mwl(4)); in that case, the default channel list must correspond to the default regdomain / country setting. You can switch to another regdomain / country via corresponding ifconfig(8) options; the driver must implement ic_getradiocaps() method to restore full channel list. Full country / regdomain list may be obtained via 'ifconfig <iface> list countries' command. Example: change country to Germany: ifconfig wlan0 down # all wlans on the device must be down ifconfig wlan0 country DE ifconfig wlan0 up # wpa_supplicant(8), dhclient(8) etc At the creation time: ifconfig wlan0 create wlandev wpi0 country DE To make changes permanent add the following line to the rc.conf(5): create_args_wlan0="country DE" Tested with - Intel 3945BG (wpi(4)). - WUSB54GC (rum(4)). Reviewed by: adrian Relnotes: yes Differential Revision: https://reviews.freebsd.org/D6228
* Add an assertion to catch a potential underflow in an array indextruckman2016-05-161-0/+1
| | | | | | | | calculation, though this should not happen in the current code. Reported by: Coverity CID: 1008486 MFC after: 3 weeks
* Use strlcpy() instead of strncpy() when copying ifname to ensuretruckman2016-05-1610-39/+41
| | | | | | | | | | | | | | | | | | that it is NUL terminated. Additional NUL padding is not required for short names. Use sizeof(destination) in a few places instead of IFNAMSIZ. Cast afp->af_ridreq and afp->af_addreq to make the intent of the code more obvious. Reported by: Coverity CID: 1009628, 1009630, 1009631, 1009632, 1009633, 1009635, 1009638 CID: 1009639, 1009640, 1009641, 1009642, 1009643, 1009644, 1009645 CID: 1009646, 1009647, 1010049, 1010050, 1010051, 1010052, 1010053 CID: 1010054, 1011293, 1011294, 1011295, 1011296, 1011297, 1011298 CID: 1011299, 1305821, 1351720, 1351721 MFC after: 1 week
* ifconfig: fix check for 40 MHz channels while applying country/regdomain.avos2016-05-091-4/+0
| | | | | | | | | Do not use 20 MHz channel list while checking 40 MHz channels; it may be different. Just use the corresponding list instead. Tested by: Masachika ISHIZUKA <ish@amail.plala.or.jp> PR: 209328
* Merge ^/user/ngie/release-pkg-fix-tests to unbreak how test files are installedngie2016-05-041-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | after r298107 Summary of changes: - Replace all instances of FILES/TESTS with ${PACKAGE}FILES. This ensures that namespacing is kept with FILES appropriately, and that this shouldn't need to be repeated if the namespace changes -- only the definition of PACKAGE needs to be changed - Allow PACKAGE to be overridden by callers instead of forcing it to always be `tests`. In the event we get to the point where things can be split up enough in the base system, it would make more sense to group the tests with the blocks they're a part of, e.g. byacc with byacc-tests, etc - Remove PACKAGE definitions where possible, i.e. where FILES wasn't used previously. - Remove unnecessary TESTSPACKAGE definitions; this has been elided into bsd.tests.mk - Remove unnecessary BINDIRs used previously with ${PACKAGE}FILES; ${PACKAGE}FILESDIR is now automatically defined in bsd.test.mk. - Fix installation of files under data/ subdirectories in lib/libc/tests/hash and lib/libc/tests/net/getaddrinfo - Remove unnecessary .include <bsd.own.mk>s (some opportunistic cleanup) Document the proposed changes in share/examples/tests/tests/... via examples so it's clear that ${PACKAGES}FILES is the suggested way forward in terms of replacing FILES. share/mk/bsd.README didn't seem like the appropriate method of communicating that info. MFC after: never probably X-MFC with: r298107 PR: 209114 Relnotes: yes Tested with: buildworld, installworld, checkworld; buildworld, packageworld Sponsored by: EMC / Isilon Storage Division
* Use macro MIN() from sys/param.h.araujo2016-04-271-2/+2
| | | | MFC after: 2 weeks.
* [ifconfig] add STBC TX/RX configurationadrian2016-04-261-1/+39
| | | | | | | | | | | This adds the ability to view and configure the STBC parameter for both transmit and receive. Whilst here, fix a typo for AMSDU. TODO: * manpage update
* ifconfig: prevent some improbable signed integer overflows.pfg2016-04-251-6/+6
| | | | | | | | | | | ic_nchans, from struct:ieee80211req_chaninfo, is an unsigned int. Use an unsigned index to prevent overflowing the index. Adopt unsigned integers in other cases where it is useful to be aware of the unsigned quantities and there is no risk of the values being negative. MFC after: 1 week
* Add VHT power envelope parsing to ifconfig.adrian2016-04-191-1/+36
|
* Use nitems() from sys/param.h.araujo2016-04-192-7/+4
| | | | MFC after: 2 weeks.
* User NULL instead of 0 for pointers.araujo2016-04-181-2/+2
| | | | | | gethostbyname(3) will return NULL in case of an error. MFC after: 2 weeks.
* MFHgjb2016-04-161-1/+1
|\ | | | | | | Sponsored by: The FreeBSD Foundation
| * Cleanup unnecessary semicolons from utilities we all love.pfg2016-04-151-1/+1
| |
* | MFHgjb2016-04-042-26/+97
|\ \ | |/ | | | | Sponsored by: The FreeBSD Foundation
| * Add parsing for AP channel report IE.adrian2016-03-181-3/+23
| | | | | | | | | | | | | | | | | | | | | | Eg: TP-LINK_D579 60:e3:27:e1:d5:79 10 54M -72:-95 100 EP SSID<TP-LINK_D579> RATES<B2,B4,B11,B22,18,36,72,108> DSPARMS<10> XRATES<12,24,48,96> COUNTRY<US 1-11,20> APCHANREP<class 32, chan:[1,2,3,4,5,6,7]> APCHANREP<class 33, chan:[5,6,7,8,9,10,11]> TIM<050400010000> ERP<0x4> HTCAP<cap 0x106e param 0x17 mcsset[0-15,32] extcap 0x0 txbf 0x0 antenna 0x0> HTINFO<ctl 10, 7,0,0,0 basicmcs[]> ???<4a0e14000a002c01c800140005001900> RSN<v1 mc:AES-CCMP uc:AES-CCMP km:8021X-PSK> WME<qosinfo 0x0 BE[aifsn 3 cwmin 4 cwmax 10 txop 0] BK[aifsn 7 cwmin 4 cwmax 10 txop 0] VO[aifsn 2 cwmin 3 cwmax 4 txop 94] VI[aifsn 2 cwmin 2 cwmax 3 txop 47]> BSSLOAD<sta count 0, chan load 11, aac 18> VEN<dd07000c4300000000>
| * Remove duplicate LE_READ_4() definition.adrian2016-03-181-8/+0
| | | | | | | | | | | | Tested: * typed 'make', seemed to work.
| * Decode VHTCAP, VHTINFO and BSSLOAD.adrian2016-03-181-0/+62
| | | | | | | | | | | | BSSLOAD is based on work from Idwer Vollering. Obtained from: Idwer Vollering <vidwer@gmail.com> (bssload)
| * Display the VHT IE names.adrian2016-03-161-0/+3
| | | | | | | | | | | | | | | | | | | | This doesn't decode the IEs just yet. Tested: * Archer c2 AP: TP-LINK_D579_5G 60:e3:27:e1:d5:78 44 54M 26:0 100 EP SSID<TP-LINK_D579_5G> RATES<B12,18,B24,36,B48,72,96,108> DSPARMS<44> COUNTRY<US 36-48,20> TIM<050400010000> HTCAP<cap 0x6e param 0x16 mcsset[0-7,32] extcap 0x0 txbf 0x0 antenna 0x0> HTINFO<ctl 44, 5,0,0,0 basicmcs[]> VHTCAP<bf0c2000c031feff2401feff2401> VHTOPMODE<c005012a00feff> RSN<v1 mc:AES-CCMP uc:AES-CCMP km:8021X-PSK> WME<qosinfo 0x0 BE[aifsn 3 cwmin 4 cwmax 10 txop 0] BK[aifsn 7 cwmin 4 cwmax 10 txop 0] VO[aifsn 2 cwmin 3 cwmax 4 txop 94] VI[aifsn 2 cwmin 2 cwmax 3 txop 47]> BSSLOAD<0b05000001127a> VEN<dd07000c4300000000>
| * Improve detection of extended QSFP diagnostics.hselasky2016-03-151-17/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | The standards in the QSFP diagnostics area are not clear when the additional measurements are present or not. Use a valid temperature reading as an indicator for the presence of voltage and TX/RX power measurements. MFC after: 1 week Sponsored by: Mellanox Technologies Tested by: Netflix Differential Revision: https://reviews.freebsd.org/D5391 Reviewed by: gallatin
* | MFHgjb2016-03-141-0/+2
|\ \ | |/ | | | | Sponsored by: The FreeBSD Foundation
| * [net80211] handle unlisted information elements.adrian2016-03-141-0/+2
| | | | | | | | | | | | | | This displays the IE names in ifconfig but it doesn't yet decode things. Submitted by: Idwer Vollering <vidwer@gmail.com> Differential Revision: https://reviews.freebsd.org/D3782
* | MFHgjb2016-03-101-0/+11
|\ \ | |/ | | | | Sponsored by: The FreeBSD Foundation
| * DIRDEPS_BUILD: Connect MK_TESTS.bdrewery2016-03-091-0/+11
| | | | | | | | Sponsored by: EMC / Isilon Storage Division
* | MFHgjb2016-02-223-2/+24
|\ \ | |/ | | | | Sponsored by: The FreeBSD Foundation
| * ifconfig(8): can't use 'name' or 'description' when creating interface with ↵kp2016-02-203-2/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | auto numbering If one does 'ifconfig tap create name blah', it will return error because the 'name' command doesn't properly populate the request sent to ioctl(...). The 'description' command has the same bug, and is also fixed with this patch. If one does 'ifconfig tap create mtu 9000 name blah', it DOES work, but 'tap0' (or other sequence number) is echoed, instead of the expected 'blah'. (assuming the name change actually succeeded) Submitted by: Marie Helene Kvello-Aune <marieheleneka@gmail.com> Differential Revision: https://reviews.freebsd.org/D5341
* | Explicitly add more files to the 'runtime' package.gjb2016-02-091-0/+1
| | | | | | | | Sponsored by: The FreeBSD Foundation
* | First pass to fix the 'tests' packages.gjb2016-02-021-0/+4
|/ | | | Sponsored by: The FreeBSD Foundation
* Add an IOCTL rr_limit to let users fine tuning the number of packets to bearaujo2016-01-231-0/+16
| | | | | | | | | | | | | | | | | | | sent using roundrobin protocol and set a better granularity and distribution among the interfaces. Tuning the number of packages sent by interface can increase throughput and reduce unordered packets as well as reduce SACK. Example of usage: # ifconfig bge0 up # ifconfig bge1 up # ifconfig lagg0 create # ifconfig lagg0 laggproto roundrobin laggport bge0 laggport bge1 \ 192.168.1.1 netmask 255.255.255.0 # ifconfig lagg0 rr_limit 500 Reviewed by: thompsa, glebius, adrian (old patch) Approved by: bapt (mentor) Relnotes: Yes Differential Revision: https://reviews.freebsd.org/D540
* Add SFF-8024 Extended Specification Compliancemelifaro2015-12-281-4/+44
| | | | | | Submitted by: markb_mellanox.com MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D4666
* Reduce overlinkingbapt2015-12-241-1/+1
| | | | ifconfig does not need libbsdxml and libsbuf only lib80211 needs it
* META MODE: Update dependencies with 'the-lot' and add missing directories.bdrewery2015-12-011-0/+1
| | | | | | | | | | | | | | This is not properly respecting WITHOUT or ARCH dependencies in target/. Doing so requires a massive effort to rework targets/ to do so. A better approach will be to either include the SUBDIR Makefiles directly and map to DIRDEPS or just dynamically lookup the SUBDIR. These lose the benefit of having a userland/lib, userland/libexec, etc, though and results in a massive package. The current implementation of targets/ is very unmaintainable. Currently rescue/rescue and sys/modules are still not connected. Sponsored by: EMC / Isilon Storage Division
* Convert ifconfig to use lib80211.adrian2015-11-304-864/+11
| | | | | | * remove regdomain.[ch] - it's now part of lib80211. * convert ifieee80211.c to use the ioctl routines in lib80211 and implement the "error? exit" wrapper behaviour the callers expect.
* [ifconfig] handle IBSS mediatype correctly.adrian2015-11-261-0/+2
| | | | | | Right now net80211 is configured as type IBSS but then treats it as mediatype ADHOC. This doesn't change that; it just correctly handles being given a mediatype of IBSS.
* Add sysctl to control LACP strict compliance defaultsmh2015-11-061-1/+16
| | | | | | | | | | | | | Add net.link.lagg.lacp.default_strict_mode which defines the default value for LACP strict compliance for created lagg devices. Also: * Add lacp_strict option to ifconfig(8). * Fix lagg(4) creation examples. * Minor style(9) fix. MFC after: 1 week
* ifconfig: fix padding for '<ifname> scan' command outputavos2015-11-061-2/+2
| | | | | | | (S:N and beacon interval fields). Approved by: adrian (mentor) Differential Revision: https://reviews.freebsd.org/D4085
* Refactor the test/ Makefiles after recent changes to bsd.test.mk (r289158) andngie2015-10-121-6/+0
| | | | | | | | | | | | netbsd-tests.test.mk (r289151) - Eliminate explicit OBJTOP/SRCTOP setting - Convert all ad hoc NetBSD test integration over to netbsd-tests.test.mk - Remove unnecessary TESTSDIR setting - Use SRCTOP where possible for clarity MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Divison
* Replace N #defines with nitems to simplify ifconfig code slightlyngie2015-09-2715-59/+23
| | | | MFC after: 1 week
* Make ifconfig always exit with an error code if an important ioctl failsallanjude2015-09-161-9/+6
| | | | | | | | | | | | PR: 203062 Arm Twisting by: Kristof Provost Reviewed by: kp Approved by: bapt (mentor) MFC after: 2 weeks Relnotes: yes Sponsored by: ScaleEngine Inc. Sponsored by: vBSDCon Differential Revision: https://reviews.freebsd.org/D3644
* - Remove GIF_{SEND,ACCEPT}_REVETHIP.hrs2015-09-101-10/+3
| | | | | | - Simplify EADDRNOTAVAIL and EAFNOSUPPORT conditions. MFC after: 3 days
* Make LAG LACP fast timeout tunable through IOCTL.hiren2015-08-122-1/+9
| | | | | | | | Differential Revision: D3300 Submitted by: LN Sundararajan <lakshmi.n at msystechnologies> Reviewed by: wblock, smh, gnn, hiren, rpokala at panasas MFC after: 2 weeks Sponsored by: Panasas
* Add META_MODE support.sjg2015-06-131-0/+23
|\ | | | | | | | | | | | | | | | | | | | | Off by default, build behaves normally. WITH_META_MODE we get auto objdir creation, the ability to start build from anywhere in the tree. Still need to add real targets under targets/ to build packages. Differential Revision: D2796 Reviewed by: brooks imp
| * dirdeps.mk now sets DEP_RELDIRsjg2015-06-081-2/+0
| |
| * Merge sync of headsjg2015-05-2715-174/+474
| |\ | |/ |/|
| * Updated/new dependenciessjg2014-11-191-0/+1
| |
OpenPOWER on IntegriCloud