Commit Graph

25 Commits

Author SHA1 Message Date
Pedro F. Giffuni
df57947f08 spdx: initial adoption of licensing ID tags.
The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

Special thanks to Wind River for providing access to "The Duke of
Highlander" tool: an older (2014) run over FreeBSD tree was useful as a
starting point.

Initially, only tag files that use BSD 4-Clause "Original" license.

RelNotes:	yes
Differential Revision:	https://reviews.freebsd.org/D13133
2017-11-18 14:26:50 +00:00
Marcelo Araujo
2ccbbd06d2 Add support to priority code point (PCP) that is an 3-bit field
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
2016-06-06 09:51:58 +00:00
Enji Cooper
abd7105060 Replace N #defines with nitems to simplify ifconfig code slightly
MFC after: 1 week
2015-09-27 07:51:18 +00:00
Gleb Smirnoff
56d5e0967c Stop including if_var.h from userland.
Sponsored by:	Nginx, Inc.
2015-04-06 09:42:23 +00:00
Bjoern A. Zeeb
9b776960c3 Allow toggling of IFCAP_VLAN_HWCSUM for hardware that supports checksum
offloading on vlans and document the new option.

MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
2011-12-17 15:44:34 +00:00
Pyun YongHyeon
0f686c0fc9 Add TSO support on VLAN in fconfig(8).
Reviewed by:	thompsa
2010-02-20 23:01:09 +00:00
Xin LI
b59dcaeeb3 - Use size_t instead of int when appropriate;
- Use C99 sparse initialization.

With these changes ifconfig(8) is WARNS=2 clean.
2009-06-23 23:49:52 +00:00
Rui Paulo
9c1fd0b05f Replace clone_setcallback() with a new function clone_setdefcallback()
that selects a callback from an interface prefix name. This allows us to
report a meaningful error when the user types 'ifconfig wlan0 create',
for example, and also kills some redundant code.

Reviewed by:    sam (earlier version)
2009-02-27 00:31:34 +00:00
Sam Leffler
67207b6994 back out unintended change 2008-12-15 01:44:23 +00:00
Sam Leffler
27c1a6f490 o distinguish between adhoc and ahdemo modes
o do not require 1/2 and 1/4 rate channels be present in the
  calibration list when doing a gsm regulatory change; the
  existing 900MHz cards are not self-identifying so there is
  no way (using the calibration channel list) to check
2008-12-15 01:06:49 +00:00
Sam Leffler
24994b364c add duplicate cmd entries for vlan and vlandev that are marked !clone
so they can be used when not doing a create operation

Reviewed by:	ed
2008-10-02 20:03:41 +00:00
Jack F Vogel
eafbb00d24 Add support in ifconfig to control the vlan hardware filter feature.
Reviewed by: EvilSam and moi
MFC after:1 week
2008-08-28 22:13:44 +00:00
Sam Leffler
2fa02c5fb7 Fix handling of create operation together with setting other parameters:
o mark cmds/parameters to indicate they are potential arguments to a clone
  operation (e.g. vlantag)
o when handling a create/clone operation do the callback on seeing the first
  non-clone cmd line argument so the new device is created and can be used;
  and re-setup operating state to reflect the newly created device

Reviewed by:	Eugene Grosbein
MFC after:	2 weeks
2008-03-31 15:38:07 +00:00
Sam Leffler
db82353d87 o replace special handling of clone operations by a clone callback
mechanism
o change vlan cloning to use callback and pass all vlan parameters
  on create using the new SIOCREATE2 ioctl
o update vlan set logic to match existing practice
2006-07-09 06:10:23 +00:00
Yaroslav Tykhiy
2fe9aa26c6 Revert to setting vlan and vlandev parametes synchronously, as soon
as both have been read from the command line.  Still use the callback,
but this time only to verify that both vlan and vlandev have been
found on the command line.

This should allow for control over the relative order of processing
parameters, which is needed to satisfy some caveats of the if_vlan
driver.  E.g., MTU cannot be changed on a vlan interface until it's
attached to its parent.

PR:             bin/94028
Reviewed by:    ru
MFC after:      3 days
2006-03-09 14:58:09 +00:00
Yaroslav Tykhiy
a2d3802cd8 Eliminate some unneeded code bits. 2005-10-06 15:05:55 +00:00
Yaroslav Tykhiy
7fc2ce8ae4 Use a callback to set up a vlan interface so that "vlan"
and "vlandev" commands can be specified in any order.
This makes the code more compact and clear as well.

Improve error check on vlan argument.

MFC after:	2 weeks
2005-10-04 11:48:03 +00:00
Yaroslav Tykhiy
b0dcc11c43 Deprecate the useless argument to -vlandev.
Submitted by:	Fredrik Lindberg <fli+freebsd-current at shapeshifter.se> (implementation)
Reviewed by:	brooks
MFC after:	5 days
2005-09-29 23:38:24 +00:00
Sam Leffler
90c4b74cbe Fix special status reporting. Prior to the reorg there was
special-purpose code to display status for an interface for
state that was not address-oriented.  This status reporting
was merged in to the address-oriented status reporting but
did not work for link address reporting (as discovered with
fwip interfaces).  Correct this mis-merge and eliminate the
bogus kludge that was used for link-level address reporting.

o add an af_other_status method for an address family for
  reporting status of things like media, vlan, etc.
o call the af_other_status methods after reporting address
  status for an interface
o special-case link address status; when reporting all
  status for an interface invoke it specially prior to
  reporting af_other_status methods (since it requires the
  sockaddr_dl that is passed in to status separately from
  the rtmsg address state)
o correct the calling convention for link address status;
  don't cast types, construct the proper parameter

This fixes ifconfig on fwip interfaces.
2004-12-31 19:46:27 +00:00
Sam Leffler
5faf8dcb55 Overhaul to cleanup some of the tangled logic that's grown over the years.
o break per-address family support out into separate files
o modularize per-address family and functional operations using
  a registration mechanism; this permits configuration according
  to which files you include (but beware that order of the files
  is important to insure backwards compatibility)
o many cleanups to eliminate incestuous behaviour, global variables,
  and poor coding practices (still much more to fix)

The original motivation of this work was to support dynamic addition
of functionality based on the interface so we can eliminate the various
little control programs and so that vendors can distribute ifconfig
plugins that support their in-kernel code.  That work is still to be
completed.

o Update 802.11 support for all the new net80211 functionality; some
  of these operations (e.g. list *) may be better suited in a different
  program
2004-12-08 19:18:07 +00:00
Warner Losh
bc123897ed De-__P, use ansi function definitions 2002-04-18 17:14:09 +00:00
Robert Watson
2d742f7bbc o Reduce userland inclusion of kernel headers -- remove unneeded include
of <sys/mbuf.h>.

Reviewed by:	jlemon
2001-09-24 15:00:16 +00:00
Ruslan Ermilov
8af1452cf8 Removed duplicate VCS ID tags, as per style(9). 2001-08-13 14:06:34 +00:00
Peter Wemm
7f3dea244c $Id$ -> $FreeBSD$ 1999-08-28 00:22:10 +00:00
Bill Paul
97ed1257f9 Grrr... botched remote commit. Let's try this again: vlan updates,
take two.
1999-03-15 01:22:01 +00:00