summaryrefslogtreecommitdiff
path: root/sbin/ifconfig/ifconfig.c
AgeCommit message (Collapse)Author
2018-07-13Unused variables.Kenneth R Westerback
ok henning@ phessler@
2018-07-11Introduce 'auto-join' to the wifi 802.11 stack.Peter Hessler
This allows a system to remember which ESSIDs it wants to connect to, any relevant security configuration, and switch to it when the network we are currently connected to is no longer available. Works when connecting and switching between WPA2/WPA1/WEP/clear encryptions. example hostname.if: join home wpakey password join work wpakey mekmitasdigoat join open-lounge join cafe wpakey cafe2018 join "wepnetwork" nwkey "12345" dhcp inet6 autoconf up OK stsp@ reyk@ and enthusiasm from every hackroom I've been in for the last 3 years
2018-05-28Remove unused <sys/param.h>kn
OK sthen mpi
2018-05-12Make LACP_STATE_BITS accessible to userlandccardenas
Update ifconfig to display LACP State (Actor and Partner) on each trunk port Ok benno@, phessler@, and tb@
2018-04-26net80211: stub SIOCS80211SCAN, make ifconfig scan instant.Paul Irofti
The following removes the functionality of the SIOCS80211SCAN ioctl. After long discussions with stps@, mpi@, and deraadt@ we decided that this was the correct way of fixing ifconfig scan from blocking the network stack. The kernel will continue scanning in the background and filling the nodes array, but ifconfig scan commands will now basically do just a SIOCG80211ALLNODES and pretty print the array. So the output stays the same but is instant. In fact, when the interface is freshly brought up, if you type fast enough, you can see the array being filled by running multiple ifconfig scans in sequence. The SIOCS80211SCAN ioctl stays for now as wi(4), pgt(4) and malo(4) still need it around. But not for long... Another change that this introduces is the fact that ifconfig scan no longer plays with UP and DOWN. If the interface is down it complains and exits. This is needed in order to maintain the nodes list. Works on iwm(4), iwn(4), urtwn(4), run(4) and athn(4). Tested by mpi@, landry@, florian@, thanks! OK mpi@.
2018-04-26Do not try getnetbyname(3) if gethostbyname(3) returns no result.Ingo Schwarze
This is part of the project to delete /etc/networks support. OK deraadt@
2018-04-26Add a '-tunneldomain' ifconfig(8) option as shorthand for 'tunneldomain 0'akoshibe
to be consistent with the '-rdomain' option. Suggested by dlg OK benno, jca, kn, phessler, jmc
2018-02-27handle "tunnels" without a destination addressDavid Gwynne
this is used for mgre, which has a local address but dynamically addresses other endpoints based on routing information. "tunneladdr" takes a single address (where "tunnel" takes two) and sets the destination address in the ioctl to an AF_UNSPEC destination. tunnel status is changed so it recognises this and only outputs the local address if the destination is AF_UNSPEC. the tunnel status is also changed so it can tell the difference between tunnels being unsupported on the interface (ie, ENOTTY comes back) or if there's just no address configured yet (EADDRNOTAVAIL), which allows the other tunnel params like ttl and df to be shown. tested with and without -DSMALL
2018-02-23Add unsetrdomain() and option -rdomain to return an interface to routingakoshibe
domain 0. OK phessler, henning, deraadt, stsp, benno
2018-02-20Move getvnetflowid() out of #ifndef SMALL to unbreak 'make release'.Theo Buehler
Diff from jsg, ok millert, benno
2018-02-20add support for toggling partitioning a vnetid into a netid and flowidDavid Gwynne
"vnetflowid" enables it on an interface, and "-vnetflowid" disables it. a vnetid will be suffixed with + on the encap line if it an interface reports that it is enabled.
2018-02-19add support for setting and displaying whether a tunnel allows fragmentationDavid Gwynne
ifconfig will output "nodf" or "df" on tunnel interfaces that support the ioctl., and accepts "tunneldf" and "-tunneldf" as options to try and configure it.
2018-02-10ifconfig can be used to to set interface flag to not do RFC 7217.Florian Obser
OK naddy, sthen man page bits input & OK jmc
2018-02-08when using tunnelttl, let -1 mean "copy the ttl from the inner traffic".David Gwynne
tunnelttl now accepts "copy" as an argument, and prints "copy" when it sees -1. ok claudio@
2018-02-08Add a new '-protected' option for bridge members.Martin Pieuchot
Bridge members that are part of the same protected domain, refered by a number between 1 and 31, cannot talk to each others. This is useful to isolate VMs or untrusted networks at layer 2. Members can be part of multiple protected domain making it possible to create complex protected setups. ok ccardenas@, claudio@, dlg@, henning@
2018-02-02Make 'ifconfig if0 wpaakms 802.1x' implicitly enable WPA.Stefan Sperling
Requring WPA to be enabled separately via 'ifconfig if0 wpa' was confusing. ok mlarkin phessler mpi
2018-01-16Recycle IFF_NOTRAILERS into IFF_STATICARP and document ownerhsipMartin Pieuchot
of IFF* flags. inputs from jmc@, ok bluhm@, visa@
2018-01-09Stop printing <not displayed> for wireless keys we know the kernel noMartin Pieuchot
longer export them to userland. ok stsp@, deraadt@, jca@
2017-11-17replace the deletetunnel option with -tunnelSebastian Benoit
ok bluhm@
2017-11-05ifconfig <if> giftunnel was deprecated in 2001, it's never too late toSebastian Benoit
remove it ok phessler@ beck@
2017-10-30Exit printing an error message if SIOCSIFMEDIA fails.Martin Pieuchot
from Jesper Wallin.
2017-08-29quarterly rescan of the tree: remove unneccessary sys/param.h, andTheo de Raadt
annotate the ones which are needed.
2017-08-29Don't use isset() from sys/param.h in ifconfig. Requested by deraadtStefan Sperling
2017-08-01use AI_NUMERICHOST for getaddrinfo(), we can only configure ipSebastian Benoit
adresses on pflow(4) interfaces, so don't try to resolve hostnames. Report and fix from pjp -AT- centroid.eu ok florian@
2017-06-25Make ifconfig(8) default to prefixlen 128 when setting an IPv6 destinationStefan Sperling
address on a point-to-point interface. Makes it easier to configure IPv6 on interfaces such as gif(4). Specifying 'prefixlen 128' is no longer required. This is consistent with IPv4 where a netmask is not required either. ok mpi@ bluhm@ benno@
2017-06-08remove the timeslot code, it was only for now deleted T1 devices.Ted Unangst
ok sthen
2017-06-06make vnetid and parent commands available in SMALL ifconfigs.David Gwynne
the code behind the commands has been built on SMALL forever, this just moves it available in the cmd table. the binary doesnt change size.
2017-06-05remove vlan(4) specific output handlingDavid Gwynne
vlan(4) now understands the generic vnetid and ifparent ioctls, so this is redundant. ok henning@
2017-05-31fold the vnetid and parent lines into a single encap line.David Gwynne
this is a modest attempt to shorten the ifconfig output. encap wont show up if neither vnetid or parent are supplied by an interface. whitespace tweaks from benno@ output tweaks from reyk@ ok deraadt@ henning@
2017-03-21Replace a magic number with the corresponding macro from ieee80211_ioctl.h.Stefan Sperling
No functional change. ok deraadt@ tb@
2017-03-12Make ifconfig scan display both wpa1 and wpa2 if both are supported.Stefan Sperling
ok henning@ phessler@
2017-03-11Make 'ifconfig scan' display AP encryption correctly if WEP is configuredStefan Sperling
on the local wifi interface. ifconfig was mistakenly showing the common supported subset of client and AP, rather than showing the AP's capabilities. Exposes WPA protocol capabilities in struct ieee80211_nodereq, which means ifconfig must be recompiled to run on a new kernel. ok deraadt@ mpi@
2017-01-21Nuke whitespace foolish enough to expose itself during the greatKenneth R Westerback
"warning:" rectification.
2016-12-25gcc says "if you define labels and don't use them, I will whine."Kenneth R Westerback
ok tom@
2016-12-20Make 'ifconfig if0 wpa' and 'ifconfig if0 -wpa' reset WPA params (does notStefan Sperling
include the wpakey) to their defaults. And make 'ifconfig if0 wpaprotos' reset WPA crypto parameters to settings which are appropriate for the specified WPA protocol version.
2016-12-13make setting and getting tunnel addresses wrt to ipv6 scope handling.David Gwynne
setting a tunnel addresses uses a sockaddr_in6 from getaddrinfo, which sets sin6_scope_id for scoped addresses. this is nice and portable. reading a tunnel address assumed the scope was embedded in link local addresses in sin6_addr, and unpacked the scope back into sin6_scope_id. this is inconsistent with the code that sets tunnel addresses. this fixes the read path so it assumes the kernel sets sin6_scope_id like it it assumes the kernel will read on the set side. noone likes the kame hack of embedding the scope id in the addreses. ok mpi@
2016-11-10The simple UTF-16 decode routine stopped too early due to wrong calculationGerhard Roth
of the output buffer size. Thus elements like subscriber-id, ICC-id, IMEI were shown truncated. Some modules report a phone number that already has the '+' prefix. Don't add another one when printing it. Patch from Bryan Vyhmeister ok otto
2016-11-08- Declare usage() as __dead void (remaining prototypes are not declared asRicardo Mestre
static, so keep it that way for consistency) - s/usage(1)/usage() and inside call exit(1) explicitly since all usage() calls always use that value (also update comment to reflect this change) - Remove main() prototype - s/exit/return in main() to enable SSP Feedback from jca@ and tb@ and OK from both (with their remarks in)
2016-10-17Use strtoull() to read the datapath id and expect "datapath" instead ofRafael Zalamena
"datapathid" as stated by the man page. ok reyk@
2016-09-03Add support for a multipoint-to-multipoint mode in vxlan(4). In thisReyk Floeter
mode, vxlan(4) must be configured to accept any virtual network identifier with "vnetid any" and added to a bridge(4) or switch(4). This way the driver will dynamically learn the tunnel endpoints and their vnetids for the responses and can be used to dynamically bridge between VXLANs. It is also being used in combination with switch(4) and the OpenFlow tunnel classifiers. With input from yasuoka@ goda@ OK deraadt@ dlg@
2016-09-02Add switch(4) support to ifconfigKazuya Goda
ok deraadt@ yasuoka@ reyk@ henning@
2016-08-31Rename ifconfig's setinstance() function to setrdomain(). Less confusing.Stefan Sperling
ok claudio@ jca@
2016-08-19correct a rate test introduced in rev 1.326Jonathan Gray
ok stsp@
2016-08-15When running 'ifconfig scan' in hostap mode display the current Tx rate ourStefan Sperling
AP is using to send frames to an associated node. This used to always display the node's highest supported Rx rate, which isn't all that interesting. ok mpi@
2016-08-03Fix typo, spotted by Holger Mikolon <holger@mikolon.com>Vincent Gross
2016-06-15Add umb(4) - a driver for the Mobile Broadband Interface Model (MBIM)Gerhard Roth
The umb(4) driver provides support for USB MBIM devices. Those devices establish connections via celluar networks such as GPRS, UMTS, and LTE. ok mpi@ sthen@ additional feedback from deraadt@ jmc@ stsp@ kettenis@
2016-06-10Add the "llprio" field to struct ifnet, and the corresponding keywordVincent Gross
to ifconfig. "llprio" allows one to set the priority of packets that do not go through pf(4), as the case is for arp(4) or bpf(4). ok sthen@ mikeb@
2016-05-03Remove INET6 #ifdefsJeremie Courreges-Anglas
ifconfig.c doesn't build without -DINET6, and those #ifdefs clutter the code. ok bluhm@ henning@
2016-04-28Show 11n HT rate in ifconfig scan output. Needs a new kernel.Stefan Sperling
ok mpi@
2016-04-18Print interface index after priority.Martin Pieuchot
Suggestion from claudio@, ok benno@, sthen@