Index: stable/5/share/man/man4/acpi.4 =================================================================== --- stable/5/share/man/man4/acpi.4 (revision 139701) +++ stable/5/share/man/man4/acpi.4 (revision 139702) @@ -1,465 +1,465 @@ .\" .\" Copyright (c) 2001 Michael Smith .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" .\" $FreeBSD$ .\" .Dd December 14, 2004 .Dt ACPI 4 .Os .Sh NAME .Nm acpi .Nd Advanced Configuration and Power Management support .Sh SYNOPSIS .Cd "device acpi" .Pp .Cd "options ACPI_DEBUG" .Sh DESCRIPTION The .Nm driver provides support for the Intel/Microsoft/Compaq/Toshiba ACPI standard. This support includes platform hardware discovery (superseding the PnP and PCI BIOS), as well as power management (superseding APM) and other features. ACPI core support is provided by the ACPI CA reference implementation from Intel. .Pp Note that the .Nm driver is automatically loaded by the .Xr loader 8 , and should only be compiled into the kernel on platforms where ACPI is mandatory. .Sh SYSCTLS The .Nm driver is intended to provide power management without user intervention. Thus, some of these sysctls are controlled automatically by the .Pa power_profile .Xr rc 8 script, which can be configured via .Xr rc.conf 5 . If values are specified manually, they may be overridden. .Bl -tag -width indent .It Va hw.acpi.cpu.throttle_max Maximum value for CPU throttling, equal to 100% of the clock rate. .It Va hw.acpi.cpu.throttle_state Get or set the current throttling state, from 1 to .Va hw.acpi.cpu.throttle_max . This scales back the CPU clock rate and the corresponding power consumption. .It Va hw.acpi.cpu.cx_usage Debugging information listing the percent of total usage for each sleep state. The values are reset when .Va hw.acpi.cpu.cx_lowest is modified. .It Va hw.acpi.cpu.cx_lowest Lowest Cx state to use for idling the CPU. A scheduling algorithm will select states between C1 and this setting as system load dictates. To enable ACPI CPU idling control, .Va machdep.cpu_idle_hlt must be set to 1. .It Va hw.acpi.cpu.cx_supported List of supported CPU idle states and their transition latency in microseconds. Each state has a type (e.g., C2). C1 is equivalent to the ia32 HLT instruction, C2 provides a deeper sleep with the same semantics, and C3 provides the deepest sleep but additionally requires bus mastering to be disabled. States greater than C3 provide even more power savings with the same semantics as the C3 state. Deeper sleeps provide more power savings but increased transition latency when an interrupt occurs. .El .Sh TUNABLES Tunables can be set at the .Xr loader 8 prompt before booting the kernel or stored in .Pa /boot/loader.conf . .Bl -tag -width indent .It Va acpi_dsdt_load Enables loading of a custom ACPI DSDT. .It Va acpi_dsdt_name Name of the DSDT table to load, if loading is enabled. .It Va debug.acpi.disabled Selectively disables portions of ACPI for debugging purposes. .It Va hint.acpi.0.disabled Set this to 1 to disable all of ACPI. If ACPI has been disabled on your system due to a blacklist entry for your BIOS, you can set this to 0 to re-enable ACPI for testing. .It Va hw.acpi.ec.poll_timeout Delay in milliseconds to wait for the EC to respond. Try increasing this number if you get the error .Qq Li AE_NO_HARDWARE_RESPONSE . .It Va hw.acpi.osname Some systems' ASL may have problems because they look for names of Microsoft operating systems. This tunable overrides the value of the .Qq Li \e_OS object from its default of .Qq Li FreeBSD . .It Va hw.acpi.pci.link.%d.%d.%d.irq Override the interrupt to use. .It Va hw.acpi.reset_video Enables calling the VESA reset BIOS vector on the resume path. Some graphic chips have problems such as LCD white-out after resume. Try setting this to 0 if this causes problems for you. .It Va hw.acpi.serialize_methods Allow override of whether methods execute in parallel or not. Enable this for serial behavior, which fixes .Qq Li AE_ALREADY_EXISTS -errors for +errors for AML that really cannot handle parallel method execution. -It is off by default since this breaks recursive methods and some IBMs use +It is off by default since this breaks recursive methods and some IBMs use such code. .It Va hw.acpi.verbose Turn on verbose debugging information about what ACPI is doing. .El .Sh DISABLING ACPI Since ACPI support on different platforms varies greatly, there are many debugging and tuning options available. .Pp For machines known not to work with .Nm enabled, there is a BIOS blacklist. Currently, the blacklist only controls whether .Nm should be disabled or not. In the future, it will have more granularity to control features (the infrastructure for that is already there). .Pp To enable .Nm (for debugging purposes, etc.) on machines that are on the blacklist, set the kernel environment variable .Va hint.acpi.0.disabled to 0. Before trying this, consider updating your BIOS to a more recent version that may be compatible with ACPI. .Pp To disable the .Nm driver completely, set the kernel environment variable .Va hint.acpi.0.disabled to 1. .Pp Some i386 machines totally fail to operate with some or all of ACPI disabled. Other i386 machines fail with ACPI enabled. Disabling all or part of ACPI on non-i386 platforms (i.e., platforms where ACPI support is mandatory) may result in a non-functional system. .Pp The .Nm driver comprises a set of drivers, which may be selectively disabled in case of problems. To disable a sub-driver, list it in the kernel environment variable .Va debug.acpi.disabled . Multiple entries can be listed, separated by a space. .Pp ACPI sub-devices and features that can be disabled: .Bl -tag -width ".Li sysresource" .It Li all Disable all ACPI features and devices. .It Li acad .Pq Vt device Supports AC adapter. .It Li bus .Pq Vt feature Probes and attaches subdevices. Disabling will avoid scanning the ACPI namespace entirely. .It Li children .Pq Vt feature Attaches standard ACPI sub-drivers and devices enumerated in the ACPI namespace. Disabling this has a similar effect to disabling .Dq Li bus , except that the ACPI namespace will still be scanned. .It Li button .Pq Vt device Supports ACPI button devices (typically power and sleep buttons). .It Li cmbat .Pq Vt device Control-method batteries device. .It Li cpu .Pq Vt device Supports CPU power-saving and speed-setting functions. .It Li ec .Pq Vt device Supports the ACPI Embedded Controller interface, used to communicate with embedded platform controllers. .It Li isa .Pq Vt device Supports an ISA bus bridge defined in the ACPI namespace, typically as a child of a PCI bus. .It Li lid .Pq Vt device Supports an ACPI laptop lid switch, which typically puts a system to sleep. .It Li quirks .Pq Vt feature Do not honor quirks. Quirks automatically disable ACPI functionality based on the XSDT table's OEM vendor name and revision date. .It Li pci .Pq Vt device Supports Host to PCI bridges. .It Li pci_link .Pq Vt feature Performs PCI interrupt routing. .It Li sysresource .Pq Vt device Pseudo-devices containing resources which ACPI claims. .It Li thermal .Pq Vt device Supports system cooling and heat management. .It Li timer .Pq Vt device Implements a timecounter using the ACPI fixed-frequency timer. .El .Pp It is also possible to avoid portions of the ACPI namespace which may be causing problems, by listing the full path of the root of the region to be avoided in the kernel environment variable .Va debug.acpi.avoid . The object and all of its children will be ignored during the bus/children scan of the namespace. The ACPI CA code will still know about the avoided region. .Sh DEBUGGING OUTPUT To enable debugging output, .Nm must be compiled with .Cd "options ACPI_DEBUG" . Debugging output is separated between layers and levels, where a layer is a component of the ACPI subsystem, and a level is a particular kind of debugging output. .Pp Both layers and levels are specified as a whitespace-separated list of tokens, with layers listed in .Va debug.acpi.layer and levels in .Va debug.acpi.level . .Pp The first set of layers is for ACPI-CA components, and the second is for .Fx drivers. The ACPI-CA layer descriptions include the prefix for the files they refer to. The supported layers are: .Pp .Bl -tag -compact -width ".Li ACPI_CA_DISASSEMBLER" .It Li ACPI_UTILITIES Utility ("ut") functions .It Li ACPI_HARDWARE Hardware access ("hw") .It Li ACPI_EVENTS Event and GPE ("ev") .It Li ACPI_TABLES Table access ("tb") .It Li ACPI_NAMESPACE Namespace evaluation ("ns") .It Li ACPI_PARSER AML parser ("ps") .It Li ACPI_DISPATCHER Internal representation of interpreter state ("ds") .It Li ACPI_EXECUTER Execute AML methods ("ex") .It Li ACPI_RESOURCES Resource parsing ("rs") .It Li ACPI_CA_DEBUGGER Debugger implementation ("db", "dm") .It Li ACPI_OS_SERVICES Usermode support routines ("os") .It Li ACPI_CA_DISASSEMBLER Disassembler implementation (unused) .It Li ACPI_ALL_COMPONENTS All the above ACPI-CA components .It Li ACPI_AC_ADAPTER AC adapter driver .It Li ACPI_BATTERY Control-method battery driver .It Li ACPI_BUS ACPI, ISA, and PCI bus drivers .It Li ACPI_BUTTON Power and sleep button driver .It Li ACPI_EC Embedded controller driver .It Li ACPI_FAN Fan driver .It Li ACPI_OEM Platform-specific driver for hotkeys, LED, etc. .It Li ACPI_POWER Power resource driver .It Li ACPI_PROCESSOR CPU driver .It Li ACPI_THERMAL Thermal zone driver .It Li ACPI_TIMER Timer driver .It Li ACPI_ALL_DRIVERS All the above .Fx ACPI drivers .El .Pp The supported levels are: .Pp .Bl -tag -compact -width ".Li ACPI_LV_AML_DISASSEMBLE" .It Li ACPI_LV_ERROR Fatal error conditions .It Li ACPI_LV_WARN Warnings and potential problems .It Li ACPI_LV_INIT Initialization progress .It Li ACPI_LV_DEBUG_OBJECT Stores to objects .It Li ACPI_LV_INFO General information and progress .It Li ACPI_LV_ALL_EXCEPTIONS All the previous levels .It Li ACPI_LV_INIT_NAMES .It Li ACPI_LV_PARSE .It Li ACPI_LV_LOAD .It Li ACPI_LV_DISPATCH .It Li ACPI_LV_EXEC .It Li ACPI_LV_NAMES .It Li ACPI_LV_OPREGION .It Li ACPI_LV_BFIELD .It Li ACPI_LV_TABLES .It Li ACPI_LV_VALUES .It Li ACPI_LV_OBJECTS .It Li ACPI_LV_RESOURCES .It Li ACPI_LV_USER_REQUESTS .It Li ACPI_LV_PACKAGE .It Li ACPI_LV_VERBOSITY1 All the previous levels .It Li ACPI_LV_ALLOCATIONS .It Li ACPI_LV_FUNCTIONS .It Li ACPI_LV_OPTIMIZATIONS .It Li ACPI_LV_VERBOSITY2 .It Li ACPI_LV_ALL .It Li ACPI_LV_MUTEX .It Li ACPI_LV_THREADS .It Li ACPI_LV_IO .It Li ACPI_LV_INTERRUPTS .It Li ACPI_LV_VERBOSITY3 All the previous levels .It Li ACPI_LV_AML_DISASSEMBLE .It Li ACPI_LV_VERBOSE_INFO .It Li ACPI_LV_FULL_TABLES .It Li ACPI_LV_EVENTS .It Li ACPI_LV_VERBOSE All levels after .Qq Li ACPI_LV_VERBOSITY3 .El .Pp Selection of the appropriate layer and level values is important to avoid massive amounts of debugging output. For example, the following configuration is a good way to gather initial information. It enables debug output for both ACPI-CA and the .Nm driver, printing basic information about errors, warnings, and progress. .Bd -literal -offset indent debug.acpi.layer="ACPI_ALL_COMPONENTS ACPI_ALL_DRIVERS" debug.acpi.level="ACPI_LV_ALL_EXCEPTIONS" .Ed .Pp Debugging output by the ACPI CA subsystem is prefixed with the module name in lowercase, followed by a source line number. Output from the .Fx Ns -local code follows the same format, but the module name is uppercased. .Sh OVERRIDING YOUR BIOS BYTECODE ACPI interprets bytecode named AML (ACPI Machine Language) provided by the BIOS vendor as a memory image at boot time. Sometimes, the AML code contains a bug that does not appear when parsed by the Microsoft implementation. .Fx provides a way to override it with your own AML code to work around or debug such problems. Note that all AML in your DSDT and any SSDT tables is overridden. .Pp In order to load your AML code, you must edit .Pa /boot/loader.conf and include the following lines. .Bd -literal -offset indent acpi_dsdt_load="YES" acpi_dsdt_name="/boot/acpi_dsdt.aml" # You may change this name. .Ed .Pp In order to prepare your AML code, you will need the .Xr acpidump 8 and .Xr iasl 8 utilities and some ACPI knowledge. .Sh COMPATIBILITY ACPI is only found and supported on i386/ia32, ia64, and amd64. .Sh SEE ALSO .Xr kenv 1 , .Xr acpi_thermal 4 , .Xr device.hints 5 , .Xr loader.conf 5 , .Xr acpiconf 8 , .Xr acpidump 8 , .Xr config 8 , .Xr iasl 8 .Rs .%A "Compaq Computer Corporation" .%A "Intel Corporation" .%A "Microsoft Corporation" .%A "Phoenix Technologies Ltd." .%A "Toshiba Corporation" .%D August 25, 2003 .%T "Advanced Configuration and Power Interface Specification" .%O http://acpi.info/spec.htm .Re .Sh AUTHORS .An -nosplit The ACPI CA subsystem is developed and maintained by Intel Architecture Labs. .Pp The following people made notable contributions to the ACPI subsystem in .Fx : .An Michael Smith , .An Takanori Watanabe Aq takawata@jp.FreeBSD.org , .An Mitsuru IWASAKI Aq iwasaki@jp.FreeBSD.org , .An Munehiro Matsuda , .An Nate Lawson , the ACPI-jp mailing list at .Aq acpi-jp@jp.FreeBSD.org , and many other contributors. .Pp This manual page was written by .An Michael Smith Aq msmith@FreeBSD.org . .Sh BUGS If the .Nm driver is loaded as a module when it is already linked as part of the kernel, odd things may happen. Index: stable/5/share/man/man4/ixgb.4 =================================================================== --- stable/5/share/man/man4/ixgb.4 (revision 139701) +++ stable/5/share/man/man4/ixgb.4 (revision 139702) @@ -1,120 +1,120 @@ .\" Copyright (c) 2001-2004, Intel Corporation .\" All rights reserved. -.\" +.\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions are met: .\" .\" 1. Redistributions of source code must retain the above copyright notice, .\" this list of conditions and the following disclaimer. .\" .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" .\" 3. Neither the name of the Intel Corporation nor the names of its .\" contributors may be used to endorse or promote products derived from .\" this software without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" .\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE .\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" .\" * Other names and brands may be claimed as the property of others. .\" .\" $FreeBSD$ .\" .Dd November 24, 2004 .Dt IXGB 4 .Os .Sh NAME .Nm ixgb .Nd "Intel(R) PRO/10GbE Ethernet driver for the FreeBSD operating system" .Sh SYNOPSIS .Cd "device ixgb" .Sh DESCRIPTION The .Nm driver provides support for PCI gigabit Ethernet adapters based on the Intel 82597EX Ethernet controller chips. The driver supports Transmit/Receive checksum offload and Jumbo Frames. For a list of supported adapters, see the .Pa README included with the driver. .Pp For questions related to hardware requirements, refer to the documentation supplied with your Intel PRO/10GbE adapter. All hardware requirements listed apply to use with .Fx . .Pp Support for Jumbo Frames is provided via the interface MTU setting. Selecting an MTU larger than 1500 bytes with the .Xr ifconfig 8 utility configures the adapter to receive and transmit Jumbo Frames. The maximum MTU size for Jumbo Frames is 16114. .Pp This driver version supports VLANs. For information on enabling VLANs, see the .Pa README . .Sh HARDWARE The .Nm driver supports the following cards: .Pp .Bl -bullet -compact .It Intel PRO/10GbE LR Server Adapter .It Intel PRO/10GbE SR Server Adapter .El .Sh DIAGNOSTICS .Bl -diag .It "ixgb%d: Unable to allocate bus resource: memory" A fatal initialization error has occurred. .It "ixgb%d: Unable to allocate bus resource: interrupt" A fatal initialization error has occurred. .It "ixgb%d: watchdog timeout -- resetting" The device has stopped responding to the network, or there is a problem with the network connection (cable). .El .Sh SUPPORT For additional information regarding building and installation, see the .Pa README included with the driver. For general information and support, go to the Intel support website at: .Pa http://support.intel.com . .Pp If an issue is identified with the released source code on the supported kernel with a supported adapter, email the specific information related to the issue to .Aq freebsdnic@mailbox.intel.com . .Sh SEE ALSO .Xr arp 4 , .Xr gx 4 , .Xr netintro 4 , .Xr ng_ether 4 , .Xr polling 4 , .Xr vlan 4 , .Xr ifconfig 8 .Sh HISTORY The .Nm device driver first appeared in .Fx 4.11 and .Fx 5.3 . .Sh AUTHORS The .Nm driver was written by .An Intel Corporation Aq freebsdnic@mailbox.intel.com . Index: stable/5/share/man/man4/man4.i386/acpi_panasonic.4 =================================================================== --- stable/5/share/man/man4/man4.i386/acpi_panasonic.4 (revision 139701) +++ stable/5/share/man/man4/man4.i386/acpi_panasonic.4 (revision 139702) @@ -1,161 +1,161 @@ .\" .\" Copyright (c) 2004 OGAWA Takaya .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" .\" $FreeBSD$ .\" .Dd July 11, 2004 .Dt ACPI_PANASONIC 4 i386 .Os .Sh NAME .Nm acpi_panasonic .Nd "ACPI hotkey driver for Panasonic laptops" .Sh SYNOPSIS .Cd "device acpi_panasonic" .Sh DESCRIPTION The .Nm driver enables such hotkey facilities of various Panasonic laptops as changing LCD brightness, controlling mixer volumes, entering sleep or suspended state and so on. On the following models it is reported to work: Let's note (or Toughbook, outside Japan) CF-R1N, CF-R2A and CF-R3. It may also work on other models as well. .Pp The driver consists of three functionalities. The first is to detect hotkey events and take corresponding actions, which include changing LCD luminance and speaker mute state. The second role is to notify occurences of the event by way of .Xr devctl 4 and eventually to .Xr devd 8 . The third and last is to provide a way to adjust LCD brightness and -sound mute state via sysctl. +sound mute state via sysctl. .Ss Hotkeys There are 9 hotkeys available on the supported hardwares: .Pp .Bl -tag -compact -offset indent .It Sy \&Fn+F1 Make LCD backlight darker. .It Sy \&Fn+F2 Make LCD backlight brighter. .It Sy \&Fn+F3 Switch video output between LCD and CRT. Not supported by the .Nm driver. .It Sy \&Fn+F4 Toggle muting the speaker. .It Sy \&Fn+F5 Turn the mixer volume down. .It Sy \&Fn+F6 Turn the mixer volume up. .It Sy \&Fn+F7 Enter suspend-to-RAM state. .It Sy \&Fn+F9 Show battery status. .It Sy \&Fn+F10 Enter suspend-to-disk state. .El .Pp Actions are automatically taken within the driver for .Sy \&Fn+F1 , .Sy \&Fn+F2 and .Sy \&Fn+F4 . For the other events such as mixer control and showing battery status, .Xr devd 8 should take the role as described below. .Ss Devd Events When notified to .Xr devd 8 , the hotkey event provides the following information: .Pp .Bl -tag -compact -offset indent .It system .Qq ACPI .It subsystem .Qq Panasonic .It type The source of the event in ACPI namespace. The value depends on the model but typically .Qq \e_SB_.HKEY . .It notify Event code (see below). .El .Pp Event codes to be generated are assigned as follows: .Bl -tag -offset indent .It 0x81-0x86, 0x89 .Sy \&Fn+F pressed. 0x81 corresponds to .Sy \&Fn+F1 , 0x82 corresponds to .Sy \&Fn+F2 , and so on. .It 0x01-0x07, 0x09, 0x1a .Sy \&Fn+F released. 0x01 corresponds to .Sy \&Fn+F1 , 0x02 corresponds to .Sy \&Fn+F2 , and so on. .El .Sh SYSCTLS The following read-write MIBs are available: .Bl -tag -width indent .It Va hw.acpi.panasonic.lcd_brightness_max The max level of brightness. The value ranges from 0 to 255. CF-R1N and CF-R2A should be 255, CF-R3 is 31. .It Va hw.acpi.panasonic.lcd_brightness Current brightness level of the LCD. The value ranges from 0 to .Va hw.acpi.panasonic.lcd_brightness_max . .It Va hw.acpi.panasonic.sound_mute A boolean flag to control whether to mute the speaker. The value 1 means to mute and 0 not. .El .Sh SEE ALSO .Xr acpi 4 , .Xr sysctl 8 , .Xr devd 8 , .Xr devd.conf 5 .\" .Sh HISTORY .\" The .\" .Nm .\" driver first appeared in .\" .Fx 5.3 . .Sh AUTHORS The .Nm driver and this manual page were written by .An OGAWA Takaya Aq t\-ogawa@triaez.kaisei.org and .An TAKAHASHI Yoshihiro Aq nyan@FreeBSD.org . .Sh BUGS The code is written in trial-and-error manner. There is no way to confirm the correctness except by .Dq it just works here . Index: stable/5/share/man/man5/rc.conf.5 =================================================================== --- stable/5/share/man/man5/rc.conf.5 (revision 139701) +++ stable/5/share/man/man5/rc.conf.5 (revision 139702) @@ -1,3221 +1,3221 @@ .\" Copyright (c) 1995 .\" Jordan K. Hubbard .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" .\" $FreeBSD$ .\" .Dd November 9, 2004 .Dt RC.CONF 5 .Os .Sh NAME .Nm rc.conf .Nd system configuration information .Sh DESCRIPTION The file .Nm contains descriptive information about the local host name, configuration details for any potential network interfaces and which services should be started up at system initial boot time. In new installations, the .Nm file is generally initialized by the system installation utility, .Xr sysinstall 8 . .Pp The purpose of .Nm is not to run commands or perform system startup actions directly. Instead, it is included by the various generic startup scripts in .Pa /etc which conditionalize their internal actions according to the settings found there. .Pp The .Pa /etc/rc.conf file is included from the file .Pa /etc/defaults/rc.conf , which specifies the default settings for all the available options. Options need only be specified in .Pa /etc/rc.conf when the system administrator wishes to override these defaults. The file .Pa /etc/rc.conf.local is used to override settings in .Pa /etc/rc.conf for historical reasons. See the .Va rc_conf_files variable below. .Pp The following list provides a name and short description for each variable that can be set in the .Nm file: .Bl -tag -width indent-two .It Va rc_debug .Pq Vt bool If set to .Dq Li YES , enable output of debug messages from rc scripts. This variable can be helpful in diagnosing mistakes when editing or integrating new scripts. Beware that this produces copious output to the terminal and .Xr syslog 3 . .It Va rc_info .Pq Vt bool If set to .Dq Li NO , disable informational messages from the rc scripts. Informational messages are displayed when a condition that is not serious enough to warrant a warning or an error occurs. .It Va swapfile .Pq Vt str If set to .Dq Li NO , no swapfile is installed, otherwise the value is used as the full pathname to a file to use for additional swap space. .It Va apm_enable .Pq Vt bool If set to .Dq Li YES , enable support for Automatic Power Management with the .Xr apm 8 command. .It Va apmd_enable .Pq Vt bool Run .Xr apmd 8 to handle APM event from userland. This also enables support for APM. .It Va apmd_flags .Pq Vt str If .Va apmd_enable is set to .Dq Li YES , these are the flags to pass to the .Xr apmd 8 daemon. .It Va devd_enable .Pq Vt bool Run .Xr devd 8 to handle device added, removed or unknown events from the kernel. .It Va kldxref_enable .Pq Vt bool Set to .Dq Li NO by default. Set to .Dq Li YES to automatically rebuild .Pa linker.hints files with .Xr kldxref 8 at boot time. .It Va kldxref_clobber .Pq Vt bool Set to .Dq Li NO by default. If .Va kldxref_enable is true, setting to .Dq Li YES will overwrite existing .Pa linker.hints files at boot time. Otherwise, only missing .Pa linker.hints files are generated. .It Va kldxref_module_path .Pq Vt str Empty by default. A semi-colon .Pq Ql \&; delimited list of paths containing .Xr kld 4 modules. If empty, the contents of the .Va kern.module_path .Xr sysctl 8 are used. .It Va pccard_enable .Pq Vt bool If set to .Dq Li YES , enable PCCARD support at boot time. .It Va pccard_mem .Pq Vt str Set to PCCARD controller memory address or .Dq Li DEFAULT for the default value. .It Va pccard_ifconfig .Pq Vt str List of arguments to be passed to .Xr ifconfig 8 at boot time or on insertion of the card (e.g.\& .Dq Cm inet Li 192.168.1.1 Cm netmask Li 255.255.255.0 for a fixed address or .Dq Li DHCP for a DHCP client). .It Va pccard_beep .Pq Vt int If 0, set the PCCARD controller to silent mode. If 1, set it to beep mode. If 2, set it to melody mode. .It Va pccard_conf .Pq Vt str Path to the configuration file for the .Xr pccardd 8 daemon (e.g.\& .Pa /etc/pccard.conf.sample ) . .It Va pccardd_flags .Pq Vt str If .Va pccard_enable is set to .Dq Li YES , these are the flags to pass to the .Xr pccardd 8 daemon. .It Va pccard_ether_delay .Pq Vt str Set the delay before starting .Xr dhclient 8 in the .Pa /etc/pccard_ether script. This defaults to 5 seconds to work around a bug in the .Xr ed 4 driver which can lead to system hangs when using some newer .Xr ed 4 based cards. .It Va removable_interfaces .Pq Vt str List of removable network interfaces to be supported by .Pa /etc/pccard_ether . .It Va tmpmfs Controls the creation of a .Pa /tmp memory file system. Always happens if set to .Dq Li YES and never happens if set to .Dq Li NO . If set to anything else, a memory file system is created if .Pa /tmp is not writable. .It Va tmpsize Controls the size of a created .Pa /tmp memory file system. .It Va tmpmfs_flags Extra options passed to the .Xr mdmfs 8 utility when the memory file system for .Pa /tmp is created. The default is .Dq Li -S , which inhibits the use of softupdates on .Pa /tmp to waste as little space as possible. See .Xr mdmfs 8 for other options you can use in .Li tmpmfs_flags . .It Va varmfs Controls the creation of a .Pa /var memory file system. Always happens if set to .Dq Li YES and never happens if set to .Dq Li NO . If set to anything else, a memory file system is created if .Pa /var is not writable. .It Va varsize Controls the size of a created .Pa /var memory file system. .It Va varmfs_flags Extra options passed to the .Xr mdmfs 8 utility when the memory file system for .Pa /var is created. The default is .Dq Li -S , which inhibits the use of softupdates on .Pa /var to waste as little space as possible. See .Xr mdmfs 8 for other options you can use in .Li varmfs_flags . .It Va populate_var Controls the automatic population of the .Pa /var file system. Always happens if set to .Dq Li YES and never happens if set to .Dq Li NO . If set to anything else, a memory file system is created if .Pa /var is not writable. Note that this process requires access to certain commands in .Pa /usr before .Pa /usr is mounted on normal systems. .It Va local_startup .Pq Vt str List of directories to search for startup script files. .It Va script_name_sep .Pq Vt str The field separator to use for breaking down the list of startup script files into individual filenames. The default is a space. It is not necessary to change this unless there are startup scripts with names containing spaces. .It Va hostname .Pq Vt str The fully qualified domain name (FQDN) of this host on the network. This should almost certainly be set to something meaningful, even if there is no network connection. If .Xr dhclient 8 is used to set the hostname via DHCP, this variable should be set to an empty string. .It Va ipv6_enable .Pq Vt bool Enable support for IPv6 networking. Note that this requires that the kernel have been compiled with .Cd "options INET6" . .It Va nisdomainname .Pq Vt str The NIS domain name of this host, or .Dq Li NO if NIS is not used. .It Va dhclient_program .Pq Vt str Path to the DHCP client program .Pa ( /sbin/dhclient , the ISC DHCP client, is the default). .It Va dhclient_flags .Pq Vt str Additional flags to pass to the DHCP client program. For the ISC DHCP client, see the .Xr dhclient 8 manpage for a description of the command line options available. .It Va background_dhclient .Pq Vt bool Set to .Dq Li YES to start the dhcp client in background. This can cause trouble with applications depending on a working network, but it will provide a faster startup in many cases. .It Va firewall_enable .Pq Vt bool Set to .Dq Li YES to load firewall rules at startup. If the kernel was not built with .Cd "options IPFIREWALL" , the .Pa ipfw.ko kernel module will be loaded. See also .Va ipfilter_enable . .It Va ipv6_firewall_enable .Pq Vt bool The IPv6 equivalent of .Va firewall_enable . Set to .Dq Li YES to load IPv6 firewall rules at startup. If the kernel was not built with .Cd "options IPV6FIREWALL" , the .Pa ip6fw.ko kernel module will be loaded. .It Va firewall_script .Pq Vt str This variable specifies the full path to the firewall script to run. The default is .Pa /etc/rc.firewall . .It Va ipv6_firewall_script .Pq Vt str The IPv6 equivalent of .Va firewall_script . .It Va firewall_type .Pq Vt str Names the firewall type from the selection in .Pa /etc/rc.firewall , or the file which contains the local firewall ruleset. Valid selections from .Pa /etc/rc.firewall are: .Pp .Bl -tag -width ".Li simple" -compact .It Li open unrestricted IP access .It Li closed all IP services disabled, except via .Dq Li lo0 .It Li client basic protection for a workstation .It Li simple basic protection for a LAN. .El .Pp If a filename is specified, the full path must be given. .It Va ipv6_firewall_type .Pq Vt str The IPv6 equivalent of .Va firewall_type . .It Va firewall_quiet .Pq Vt bool Set to .Dq Li YES to disable the display of firewall rules on the console during boot. .It Va ipv6_firewall_quiet .Pq Vt bool The IPv6 equivalent of .Va firewall_quiet . .It Va firewall_logging .Pq Vt bool Set to .Dq Li YES to enable firewall event logging. This is equivalent to the .Dv IPFIREWALL_VERBOSE kernel option. .It Va ipv6_firewall_logging .Pq Vt bool The IPv6 equivalent of .Va firewall_logging . .It Va firewall_flags .Pq Vt str Flags passed to .Xr ipfw 8 if .Va firewall_type specifies a filename. .It Va ipv6_firewall_flags .Pq Vt str The IPv6 equivalent of .Va firewall_flags . .It Va natd_program .Pq Vt str Path to .Xr natd 8 . .It Va natd_enable .Pq Vt bool Set to .Dq Li YES to enable .Xr natd 8 . .Va firewall_enable must also be set to .Dq Li YES , and .Xr divert 4 sockets must be enabled in the kernel. If the kernel was not built with .Cd "options IPDIVERT" , the .Pa ipdivert.ko kernel module will be loaded. .It Va natd_interface .Pq Vt str This is the name of the public interface on which .Xr natd 8 should run. The interface may be given as an interface name or as an IP address. .It Va natd_flags .Pq Vt str Additional .Xr natd 8 flags should be placed here. The .Fl n or .Fl a flag is automatically added with the above .Va natd_interface as an argument. .\" ----- ipfilter_enable setting -------------------------------- .It Va ipfilter_enable .Pq Vt bool Set to .Dq Li NO by default. Setting this to .Dq Li YES enables .Xr ipf 8 packet filtering. .Pp Typical usage will require putting .Bd -literal ipfilter_enable="YES" ipnat_enable="YES" ipmon_enable="YES" ipfs_enable="YES" .Ed .Pp into .Pa /etc/rc.conf and editing .Pa /etc/ipf.rules and .Pa /etc/ipnat.rules appropriately. .Pp Note that .Va ipfilter_enable and .Va ipnat_enable can be enabled independently. .Va ipmon_enable and .Va ipfs_enable both require at least one of .Va ipfilter_enable and .Va ipnat_enable to be enabled. .Pp Having .Bd -literal options IPFILTER options IPFILTER_LOG options IPFILTER_DEFAULT_BLOCK .Ed .Pp in the kernel configuration file is a good idea, too. .\" ----- ipfilter_program setting ------------------------------ .It Va ipfilter_program .Pq Vt str Path to .Xr ipf 8 (default .Pa /sbin/ipf ) . .\" ----- ipfilter_rules setting -------------------------------- .It Va ipfilter_rules .Pq Vt str Set to .Pa /etc/ipf.rules by default. This variable contains the name of the filter rule definition file. The file is expected to be readable for the .Xr ipf 8 command to execute. .\" ----- ipv6_ipfilter_rules setting --------------------------- .It Va ipv6_ipfilter_rules .Pq Vt str Set to .Pa /etc/ipf6.rules by default. This variable contains the IPv6 filter rule definition file. The file is expected to be readable for the .Xr ipf 8 command to execute. .\" ----- ipfilter_flags setting -------------------------------- .It Va ipfilter_flags .Pq Vt str Empty by default. This variable contains flags passed to the .Xr ipf 8 program. .\" ----- ipnat_enable setting ---------------------------------- .It Va ipnat_enable .Pq Vt bool Set to .Dq Li NO by default. Set it to .Dq Li YES to enable .Xr ipnat 1 network address translation. See .Va ipfilter_enable for a detailed discussion. .\" ----- ipnat_program setting --------------------------------- .It Va ipnat_program .Pq Vt str Path to .Xr ipnat 1 (default .Pa /sbin/ipnat ) . .\" ----- ipnat_rules setting ----------------------------------- .It Va ipnat_rules .Pq Vt str Set to .Pa /etc/ipnat.rules by default. This variable contains the name of the file holding the network address translation definition. This file is expected to be readable for the .Xr ipnat 1 command to execute. .\" ----- ipnat_flags setting ----------------------------------- .It Va ipnat_flags .Pq Vt str Empty by default. This variable contains flags passed to the .Xr ipnat 1 program. .\" ----- ipmon_enable setting ---------------------------------- .It Va ipmon_enable .Pq Vt bool Set to .Dq Li NO by default. Set it to .Dq Li YES to enable .Xr ipmon 8 monitoring (logging .Xr ipf 8 and .Xr ipnat 1 events). Setting this variable needs setting .Va ipfilter_enable or .Va ipnat_enable too. See .Va ipfilter_enable for a detailed discussion. .\" ----- ipmon_program setting --------------------------------- .It Va ipmon_program .Pq Vt str Path to .Xr ipmon 8 (default .Pa /sbin/ipmon ) . .\" ----- ipmon_flags setting ----------------------------------- .It Va ipmon_flags .Pq Vt str Set to .Dq Li -Ds by default. This variable contains flags passed to the .Xr ipmon 8 program. Another typical example would be .Dq Fl D Pa /var/log/ipflog to have .Xr ipmon 8 log directly to a file bypassing .Xr syslogd 8 . Make sure to adjust .Pa /etc/newsyslog.conf in such case like this: .Bd -literal /var/log/ipflog 640 10 100 * Z /var/run/ipmon.pid .Ed .\" ----- ipfs_enable setting ----------------------------------- .It Va ipfs_enable .Pq Vt bool Set to .Dq Li NO by default. Set it to .Dq Li YES to enable .Xr ipfs 8 saving the filter and NAT state tables during shutdown and reloading them during startup again. Setting this variable needs setting .Va ipfilter_enable or .Va ipnat_enable to .Dq Li YES too. See .Va ipfilter_enable for a detailed discussion. Note that if .Va kern_securelevel is set to 3, .Va ipfs_enable cannot be used because the raised securelevel will prevent .Xr ipfs 8 from saving the state tables at shutdown time. .\" ----- ipfs_program setting ---------------------------------- .It Va ipfs_program .Pq Vt str Path to .Xr ipfs 8 (default .Pa /sbin/ipfs ) . .\" ----- ipfs_flags setting ------------------------------------ .It Va ipfs_flags .Pq Vt str Empty by default. This variable contains flags passed to the .Xr ipfs 8 program. .\" ----- end of added ipf hook --------------------------------- .It Va pf_enable .Pq Vt bool Set to .Dq Li NO by default. Setting this to .Dq Li YES enables .Xr pf 4 packet filtering. .Pp Typical usage will require putting .Pp .Dl pf_enable="YES" .Pp into .Pa /etc/rc.conf and editing .Pa /etc/pf.conf appropriately. .Pp .Dl "device pf" .Pp builds pf into the kernel. Otherwise it is loaded from a module. .It Va pf_rules .Pq Vt str Path to .Xr pf 4 ruleset configuration file (default .Pa /etc/pf.conf ) . .It Va pf_program .Pq Vt str Path to .Xr pfctl 8 (default .Pa /sbin/pfctl ) . .It Va pf_flags .Pq Vt str If .Va pf_enable is set to .Dq Li YES , these flags are passed to the .Xr pfctl 8 program when loading the ruleset. .It Va pflog_enable .Pq Vt bool Set to .Dq Li NO by default. Setting this to .Dq Li YES enables .Xr pflogd 8 which logs packtes from the .Xr pf 4 packet filter. .It Va pflog_logfile .Pq Vt str If .Va pflog_enable is set to .Dq Li YES this controls where .Xr pflogd 8 stores the logfile (default .Pa /var/log/pflog ) . Check .Pa /etc/newsyslog.conf to adjust logfile rotation for this. .It Va pflog_program .Pq Vt str Path to .Xr pflogd 8 (default .Pa /sbin/pflogd ) . .It Va pflog_flags .Pq Vt str Empty by default. This variable contains additional flags passed to the .Xr pflogd 8 program. .It Va tcp_extensions .Pq Vt bool Set to .Dq Li YES by default. Setting this to .Dq Li NO disables certain TCP options as described by .Rs .%T "RFC 1323" .Re Setting this to .Dq Li NO might help remedy such problems with connections as randomly hanging or other weird behavior. Some network devices are known to be broken with respect to these options. .It Va log_in_vain .Pq Vt int Set to 0 by default. The .Xr sysctl 8 variables, .Va net.inet.tcp.log_in_vain and .Va net.inet.udp.log_in_vain , as described in .Xr tcp 4 and .Xr udp 4 , are set to the given value. .It Va tcp_keepalive .Pq Vt bool Set to .Dq Li YES by default. Setting to .Dq Li NO will disable probing idle TCP connections to verify that the peer is still up and reachable. .It Va tcp_drop_synfin .Pq Vt bool Set to .Dq Li NO by default. Setting to .Dq Li YES will cause the kernel to ignore TCP frames that have both the SYN and FIN flags set. This prevents OS fingerprinting, but may break some legitimate applications. This option is only available if the kernel was built with the .Dv TCP_DROP_SYNFIN option. .It Va icmp_drop_redirect .Pq Vt bool Set to .Dq Li NO by default. Setting to .Dq Li YES will cause the kernel to ignore ICMP REDIRECT packets. Refer to .Xr icmp 4 for more information. .It Va icmp_log_redirect .Pq Vt bool Set to .Dq Li NO by default. Setting to .Dq Li YES will cause the kernel to log ICMP REDIRECT packets. Note that the log messages are not rate-limited, so this option should only be used for troubleshooting networks. Refer to .Xr icmp 4 for more information. .It Va icmp_bmcastecho .Pq Vt bool Set to .Dq Li YES to respond to broadcast or multicast ICMP ping packets. Refer to .Xr icmp 4 for more information. .It Va ip_portrange_first .Pq Vt int If not set to .Dq Li NO , this is the first port in the default portrange. Refer to .Xr ip 4 for more information. .It Va ip_portrange_last .Pq Vt int If not set to .Dq Li NO , this is the last port in the default portrange. Refer to .Xr ip 4 for more information. .It Va network_interfaces .Pq Vt str Set to the list of network interfaces to configure on this host. For example, if the only network devices in the system are the loopback device .Pq Li lo0 and a NIC using the .Xr ed 4 driver, this could be set to .Dq Li "lo0 ed0" . An .Va ifconfig_ Ns Aq Ar interface variable is also assumed to exist for each value of .Ar interface . It is also possible to add IP alias entries here in cases where multiple IP addresses registered against a single interface are desired. Assuming that the interface in question was .Li ed0 , it might look something like this: .Bd -literal ifconfig_ed0_alias0="inet 127.0.0.253 netmask 0xffffffff" ifconfig_ed0_alias1="inet 127.0.0.254 netmask 0xffffffff" .Ed .Pp And so on. For each .Va ifconfig_ Ns Ao Ar interface Ac Ns Va _alias Ns Aq Ar n entry that is found, its contents are passed to .Xr ifconfig 8 . Execution stops at the first unsuccessful access, so if something like this is present: .Bd -literal ifconfig_ed0_alias0="inet 127.0.0.251 netmask 0xffffffff" ifconfig_ed0_alias1="inet 127.0.0.252 netmask 0xffffffff" ifconfig_ed0_alias2="inet 127.0.0.253 netmask 0xffffffff" ifconfig_ed0_alias4="inet 127.0.0.254 netmask 0xffffffff" .Ed .Pp Then note that alias4 would .Em not be added since the search would stop with the missing alias3 entry. .Pp If the .Pa /etc/start_if. Ns Aq Ar interface file is present, it is read and executed by the .Xr sh 1 interpreter before configuring the interface as specified in the .Va ifconfig_ Ns Aq Ar interface and .Va ifconfig_ Ns Ao Ar interface Ac Ns Va _alias Ns Aq Ar n variables. .Pp It is possible to bring up an interface with DHCP by setting the .Va ifconfig_ Ns Aq Ar interface variable to .Dq Li DHCP . For instance, to initialize the .Li ed0 device via DHCP, it is possible to use something like: .Bd -literal ifconfig_ed0="DHCP" .Ed .Pp It is also possible to rename interface by doing: .Bd -literal ifconfig_ed0_name="net0" ifconfig_net0="inet 10.0.0.1 netmask 0xffff0000" .Ed .It Va ipv6_network_interfaces .Pq Vt str This is the IPv6 equivalent of .Va network_interfaces . Instead of setting the ifconfig variables as .Va ifconfig_ Ns Aq Ar interface they should be set as .Va ipv6_ifconfig_ Ns Aq Ar interface . Aliases should be set as .Va ipv6_ifconfig_ Ns Ao Ar interface Ac Ns Va _alias Ns Aq Ar n . .Va ipv6_prefix_ Ns Aq Ar interface does something. Interfaces that do not have a .Va ipv6_ifconfig_ Ns Aq Ar interface setting will be auto configured by .Xr rtsol 8 if the .Va ipv6_gateway_enable is set to .Dq Li NO . Note that the IPv6 networking code does not support the .Pa /etc/start_if. Ns Aq Ar interface files. .It Va ipv6_default_interface .Pq Vt str If not set to .Dq Li NO , this is the default output interface for scoped addresses. Now this works only for IPv6 link local multicast addresses. .It Va cloned_interfaces .Pq Vt str Set to the list of clonable network interfaces to create on this host. Entries in .Va cloned_interfaces are automatically appended to .Va network_interfaces for configuration. .It Va gif_interfaces .Pq Vt str Set to the list of .Xr gif 4 tunnel interfaces to configure on this host. A .Va gifconfig_ Ns Aq Ar interface variable is assumed to exist for each value of .Ar interface . The value of this variable is used to configure the link layer of the tunnel according to the syntax of the .Cm tunnel option to .Xr ifconfig 8 . Additionally, this option ensures that each listed interface is created via the .Cm create option to .Xr ifconfig 8 before attempting to configure it. .It Va sppp_interfaces .Pq Vt str Set to the list of .Xr sppp 4 interfaces to configure on this host. A .Va spppconfig_ Ns Aq Ar interface variable is assumed to exist for each value of .Ar interface . Each interface should also be configured by a general .Va ifconfig_ Ns Aq Ar interface setting. Refer to .Xr spppcontrol 8 for more information about available options. .It Va ppp_enable .Pq Vt bool If set to .Dq Li YES , run the .Xr ppp 8 daemon. .It Va ppp_mode .Pq Vt str Mode in which to run the .Xr ppp 8 daemon. Accepted modes are .Dq Li auto , .Dq Li ddial , .Dq Li direct and .Dq Li dedicated . See the manual for a full description. .It Va ppp_nat .Pq Vt bool If set to .Dq Li YES , enables network address translation. Used in conjunction with .Va gateway_enable allows hosts on private network addresses access to the Internet using this host as a network address translating router. .It Va ppp_profile .Pq Vt str The name of the profile to use from .Pa /etc/ppp/ppp.conf . .It Va ppp_user .Pq Vt str The name of the user under which .Xr ppp 8 should be started. By default, .Xr ppp 8 is started as .Dq Li root . .It Va rc_conf_files .Pq Vt str This option is used to specify a list of files that will override the settings in .Pa /etc/defaults/rc.conf . The files will be read in the order in which they are specified and should include the full path to the file. By default, the files specified are .Pa /etc/rc.conf and .Pa /etc/rc.conf.local .It Va gbde_autoattach_all .Pq Vt bool If set to .Dq Li YES , .Pa /etc/rc.d/gbde will attempt to automatically initialize your .bde devices in .Pa /etc/fstab . .It Va gbde_devices .Pq Vt str List the devices that the script should try to attach, or .Dq Li AUTO . .It Va gbde_lockdir .Pq Vt str The directory where the .Xr gbde 4 lockfiles are located. The default lockfile directory is .Pa /etc . .Pp The lockfile for each individual .Xr gbde 4 device can be overridden by setting the variable .Va gbde_lock_ Ns Aq Ar device , where .Ar device is the encrypted device without the .Dq Pa /dev/ and .Dq Pa .bde parts. .It Va gbde_attach_attempts .Pq Vt int Number of times to attempt attaching to a .Xr gbde 4 device, i.e. how many times the user is asked for the pass-phrase. Default is 3. .It Va gbde_swap_enable .Pq Vt bool If set to .Dq Li YES , any .bde swap devices listed in .Pa /etc/fstab will be initialized with a random, one-shot key. Note that this makes recovery of kernel dumps impossible. .It Va root_rw_mount .Pq Vt bool Set to .Dq Li YES by default. After the file systems are checked at boot time, the root file system is remounted as read-write if this is set to .Dq Li YES . Diskless systems that mount their root file system from a read-only remote NFS share should set this to .Dq Li NO in their .Pa rc.conf . .It Va fsck_y_enable .Pq Vt bool If set to .Dq Li YES , .Xr fsck 8 will be run with the .Fl y flag if the initial preen of the file systems fails. .It Va background_fsck .Pq Vt bool If set to .Dq Li YES , the system will attempt to run .Xr fsck 8 in the background where possible. .It Va background_fsck_delay .Pq Vt int The amount of time in seconds to sleep before starting a background .Xr fsck 8 . It defaults to sixty seconds to allow large applications such as the X server to start before disk I/O bandwidth is monopolized by .Xr fsck 8 . .It Va netfs_types .Pq Vt str List of file system types that are network-based. This list should generally not be modified by end users. Use .Va extra_netfs_types instead. .It Va extra_netfs_types .Pq Vt str If set to something other than .Dq Li NO (the default), this variable extends the list of file system types for which automatic mounting at startup by .Xr rc 8 should be delayed until the network is initialized. It should contain a whitespace-separated list of network file system descriptor pairs, each consisting of a file system type as passed to .Xr mount 8 and a human-readable, one-word description, joined with a colon .Pq Ql \&: . Extending the default list in this way is only necessary when third party file system types are used. .It Va syslogd_enable .Pq Vt bool If set to .Dq Li YES , run the .Xr syslogd 8 daemon. .It Va syslogd_program .Pq Vt str Path to .Xr syslogd 8 (default .Pa /usr/sbin/syslogd ) . .It Va syslogd_flags .Pq Vt str If .Va syslogd_enable is set to .Dq Li YES , these are the flags to pass to .Xr syslogd 8 . .It Va inetd_enable .Pq Vt bool If set to .Dq Li YES , run the .Xr inetd 8 daemon. .It Va inetd_program .Pq Vt str Path to .Xr inetd 8 (default .Pa /usr/sbin/inetd ) . .It Va inetd_flags .Pq Vt str If .Va inetd_enable is set to .Dq Li YES , these are the flags to pass to .Xr inetd 8 . .It Va named_enable .Pq Vt bool If set to .Dq Li YES , run the .Xr named 8 daemon. .It Va named_program .Pq Vt str Path to .Xr named 8 (default .Pa /usr/sbin/named ) . .It Va named_flags .Pq Vt str If .Va named_enable is set to .Dq Li YES , these are the flags to pass to .Xr named 8 . .It Va named_pidfile .Pq Vt str This is the default path to the .Xr named 8 daemon's PID file. Change it if you change the location in .Xr named.conf 5 . .It Va named_chrootdir .Pq Vt str The root directory for a name server run in a .Xr chroot 8 environment (default .Pa /var/named ) . If left empty .Xr named 8 will not be run in a .Xr chroot 8 environment. .It Va named_chroot_autoupdate .Pq Vt bool Set to .Dq Li NO to disable automatic update of the .Xr chroot 8 environment. .It Va named_symlink_enable .Pq Vt bool Set to .Dq Li NO to disable symlinking of daemon's PID file into the .Xr chroot 8 environment. .It Va kerberos5_server_enable .Pq Vt bool Set to .Dq Li YES to start a Kerberos 5 authentication server at boot time. .It Va kerberos5_server .Pq Vt str If .Va kerberos5_server_enable is set to .Dq Li YES this is the path to Kerberos 5 Authentication Server. .It Va kadmind5_server_enable .Pq Vt bool Set to .Dq Li YES to start .Xr kadmind 8 , the Kerberos 5 Administration Daemon; set to .Dq Li NO on a slave server. .It Va kadmind5_server .Pq Vt str If .Va kadmind5_server_enable is set to .Dq Li YES this is the path to Kerberos 5 Administration Daemon. .It Va kpasswdd_server_enable .Pq Vt bool Set to .Dq Li YES to start .Xr kpasswdd 8 , the Kerberos 5 Password-Changing Daemon; set to .Dq Li NO on a slave server. .It Va kpasswdd_server .Pq Vt str If .Va kpasswdd_server_enable is set to .Dq Li YES this is the path to Kerberos 5 Password-Changing Daemon. .It Va rwhod_enable .Pq Vt bool If set to .Dq Li YES , run the .Xr rwhod 8 daemon at boot time. .It Va rwhod_flags .Pq Vt str If .Va rwhod_enable is set to .Dq Li YES , these are the flags to pass to it. .It Va amd_enable .Pq Vt bool If set to .Dq Li YES , run the .Xr amd 8 daemon at boot time. .It Va amd_flags .Pq Vt str If .Va amd_enable is set to .Dq Li YES , these are the flags to pass to it. See the .Xr amd 8 manpage for more information. .It Va amd_map_program .Pq Vt str If set, the specified program is run to get the list of .Xr amd 8 maps. For example, if the .Xr amd 8 maps are stored in NIS, one can set this to run .Xr ypcat 1 to get a list of .Xr amd 8 maps from the .Pa amd.master NIS map. .It Va update_motd .Pq Vt bool If set to .Dq Li YES , .Pa /etc/motd will be updated at boot time to reflect the kernel release being run. If set to .Dq Li NO , .Pa /etc/motd will not be updated. .It Va nfs_client_enable .Pq Vt bool If set to .Dq Li YES , run the NFS client daemons at boot time. .It Va nfs_access_cache .Pq Vt int If .Va nfs_client_enable is set to .Dq Li YES , this can be set to .Dq Li 0 to disable NFS ACCESS RPC caching, or to the number of seconds for which NFS ACCESS results should be cached. A value of 2-10 seconds will substantially reduce network traffic for many NFS operations. .It Va nfs_server_enable .Pq Vt bool If set to .Dq Li YES , run the NFS server daemons at boot time. .It Va nfs_server_flags .Pq Vt str If .Va nfs_server_enable is set to .Dq Li YES , these are the flags to pass to the .Xr nfsd 8 daemon. .It Va mountd_enable .Pq Vt bool If set to .Dq Li YES , and no .Va nfs_server_enable is set, start .Xr mountd 8 , but not .Xr nfsd 8 daemon. It is commonly needed to run CFS without real NFS used. .It Va mountd_flags .Pq Vt str If .Va mountd_enable is set to .Dq Li YES , these are the flags to pass to the .Xr mountd 8 daemon. .It Va weak_mountd_authentication .Pq Vt bool If set to .Dq Li YES , allow services like PCNFSD to make non-privileged mount requests. .It Va nfs_reserved_port_only .Pq Vt bool If set to .Dq Li YES , provide NFS services only on a secure port. .It Va nfs_bufpackets .Pq Vt int If set to a number, indicates the number of packets worth of socket buffer space to reserve on an NFS client. The kernel default is typically 4. Using a higher number may be useful on gigabit networks to improve performance. The minimum value is 2 and the maximum is 64. .It Va rpc_lockd_enable .Pq Vt bool If set to .Dq Li YES and also an NFS server, run .Xr rpc.lockd 8 at boot time. .It Va rpc_statd_enable .Pq Vt bool If set to .Dq Li YES and also an NFS server, run .Xr rpc.statd 8 at boot time. .It Va rpcbind_program .Pq Vt str Path to .Xr rpcbind 8 (default .Pa /usr/sbin/rpcbind ) . .It Va rpcbind_enable .Pq Vt bool If set to .Dq Li YES , run the .Xr rpcbind 8 service at boot time. .It Va rpcbind_flags .Pq Vt str If .Va rpcbind_enable is set to .Dq Li YES , these are the flags to pass to the .Xr rpcbind 8 daemon. .It Va keyserv_enable .Pq Vt bool If set to .Dq Li YES , run the .Xr keyserv 8 daemon on boot for running Secure RPC. .It Va keyserv_flags .Pq Vt str If .Va keyserv_enable is set to .Dq Li YES , these are the flags to pass to .Xr keyserv 8 daemon. .It Va pppoed_enable .Pq Vt bool If set to .Dq Li YES , run the .Xr pppoed 8 daemon at boot time to provide PPP over Ethernet services. .It Va pppoed_ Ns Ar provider .Pq Vt str .Xr pppoed 8 listens to requests to this .Ar provider and ultimately runs .Xr ppp 8 with a .Ar system argument of the same name. .It Va pppoed_flags .Pq Vt str Additional flags to pass to .Xr pppoed 8 . .It Va pppoed_interface .Pq Vt str The network interface to run .Xr pppoed 8 on. This is mandatory when .Va pppoed_enable is set to .Dq Li YES . .It Va timed_enable .Pq Vt bool If set to .Dq Li YES , run the .Xr timed 8 service at boot time. This command is intended for networks of machines where a consistent .Dq "network time" for all hosts must be established. This is often useful in large NFS environments where time stamps on files are expected to be consistent network-wide. .It Va timed_flags .Pq Vt str If .Va timed_enable is set to .Dq Li YES , these are the flags to pass to the .Xr timed 8 service. .It Va ntpdate_enable .Pq Vt bool If set to .Dq Li YES , run .Xr ntpdate 8 at system startup. This command is intended to synchronize the system clock only .Em once from some standard reference. An option to set this up initially (from a list of known servers) is also provided by the .Xr sysinstall 8 program when the system is first installed. .It Va ntpdate_hosts .Pq Vt str A whitespace-separated list of NTP servers to synchronize with at startup. The default is to use the servers listed in .Pa /etc/ntp.conf , if that file exists. .It Va ntpdate_program .Pq Vt str Path to .Xr ntpdate 8 (default .Pa /usr/sbin/ntpdate ) . .It Va ntpdate_flags .Pq Vt str If .Va ntpdate_enable is set to .Dq Li YES , these are the flags to pass to the .Xr ntpdate 8 command (typically a hostname). .It Va ntpd_enable .Pq Vt bool If set to .Dq Li YES , run the .Xr ntpd 8 command at boot time. .It Va ntpd_program .Pq Vt str Path to .Xr ntpd 8 (default .Pa /usr/sbin/ntpd ) . .It Va ntpd_flags .Pq Vt str If .Va ntpd_enable is set to .Dq Li YES , these are the flags to pass to the .Xr ntpd 8 daemon. .It Va ntpd_sync_on_start .Pq Vt bool If set to .Dq Li YES , .Xr ntpd 8 is run with the .Op Fl g flag, which syncs the system's clock on startup. See .Xr ntpd 8 for more information regarding the .Op Fl g option. This is a preferred alternative to using .Xr ntpdate 1 or specifying the .Pa /etc/rc.conf tunable .Op Ar ntpdate_enable . .It Va nis_client_enable .Pq Vt bool If set to .Dq Li YES , run the .Xr ypbind 8 service at system boot time. .It Va nis_client_flags .Pq Vt str If .Va nis_client_enable is set to .Dq Li YES , these are the flags to pass to the .Xr ypbind 8 service. .It Va nis_ypset_enable .Pq Vt bool If set to .Dq Li YES , run the .Xr ypset 8 daemon at system boot time. .It Va nis_ypset_flags .Pq Vt str If .Va nis_ypset_enable is set to .Dq Li YES , these are the flags to pass to the .Xr ypset 8 daemon. .It Va nis_server_enable .Pq Vt bool If set to .Dq Li YES , run the .Xr ypserv 8 daemon at system boot time. .It Va nis_server_flags .Pq Vt str If .Va nis_server_enable is set to .Dq Li YES , these are the flags to pass to the .Xr ypserv 8 daemon. .It Va nis_ypxfrd_enable .Pq Vt bool If set to .Dq Li YES , run the .Xr rpc.ypxfrd 8 daemon at system boot time. .It Va nis_ypxfrd_flags .Pq Vt str If .Va nis_ypxfrd_enable is set to .Dq Li YES , these are the flags to pass to the .Xr rpc.ypxfrd 8 daemon. .It Va nis_yppasswdd_enable .Pq Vt bool If set to .Dq Li YES , run the .Xr rpc.yppasswdd 8 daemon at system boot time. .It Va nis_yppasswdd_flags .Pq Vt str If .Va nis_yppasswdd_enable is set to .Dq Li YES , these are the flags to pass to the .Xr rpc.yppasswdd 8 daemon. .It Va rpc_ypupdated_enable .Pq Vt bool If set to .Dq Li YES , run the .Nm rpc.ypupdated daemon at system boot time. .It Va defaultrouter .Pq Vt str If not set to .Dq Li NO , create a default route to this host name or IP address (use an IP address if this router is also required to get to the name server!). .It Va ipv6_defaultrouter .Pq Vt str The IPv6 equivalent of .Va defaultrouter . .It Va static_routes .Pq Vt str Set to the list of static routes that are to be added at system boot time. If not set to .Dq Li NO then for each whitespace separated .Ar element in the value, a .Va route_ Ns Aq Ar element variable is assumed to exist whose contents will later be passed to a .Dq Nm route Cm add operation. For example: .Bd -literal static_routes="mcast gif0local" route_mcast="-net 224.0.0.0/4 -iface gif0" route_gif0local="-host 169.254.1.1 -iface lo0" .Ed .It Va ipv6_static_routes .Pq Vt str The IPv6 equivalent of .Va static_routes . If not set to .Dq Li NO then for each whitespace separated .Ar element in the value, a .Va ipv6_route_ Ns Aq Ar element variable is assumed to exist whose contents will later be passed to a .Dq Nm route Cm add Fl inet6 operation. .It Va natm_static_routes .Pq Vt str The .Xr natmip 4 equivalent of .Va static_routes . If not empty then for each whitespace separated .Ar element in the value, a .Va route_ Ns Aq Ar element variable is assumed to exist whose contents will later be passed to a .Dq Nm atmconfig Cm natm Cm add operation. .It Va gateway_enable .Pq Vt bool If set to .Dq Li YES , configure host to act as an IP router, e.g.\& to forward packets between interfaces. .It Va ipv6_gateway_enable .Pq Vt bool The IPv6 equivalent of .Va gateway_enable . .It Va router_enable .Pq Vt bool If set to .Dq Li YES , run a routing daemon of some sort, based on the settings of .Va router and .Va router_flags . .It Va ipv6_router_enable .Pq Vt bool The IPv6 equivalent of .Va router_enable . If set to .Dq Li YES , run a routing daemon of some sort, based on the settings of .Va ipv6_router and .Va ipv6_router_flags . .It Va router .Pq Vt str If .Va router_enable is set to .Dq Li YES , this is the name of the routing daemon to use. .It Va ipv6_router .Pq Vt str The IPv6 equivalent of .Va router . .It Va router_flags .Pq Vt str If .Va router_enable is set to .Dq Li YES , these are the flags to pass to the routing daemon. .It Va ipv6_router_flags .Pq Vt str The IPv6 equivalent of .Va router_flags . .It Va mrouted_enable .Pq Vt bool If set to .Dq Li YES , run the multicast routing daemon, .Xr mrouted 8 . .It Va mroute6d_enable .Pq Vt bool The IPv6 equivalent of .Va mrouted_enable . If set to .Dq Li YES , run the IPv6 multicast routing daemon. Note that no IPv6 multicast routing daemon is included in the .Fx base system but .Xr pim6dd 8 can be installed from the .Fx Ports Collection. .It Va mrouted_flags .Pq Vt str If .Va mrouted_enable is set to .Dq Li YES , these are the flags to pass to the .Xr mrouted 8 daemon. .It Va mroute6d_flags .Pq Vt str The IPv6 equivalent of .Va mrouted_flags . If .Va mroute6d_enable is set to .Dq Li YES , these are the flags passed to the IPv6 multicast routing daemon. .It Va mroute6d_program .Pq Vt str If .Va mroute6d_enable is set to .Dq Li YES , this is the path to the IPv6 multicast routing daemon. .It Va rtadvd_enable .Pq Vt bool If set to .Dq Li YES , run the .Xr rtadvd 8 daemon at boot time. .Xr rtadvd 8 will only run if .Va ipv6_gateway_enable is also set to .Dq Li YES . The .Xr rtadvd 8 utility sends router advertisement packets to the interfaces specified in .Va rtadvd_interfaces and should only be enabled with great care. You may want to fine-tune .Xr rtadvd.conf 5 . .It Va rtadvd_interfaces .Pq Vt str If .Va rtadvd_enable is set to .Dq Li YES this is the list of interfaces to use. .It Va ipxgateway_enable .Pq Vt bool If set to .Dq Li YES , enable the routing of IPX traffic. .It Va ipxrouted_enable .Pq Vt bool If set to .Dq Li YES , run the .Xr IPXrouted 8 daemon at system boot time. .It Va ipxrouted_flags .Pq Vt str If .Va ipxrouted_enable is set to .Dq Li YES , these are the flags to pass to the .Xr IPXrouted 8 daemon. .It Va arpproxy_all .Pq Vt bool If set to .Dq Li YES , enable global proxy ARP. .It Va forward_sourceroute .Pq Vt bool If set to .Dq Li YES and .Va gateway_enable is also set to .Dq Li YES , source-routed packets are forwarded. .It Va accept_sourceroute .Pq Vt bool If set to .Dq Li YES , the system will accept source-routed packets directed at it. .It Va rarpd_enable .Pq Vt bool If set to .Dq Li YES , run the .Xr rarpd 8 daemon at system boot time. .It Va rarpd_flags .Pq Vt str If .Va rarpd_enable is set to .Dq Li YES , these are the flags to pass to the .Xr rarpd 8 daemon. .It Va bootparamd_enable .Pq Vt bool If set to .Dq Li YES , run the .Xr bootparamd 8 daemon at system boot time. .It Va bootparamd_flags .Pq Vt str If .Va bootparamd_enable is set to .Dq Li YES , these are the flags to pass to the .Xr bootparamd 8 daemon. .It Va stf_interface_ipv4addr .Pq Vt str If not set to .Dq Li NO , this is the local IPv4 address for 6to4 (IPv6 over IPv4 tunneling interface). Specify this entry to enable the 6to4 interface. .It Va stf_interface_ipv4plen .Pq Vt int Prefix length for 6to4 IPv4 addresses, to limit peer address range. An effective value is 0-31. .It Va stf_interface_ipv6_ifid .Pq Vt str IPv6 interface ID for .Xr stf 4 . This can be set to .Dq Li AUTO . .It Va stf_interface_ipv6_slaid .Pq Vt str IPv6 Site Level Aggregator for .Xr stf 4 . .It Va ipv6_faith_prefix .Pq Vt str If not set to .Dq Li NO , this is the faith prefix to enable a FAITH IPv6-to-IPv4 TCP translator. You also need .Xr faithd 8 setup. .It Va ipv6_ipv4mapping .Pq Vt bool If set to .Dq Li YES this enables IPv4 mapped IPv6 address communication (like .Li ::ffff:a.b.c.d ) . .It Va atm_enable .Pq Vt bool Set to .Dq Li YES to enable the configuration of ATM interfaces at system boot time. For all of the ATM variables described below, please refer to the .Xr atm 8 man page for further details on the available command parameters. Also refer to the files in .Pa /usr/share/examples/atm for more detailed configuration information. .It Va atm_load .Pq Vt str This is a list of physical ATM interface drivers to load. Typical values are .Dq Li hfa_pci and/or .Dq Li hea_pci . .It Va atm_netif_ Ns Aq Ar intf .Pq Vt str For the ATM physical interface .Ar intf , this variable defines the name prefix and count for the ATM network interfaces to be created. The value will be passed as the parameters of an .Dq Nm atm Cm "set netif" Ar intf command. .It Va atm_sigmgr_ Ns Aq Ar intf .Pq Vt str For the ATM physical interface .Ar intf , this variable defines the ATM signalling manager to be used. The value will be passed as the parameters of an .Dq Nm atm Cm attach Ar intf command. .It Va atm_prefix_ Ns Aq Ar intf .Pq Vt str For the ATM physical interface .Ar intf , this variable defines the NSAP prefix for interfaces using a UNI signalling manager. If set to .Dq Li ILMI , the prefix will automatically be set via the .Xr ilmid 8 daemon. Otherwise, the value will be passed as the parameters of an .Dq Nm atm Cm "set prefix" Ar intf command. .It Va atm_macaddr_ Ns Aq Ar intf .Pq Vt str For the ATM physical interface .Ar intf , this variable defines the MAC address for interfaces using a UNI signalling manager. If set to .Dq Li NO , the hardware MAC address contained in the ATM interface card will be used. Otherwise, the value will be passed as the parameters of an .Dq Nm atm Cm "set mac" Ar intf command. .It Va atm_arpserver_ Ns Aq Ar netif .Pq Vt str For the ATM network interface .Ar netif , this variable defines the ATM address for a host which is to provide ATMARP service. This variable is only applicable to interfaces using a UNI signalling manager. If set to .Dq Li local , this host will become an ATMARP server. The value will be passed as the parameters of an .Dq Nm atm Cm "set arpserver" Ar netif command. .It Va atm_scsparp_ Ns Aq Ar netif .Pq Vt bool If set to .Dq Li YES , SCSP/ATMARP service for the network interface .Ar netif will be initiated using the .Xr scspd 8 and .Xr atmarpd 8 daemons. This variable is only applicable if .Va atm_arpserver_ Ns Aq Ar netif is set to .Dq Li local . .It Va atm_pvcs .Pq Vt str Set to the list of ATM PVCs to be added at system boot time. For each whitespace separated .Ar element in the value, an .Va atm_pvc_ Ns Aq Ar element variable is assumed to exist. The value of each of these variables will be passed as the parameters of an .Dq Nm atm Cm "add pvc" command. .It Va atm_arps .Pq Vt str Set to the list of permanent ATM ARP entries to be added at system boot time. For each whitespace separated .Ar element in the value, an .Va atm_arp_ Ns Aq Ar element variable is assumed to exist. The value of each of these variables will be passed as the parameters of an .Dq Nm atm Cm "add arp" command. .It Va natm_interfaces .Pq Vt str Set to the list of .Xr natm 4 interfaces that will also be used for HARP through .Xr harp 4 . If this list is not empty all interfaces in the list will be brought up with .Xr ifconfig 8 and .Xr harp 4 will be loaded. For this to work the interface drivers must be either compiled into the kernel or must reside on the root partition. .It Va keybell .Pq Vt str The keyboard bell sound. Set to .Dq Li normal , .Dq Li visual , .Dq Li off , or .Dq Li NO if the default behavior is desired. For details, refer to the .Xr kbdcontrol 1 manpage. .It Va keyboard .Pq Vt str If set to a non-null string, the virtual console's keyboard input is set to this device. .It Va keymap .Pq Vt str If set to .Dq Li NO , no keymap is installed, otherwise the value is used to install the keymap file in .Pa /usr/share/syscons/keymaps/ Ns Ao Ar value Ac Ns Pa .kbd . .It Va keyrate .Pq Vt str The keyboard repeat speed. Set to .Dq Li slow , .Dq Li normal , .Dq Li fast , or .Dq Li NO if the default behavior is desired. .It Va keychange .Pq Vt str If not set to .Dq Li NO , attempt to program the function keys with the value. The value should be a single string of the form: .Dq Ar funkey_number new_value Op Ar funkey_number new_value ... . .It Va cursor .Pq Vt str Can be set to the value of .Dq Li normal , .Dq Li blink , .Dq Li destructive , or .Dq Li NO to set the cursor behavior explicitly or choose the default behavior. .It Va scrnmap .Pq Vt str If set to .Dq Li NO , no screen map is installed, otherwise the value is used to install the screen map file in .Pa /usr/share/syscons/scrnmaps/ Ns Aq Ar value . .It Va font8x16 .Pq Vt str If set to .Dq Li NO , the default 8x16 font value is used for screen size requests, otherwise the value in .Pa /usr/share/syscons/fonts/ Ns Aq Ar value is used. .It Va font8x14 .Pq Vt str If set to .Dq Li NO , the default 8x14 font value is used for screen size requests, otherwise the value in .Pa /usr/share/syscons/fonts/ Ns Aq Ar value is used. .It Va font8x8 .Pq Vt str If set to .Dq Li NO , the default 8x8 font value is used for screen size requests, otherwise the value in .Pa /usr/share/syscons/fonts/ Ns Aq Ar value is used. .It Va blanktime .Pq Vt int If set to .Dq Li NO , the default screen blanking interval is used, otherwise it is set to .Ar value seconds. .It Va saver .Pq Vt str If not set to .Dq Li NO , this is the actual screen saver to use .Li ( blank , snake , daemon , etc). .It Va moused_nondefault_enable .Pq Vt str If set to .Dq Li NO the mouse device specified on the command line is not automatically treated as enabled by the .Pa /etc/rc.d/moused script. Having this variable set to .Dq Li YES allows a .Xr usb 4 mouse, for example, to be enabled as soon as it is plugged in. .It Va moused_enable .Pq Vt str If set to .Dq Li YES , the .Xr moused 8 daemon is started for doing cut/paste selection on the console. .It Va moused_type .Pq Vt str This is the protocol type of the mouse connected to this host. This variable must be set if .Va moused_enable is set to .Dq Li YES . The .Xr moused 8 daemon is able to detect the appropriate mouse type automatically in many cases. Set this variable to .Dq Li auto to let the daemon detect it, or select one from the following list if the automatic detection fails. .Pp If the mouse is attached to the PS/2 mouse port, choose .Dq Li auto or .Dq Li ps/2 , regardless of the brand and model of the mouse. Likewise, if the mouse is attached to the bus mouse port, choose .Dq Li auto or .Dq Li busmouse . All other protocols are for serial mice and will not work with the PS/2 and bus mice. If this is a USB mouse, .Dq Li auto is the only protocol type which will work. .Pp .Bl -tag -width ".Li x10mouseremote" -compact .It Li microsoft Microsoft mouse (serial) .It Li intellimouse Microsoft IntelliMouse (serial) .It Li mousesystems Mouse systems Corp.\& mouse (serial) .It Li mmseries MM Series mouse (serial) .It Li logitech Logitech mouse (serial) .It Li busmouse A bus mouse .It Li mouseman Logitech MouseMan and TrackMan (serial) .It Li glidepoint ALPS GlidePoint (serial) .It Li thinkingmouse Kensington ThinkingMouse (serial) .It Li ps/2 PS/2 mouse .It Li mmhittab MM HitTablet (serial) .It Li x10mouseremote X10 MouseRemote (serial) .It Li versapad Interlink VersaPad (serial) .El .Pp Even if the mouse is not in the above list, it may be compatible with one in the list. Refer to the man page for .Xr moused 8 for compatibility information. .Pp It should also be noted that while this is enabled, any other client of the mouse (such as an X server) should access the mouse through the virtual mouse device, .Pa /dev/sysmouse , and configure it as a .Dq Li sysmouse type mouse, since all mouse data is converted to this single canonical format when using .Xr moused 8 . If the client program does not support the .Dq Li sysmouse type, specify the .Dq Li mousesystems type. It is the second preferred type. .It Va moused_port .Pq Vt str If .Va moused_enable is set to .Dq Li YES , this is the actual port the mouse is on. It might be .Pa /dev/cuad0 for a COM1 serial mouse, .Pa /dev/psm0 for a PS/2 mouse or .Pa /dev/mse0 for a bus mouse, for example. .It Va moused_flags .Pq Vt str If .Va moused_type is set, these are the additional flags to pass to the .Xr moused 8 daemon. .It Va mousechar_start .Pq Vt int If set to .Dq Li NO , the default mouse cursor character range .Li 0xd0 Ns - Ns Li 0xd3 is used, otherwise the range start is set to .Ar value character, see .Xr vidcontrol 1 . Use if the default range is occupied in the language code table. .It Va allscreens_flags .Pq Vt str If set, .Xr vidcontrol 1 is run with these options for each of the virtual terminals .Pq Pa /dev/ttyv* . For example, .Dq Fl m Cm on will enable the mouse pointer on all virtual terminals if .Va moused_enable is set to .Dq Li YES . .It Va allscreens_kbdflags .Pq Vt str If set, .Xr kbdcontrol 1 is run with these options for each of the virtual terminals .Pq Pa /dev/ttyv* . For example, .Dq Fl h Li 200 will set the .Xr syscons 4 scrollback (history) buffer to 200 lines. .It Va cron_enable .Pq Vt bool If set to .Dq Li YES , run the .Xr cron 8 daemon at system boot time. .It Va cron_program .Pq Vt str Path to .Xr cron 8 (default .Pa /usr/sbin/cron ) . .It Va cron_flags .Pq Vt str If .Va cron_enable is set to .Dq Li YES , these are the flags to pass to .Xr cron 8 . .It Va cron_dst .Pq Vt bool If set to .Dq Li YES , enable the special handling of transitions to and from the Daylight Saving Time in .Xr cron 8 (equivalent to using the flag .Fl s ) . .It Va lpd_program .Pq Vt str Path to .Xr lpd 8 (default .Pa /usr/sbin/lpd ) . .It Va lpd_enable .Pq Vt bool If set to .Dq Li YES , run the .Xr lpd 8 daemon at system boot time. .It Va lpd_flags .Pq Vt str If .Va lpd_enable is set to .Dq Li YES , these are the flags to pass to the .Xr lpd 8 daemon. .It Va mta_start_script .Pq Vt str This variable specifies the full path to the script to run to start a mail transfer agent. The default is .Pa /etc/rc.sendmail . The .Va sendmail_* variables which .Pa /etc/rc.sendmail uses are documented in the .Xr rc.sendmail 8 man page. .It Va dumpdev .Pq Vt str Indicates the device (usually a swap partition) to which a crash dump should be written in the event of a system crash. If the value of this variable is .Dq Li AUTO , the first suitable swap device listed in .Pa /etc/fstab will be used as dump device. Otherwise, the value of this variable is passed as the argument to .Xr dumpon 8 . To disable crash dumps, set this variable to .Dq Li NO . .It Va dumpdir .Pq Vt str When the system reboots after a crash and a crash dump is found on the device specified by the .Va dumpdev variable, .Xr savecore 8 will save that crash dump and a copy of the kernel to the directory specified by the .Va dumpdir variable. The default value is .Pa /var/crash . Set to .Dq Li NO to not run .Xr savecore 8 at boot time when .Va dumpdir is set. .It Va savecore_flags .Pq Vt str If crash dumps are enabled, these are the flags to pass to the .Xr savecore 8 utility. .It Va enable_quotas .Pq Vt bool Set to .Dq Li YES to turn on user disk quotas on system startup via the .Xr quotaon 8 command. .It Va check_quotas .Pq Vt bool Set to .Dq Li YES to enable user disk quota checking via the .Xr quotacheck 8 command. .It Va accounting_enable .Pq Vt bool Set to .Dq Li YES to enable system accounting through the .Xr accton 8 facility. .It Va ibcs2_enable .Pq Vt bool Set to .Dq Li YES to enable iBCS2 (SCO) binary emulation at system initial boot time. .It Va ibcs2_loaders .Pq Vt str If not set to .Dq Li NO and if .Va ibcs2_enable is set to .Dq Li YES , this specifies a list of additional iBCS2 loaders to enable. .It Va linux_enable .Pq Vt bool Set to .Dq Li YES to enable Linux/ELF binary emulation at system initial boot time. .It Va osf1_enable .Pq Vt bool Set to .Dq Li YES to enable OSF/1 (Digital UNIX) binary emulation at system initial boot time. (alpha) .It Va svr4_enable .Pq Vt bool If set to .Dq Li YES , enable SysVR4 emulation at boot time. .It Va sysvipc_enable .Pq Vt bool If set to .Dq Li YES , load System V IPC primitives at boot time. .It Va clear_tmp_enable .Pq Vt bool Set to .Dq Li YES to have .Pa /tmp cleaned at startup. .It Va ldconfig_paths .Pq Vt str Set to the list of shared library paths to use with .Xr ldconfig 8 . NOTE: .Pa /usr/lib will always be added first, so it need not appear in this list. .It Va ldconfig_paths_aout .Pq Vt str Set to the list of shared library paths to use with .Xr ldconfig 8 legacy .Xr a.out 5 support. .It Va ldconfig_insecure .Pq Vt bool The .Xr ldconfig 8 utility normally refuses to use directories which are writable by anyone except root. Set this variable to .Dq Li YES to disable that security check during system startup. .It Va kern_securelevel_enable .Pq Vt bool Set to .Dq Li YES to set the kernel security level at system startup. .It Va kern_securelevel .Pq Vt int The kernel security level to set at startup. The allowed range of .Ar value ranges from \-1 (the compile time default) to 3 (the most secure). See .Xr init 8 for the list of possible security levels and their effect on system operation. .It Va lomac_enable .Pq Vt bool Set to .Dq Li YES to enable Low Watermark Mandatory Access Control (LOMAC) at boot time. This security model enforces integrity constraints for system processes; see .Xr lomac 4 for a complete description of the LOMAC model, as well as its impact on system operation. .It Va sshd_program .Pq Vt str Path to the SSH server program .Pa ( /usr/sbin/sshd is the default). .It Va sshd_enable .Pq Vt bool Set to .Dq Li YES to start .Xr sshd 8 at system boot time. .It Va sshd_flags .Pq Vt str If .Va sshd_enable is set to .Dq Li YES , these are the flags to pass to the .Xr sshd 8 daemon. .It Va usbd_enable .Pq Vt bool If set to .Dq Li YES , run the .Xr usbd 8 daemon at boot time. .It Va usbd_flags .Pq Vt str If .Va usbd_enable is set to .Dq Li YES , these are the flags passed to the .Xr usbd 8 daemon. .It Va watchdogd_enable .Pq Vt bool If set to .Dq Li YES , start the .Xr watchdogd 8 daemon at boot time. This requires that the kernel have been compiled with a .Xr watchdog 4 compatible device. .It Va watchdogd_flags .Pq Vt str If .Va watchdogd_enable is set to .Dq Li YES , these are the flags passed to the .Xr watchdogd 8 daemon. .It Va performance_cx_lowest .Pq Vt str CPU idle state to use while on AC power. The string .Dq Li LOW -indicates that +indicates that .Xr acpi 4 should use the lowest power state available while .Dq Li HIGH indicates that the lowest latency state (less power savings) should be used. .It Va performance_throttle_state .Pq Vt str CPU throttling state to use while on AC power. The string .Dq Li LOW -indicates that +indicates that .Xr acpi 4 should use the lowest throttling state available while .Dq Li HIGH indicates that the highest performance state (less power savings) should be used. .It Va economy_throttle_state .Pq Vt str CPU throttling state to use when off AC power. The string .Dq Li LOW -indicates that +indicates that .Xr acpi 4 should use the lowest throttling state available while .Dq Li HIGH indicates that the highest performance state (less power savings) should be used. .It Va economy_cx_lowest .Pq Vt str CPU idle state to use when off AC power. The string .Dq Li LOW -indicates that +indicates that .Xr acpi 4 should use the lowest power state available while .Dq Li HIGH indicates that the lowest latency state (less power savings) should be used. .It Va jail_enable .Pq Vt bool If set to .Dq Li NO , any configured jails will not be started. .It Va jail_list .Pq Vt str A space separated list of names for jails. This is purely a configuration aid to help identify and configure multiple jails. The names specified in this list will be used to identify settings common to an instance of a jail. Assuming that the jail in question was named .Li vjail , you would have the following dependant variables: .Bd -literal jail_vjail_hostname="jail.example.com" jail_vjail_ip="192.168.1.100" jail_vjail_rootdir="/var/jails/vjail/root" jail_vjail_exec="/bin/sh /etc/rc" .Ed .Pp The last one is optional. It defaults to .Pa /etc/rc if it is not set. .It Va jail_set_hostname_allow .Pq Vt bool If set to .Dq Li NO , do not allow the root user in a jail to set its hostname. .It Va jail_socket_unixiproute_only .Pq Vt bool If set to .Dq Li NO , do not allow any protocol, besides TCP/IP, to be used within a jail. .It Va jail_sysvipc_allow .Pq Vt bool If set to .Dq Li YES , allow applications within a jail to use System V IPC. .It Va unaligned_print .Pq Vt bool If set to .Dq Li NO , unaligned access warnings will not be printed. (alpha) .\" ----- isdn settings --------------------------------- .It Va isdn_enable .Pq Vt bool Set to .Dq Li NO by default. When set to .Dq Li YES , starts the .Xr isdnd 8 daemon at system boot time. .It Va isdn_flags .Pq Vt str Set to .Dq Fl d Ns Cm n Fl d Ns Li 0x1f9 by default. Additional flags to pass to .Xr isdnd 8 (but see .Va isdn_fsdev and .Va isdn_ttype for certain tunable parameters). .It Va isdn_ttype .Pq Vt str Set to .Dq Li cons25 by default. The terminal type of the output device when .Xr isdnd 8 operates in full-screen mode. .It Va isdn_screenflags .Pq Vt str Set to .Dq Li NO by default. The video mode for full-screen mode (only for .Xr syscons 4 console driver, see .Xr vidcontrol 1 for valid modes). .It Va isdn_fsdev .Pq Vt str Set to .Dq Li NO by default. The output device for .Xr isdnd 8 in full-screen mode (or .Dq Li NO for daemon mode). .It Va isdn_trace .Pq Vt bool Set to .Dq Li NO by default. When set to .Dq Li YES , enables the ISDN protocol trace utility .Xr isdntrace 8 at system boot time. .It Va isdn_traceflags .Pq Vt str Set to .Dq Fl f Pa /var/tmp/isdntrace0 by default. Flags for .Xr isdntrace 8 . .\" ----------------------------------------------------- .It Va pcvt_verbose .Pq Vt bool Set to .Dq Li NO by default. When set to .Dq Li YES , verbose messages about the actions done by the start script are displayed. .Em Note : the .Xr pcvt 4 driver must be compiled into the kernel before the .Xr pcvt 4 related options described here take any effect. .It Va pcvt_keymap .Pq Vt str Set to .Dq Li NO by default. Use this to configure a national keyboard mapping found in the .Pa /usr/share/misc/keycap.pcvt file of keyboard mappings. (See also the manual pages .Xr keycap 5 and .Xr keycap 3 for usage of .Xr pcvt 4 Ns 's keycap database and the manual page .Xr kcon 1 option .Fl m for national keyboard mapping configuration.) .It Va pcvt_keydel .Pq Vt int Set to .Dq Li NO by default. Used to set the keyboard key repeat delay value. Valid values are in the range 0..3 for delay values of 250, 500, 750 and 1000 msec. (See also the .Xr kcon 1 manual page.) .It Va pcvt_keyrate .Pq Vt int Set to .Dq Li NO by default. Used to set the keyboard key repetition rate value. Valid values are in the range 0..31 for repetition values of 2..30 characters per second. .It Va pcvt_keyrepeat .Pq Vt bool Set to .Dq Li NO by default. Set to .Dq Li YES to enable automatic keyboard key repeating. .It Va pcvt_force24 .Pq Vt bool Set to .Dq Li NO by default. Set to .Dq Li YES to force .Xr pcvt 4 to use 24 lines only (in 25 lines mode) for compatibility with the original .Tn VT220 terminal. .It Va pcvt_hpext .Pq Vt bool Set to .Dq Li NO by default. Set to .Dq Li YES to enable the display and functionality of function key labels (as found on .Tn Hewlett-Packard terminals such as the .Tn HP2392A and the .Tn HP700/92 in .Tn ANSI mode). .It Va pcvt_lines .Pq Vt int Set to .Dq Li NO by default resulting in a value of 25. Used to set the number of lines on the screen. For VGA displays, valid values are 25, 28, 40 and 50 lines. (See also the .Xr scon 1 manual page.) .It Va pcvt_blanktime .Pq Vt int Set to .Dq Li NO by default. Used to set the screen saver timeout in seconds for values greater than zero. .It Va pcvt_cursorh .Pq Vt int Set to .Dq Li NO by default. Used to set the cursor top scanline. (See also the .Xr cursor 1 manual page.) .It Va pcvt_cursorl .Pq Vt int Set to .Dq Li NO by default. Used to set the cursor bottom scanline. .It Va pcvt_monohigh .Pq Vt bool Set to .Dq Li NO by default. Set to .Dq Li YES to set intensity to high on monochrome monitors. (See also the .Xr scon 1 manual page, option .Fl p , for more information on changing VGA palette values.) .It Va harvest_interrupt .Pq Vt bool Set to .Dq Li YES to use hardware interrupts as an entropy source. Refer to .Xr random 4 for more information. .It Va harvest_ethernet .Pq Vt bool Set to .Dq Li YES to use LAN traffic as an entropy source. Refer to .Xr random 4 for more information. .It Va harvest_p_to_p .Pq Vt bool Set to .Dq Li YES to use serial line traffic as an entropy source. Refer to .Xr random 4 for more information. .It Va entropy_dir .Pq Vt str Set to .Dq Li NO to disable caching entropy via .Xr cron 8 . Otherwise set to the directory used to store entropy files in. .It Va entropy_file .Pq Vt str Set to .Dq Li NO to disable caching entropy through reboots. Otherwise set to the filename used to store cached entropy through reboots. This file should be located on the root file system to seed the .Xr random 4 device as early as possible in the boot process. .It Va entropy_save_sz .Pq Vt int Size of the entropy cache files saved by .Nm save-entropy periodically. .It Va entropy_save_num .Pq Vt int Number of entropy cache files to save by .Nm save-entropy periodically. .It Va ipsec_enable .Pq Vt bool Set to .Dq Li YES to run .Xr setkey 8 on .Va ipsec_file at boot time. .It Va ipsec_file .Pq Vt str Configuration file for .Xr setkey 8 . .It Va dmesg_enable .Pq Vt bool Set to .Dq Li YES to save .Xr dmesg 8 to .Pa /var/run/dmesg.boot on boot. .It Va rcshutdown_timeout .Pq Vt int If set, start a watchdog timer in the background which will terminate .Pa rc.shutdown if .Xr shutdown 8 has not completed within the specified time (in seconds). .It Va virecover_enable .Pq Vt bool Set to .Dq Li NO to prevent the system from trying to recover pre-maturely terminated .Xr vi 1 sessions. .It Va ugidfw_enable .Dq Li NO Load the .Xr mac_bsdextended 4 module upon system initialization and load a default ruleset file. .It Va bsdextended_script .Dq Pa /etc/rc.bsdextended The default .Xr mac_bsdextended 4 ruleset file to load. .It Va ramdisk_units .Pq Vt str A list of one or more ramdisk units to configure with .Xr mdconfig 8 and .Xr newfs 8 in time to be mounted from .Xr fstab 5 . Each listed unit .Ar X must specify at least a .Ar type in a .Va ramdisk_ Ns Ao Ar X Ac Ns Va _config variable. .It Va ramdisk_ Ns Ao Ar X Ac Ns Va _config .Pq Vt str Arguments to .Xr mdconfig 8 for ramdisk .Ar X . At minimum a .Fl t Ar type must be specified, where .Ar type must be one of .Cm malloc or .Cm swap . .It Va ramdisk_ Ns Ao Ar X Ac Ns Va _newfs .Pq Vt str Optional arguments passed to .Xr newfs 8 to initialize ramdisk .Ar X . .It Va ramdisk_ Ns Ao Ar X Ac Ns Va _owner .Pq Vt str An ownership specification passed to .Xr chown 8 after the specified ramdisk unit .Ar X has been mounted. Both the .Xr md 4 device and the mount point will be changed. .It Va ramdisk_ Ns Ao Ar X Ac Ns Va _perms .Pq Vt str A mode string passed to .Xr chmod 1 after the specified ramdisk unit .Ar X has been mounted. Both the .Xr md 4 device and the mount point will be changed. .El .Sh FILES .Bl -tag -width ".Pa /etc/defaults/rc.conf" -compact .It Pa /etc/defaults/rc.conf .It Pa /etc/rc.conf .It Pa /etc/rc.conf.local .El .Sh SEE ALSO .Xr catman 1 , .Xr chmod 1 , .Xr gdb 1 , .Xr info 1 , .Xr kbdcontrol 1 , .Xr makewhatis 1 , .Xr vi 1 , .Xr vidcontrol 1 , .Xr ip 4 , .Xr kld 4 , .Xr tcp 4 , .Xr udp 4 , .Xr exports 5 , .Xr motd 5 , .Xr newsyslog.conf 5 , .Xr accton 8 , .Xr amd 8 , .Xr apm 8 , .Xr atm 8 , .Xr chown 8 , .Xr cron 8 , .Xr dhclient 8 , .Xr ifconfig 8 , .Xr inetd 8 , .Xr isdnd 8 , .Xr isdntrace 8 , .Xr kldxref 8 , .Xr lpd 8 , .Xr mdconfig 8 , .Xr mdmfs 8 , .Xr mountd 8 , .Xr moused 8 , .Xr mrouted 8 , .Xr named 8 , .Xr newfs 8 , .Xr nfsd 8 , .Xr ntpd 8 , .Xr ntpdate 8 , .Xr pcnfsd 8 , .Xr quotacheck 8 , .Xr quotaon 8 , .Xr rc 8 , .Xr rc.sendmail 8 , .Xr route 8 , .Xr routed 8 , .Xr rpcbind 8 , .Xr rpc.lockd 8 , .Xr rpc.statd 8 , .Xr rwhod 8 , .Xr savecore 8 , .Xr sshd 8 , .Xr swapon 8 , .Xr sysctl 8 , .Xr syslogd 8 , .Xr timed 8 , .Xr usbd 8 , .Xr yp 8 , .Xr ypbind 8 , .Xr ypserv 8 , .Xr ypset 8 .Sh HISTORY The .Nm file appeared in .Fx 2.2.2 . .Sh AUTHORS .An Jordan K. Hubbard . Index: stable/5/share/man/man9/bpf.9 =================================================================== --- stable/5/share/man/man9/bpf.9 (revision 139701) +++ stable/5/share/man/man9/bpf.9 (revision 139702) @@ -1,228 +1,228 @@ .\" Copyright (c) 2004 FreeBSD Inc. .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL [your name] OR CONTRIBUTORS BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" .\" $FreeBSD$ .\" .Dd May 19, 2004 .Dt BPF 9 .Os .\" .Sh NAME .Nm bpf .Nd "Berkeley Packet Filter" .\" .Sh SYNOPSIS .In net/bpf.h .\" .Ft void .Fn bpfattach "struct ifnet *ifp" "u_int dlt" "u_int hdrlen" .Ft void .Fn bpfattach2 "struct ifnet *ifp" "u_int dlt" "u_int hdrlen" "struct bpf_if **driverp" .Ft void .Fn bpfdetach "struct ifnet *ifp" .Ft void .Fn bpf_tap "struct ifnet *ifp" "u_char *pkt" "u_int *pktlen" .Ft void .Fn bpf_mtap "struct ifnet *ifp" "struct mbuf *m" .Ft void .Fn bpf_mtap2 "struct ifnet *bp" "void *data" "u_int dlen" "struct mbuf *m" .Ft u_int .Fn bpf_filter "const struct bpf_insn *pc " "u_char *pkt" "u_int *wirelen" "u_int *buflen" .Ft int .Fn bpf_validate "const struct bpf_insn *fcode" "int flen" .\" .Sh DESCRIPTION The Berkeley Packet Filter provides a raw interface, that is protocol independent, to data link layers. It allows all packets on the network, even those destined for other hosts, to be passed from a network interface to user programs. Each program may specify a filter, in the form of a bpf filter machine program. .Xr bpf 4 describes the interface used by user programs. This man page describes the functions used by interfaces to pass packets to -.Nm +.Nm and the functions for testing and running .Nm filter machine programs. .Pp .Fn bpfattach attaches a network interface to .Nm . .Em ifp is a pointer to the structure that defines the interface to be attached to an interface. .Em dlt is the data link-layer type: DLT_NULL .Po no link-layer encapsulation .Pc , DLT_EN10MB .Po Ethernet .Pc , DLT_IEEE802_11 .Po 802.11 wireless networks .Pc , etc. The rest of the link layer types can be found in .Pa /usr/src/sys/net/bpf.h . .Em hdrlen is the fixed size of the link header; variable length headers are not yet supported. The .Nm system will hold a pointer to .Em ifp->if_bpf . This variable will set to a non-NULL value when .Nm requires packets from this interface to be tapped using the functions below. .Pp .Fn bpfattach2 allows multiple bpf instances to be attached to a single interface, by registering an explicit .Em if_bpf -rather than using +rather than using .Em ifp->if_bpf . It is then possible to run .Xr tcpdump 1 on the interface for any data link-layer types attached. .Pp .Fn bpfdetach detaches a .Nm instance from an interface, specified by .Em ifp . .Fn bpfdetach should be called once for each .Nm bpf instance attached. .Pp .Fn bpf_tap is used by an interface to pass the packet to .Nm . The packet data (including link-header), pointed to by .Em pkt , is of length .Em pktlen , which must be a contiguous buffer. .Em ifp is a pointer to the structure that defines the interface to be tapped. The packet is parsed by each processes filter, and if accepted, it is buffered for the process to read. .Pp .Fn bpf_mtap is like .Fn bpf_tap except that it is used to tap packets that are in an mbuf chain, .Em m . .Em ifp is a pointer to the structure that defines the interface to be tapped. Like .Fn bpf_tap , .Fn bpf_mtap requires a link-header for whatever data link layer type is specified. Note that .Nm only reads from the mbuf chain, it does not free it or keep a pointer to it. This means that a mbuf containing the link-header can be prepended to the chain if necessary. A cleaner interface to achieve this is provided by .Fn bpf_mtap2 . .Pp .Fn bpf_mtap2 allows the user to pass a link-header .Em data , of length .Em dlen , independent of the mbuf .Em m , containing the packet. This simplifies the passing of some link-headers. .Pp .Fn bpf_filter executes the filter program starting at .Em pc on the packet .Em pkt . .Em wirelen is the length of the original packet and .Em buflen is the amount of data present. .Pp .Fn bpf_validate checks that the filter code .Em fcode , of length .Em flen , is valid. .\" .Sh RETURN VALUES .Fn bpf_filter returns -1 .Po cast to an unsigned integer .Pc if there is no filter. Otherwise, it returns the result of the filter program. .Pp .Fn bpf_validate returns 0 when the program is not a valid filter program. .\" .Sh SEE ALSO .Xr tcpdump 1 , .Xr bpf 4 . .\" .Sh HISTORY The Enet packet filter was created in 1980 by Mike Accetta and Rick Rashid at Carnegie-Mellon University. Jeffrey Mogul, at Stanford, ported the code to .Bx and continued its development from 1983 on. Since then, it has evolved into the Ultrix Packet Filter at .Tn DEC , a .Tn STREAMS .Tn NIT module under .Tn SunOS 4.1 , and .Tn BPF . .\" .Sh AUTHORS .An -nosplit .An Steven McCanne , of Lawrence Berkeley Laboratory, implemented BPF in Summer 1990. Much of the design is due to .An Van Jacobson . This manpage by was written by .An Orla McGann . Index: stable/5/share/man/man9/ifnet.9 =================================================================== --- stable/5/share/man/man9/ifnet.9 (revision 139701) +++ stable/5/share/man/man9/ifnet.9 (revision 139702) @@ -1,1309 +1,1309 @@ .\" -*- Nroff -*- .\" Copyright 1996, 1997 Massachusetts Institute of Technology .\" .\" Permission to use, copy, modify, and distribute this software and .\" its documentation for any purpose and without fee is hereby .\" granted, provided that both the above copyright notice and this .\" permission notice appear in all copies, that both the above .\" copyright notice and this permission notice appear in all .\" supporting documentation, and that the name of M.I.T. not be used .\" in advertising or publicity pertaining to distribution of the .\" software without specific, written prior permission. M.I.T. makes .\" no representations about the suitability of this software for any .\" purpose. It is provided "as is" without express or implied .\" warranty. .\" .\" THIS SOFTWARE IS PROVIDED BY M.I.T. ``AS IS''. M.I.T. DISCLAIMS .\" ALL EXPRESS OR IMPLIED WARRANTIES WITH REGARD TO THIS SOFTWARE, .\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF .\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT .\" SHALL M.I.T. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT .\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF .\" USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND .\" ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, .\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT .\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" .\" $FreeBSD$ .\" .Dd June 8, 2004 .Os .Dt IFNET 9 .Sh NAME .Nm ifnet , .Nm ifaddr , .Nm ifqueue , .Nm if_data .Nd kernel interfaces for manipulating network interfaces .Sh SYNOPSIS .In sys/param.h .In sys/time.h .In sys/socket.h .In net/if.h .In net/if_var.h .In net/if_types.h .\" .Ss "Interface Manipulation Functions" .Ft void .Fn if_attach "struct ifnet *ifp" .Ft void .Fn if_down "struct ifnet *ifp" .Ft int .Fn ifioctl "struct socket *so" "u_long cmd" "caddr_t data" "struct thread *td" .Ft int .Fn ifpromisc "struct ifnet *ifp" "int pswitch" .Ft int .Fn if_allmulti "struct ifnet *ifp" "int amswitch" .Ft "struct ifnet *" .Fn ifunit "const char *name" .Ft void .Fn if_up "struct ifnet *ifp" .\" .Ss "Interface Address Functions" .Ft "struct ifaddr *" .Fn ifa_ifwithaddr "struct sockaddr *addr" .Ft "struct ifaddr *" .Fn ifa_ifwithdstaddr "struct sockaddr *addr" .Ft "struct ifaddr *" .Fn ifa_ifwithnet "struct sockaddr *addr" .Ft "struct ifaddr *" .Fn ifaof_ifpforaddr "struct sockaddr *addr" "struct ifnet *ifp" .Ft void .Fn ifafree "struct ifaddr *ifa" .Fn IFAFREE "struct ifaddr *ifa" .\" .Ss "Interface Multicast Address Functions" .Ft int .Fn if_addmulti "struct ifnet *ifp" "struct sockaddr *sa" "struct ifmultiaddr **ifmap" .Ft int .Fn if_delmulti "struct ifnet *ifp" "struct sockaddr *sa" .Ft "struct ifmultiaddr *" .Fn ifmaof_ifpforaddr "struct sockaddr *addr" "struct ifnet *ifp" .Ss "Output queue macros" .Fn IF_DEQUEUE "struct ifqueue *ifq" "struct mbuf *m" .\" .Ss "struct ifnet Member Functions" .Ft void .Fn \*(lp*if_input\*(rp "struct ifnet *ifp" "struct mbuf *m" .Ft int .Fo \*(lp*if_output\*(rp .Fa "struct ifnet *ifp" "struct mbuf *m" .Fa "struct sockaddr *dst" "struct rtentry *rt" .Fc .Ft void .Fn \*(lp*if_start\*(rp "struct ifnet *ifp" .Ft int .Fn \*(lp*if_done\*(rp "struct ifnet *ifp" .Ft int .Fn \*(lp*if_ioctl\*(rp "struct ifnet *ifp" "int cmd" "caddr_t data" .Ft void .Fn \*(lp*if_watchdog\*(rp "struct ifnet *ifp" .Ft int .Fn \*(lp*if_poll_recv\*(rp "struct ifnet *ifp" "int *quotap" .Ft int .Fn \*(lp*if_poll_xmit\*(rp "struct ifnet *ifp" "int *quotap" .Ft void .Fn \*(lp*if_poll_inttrn\*(rp "struct ifnet *ifp" .Ft void .Fn \*(lp*if_poll_slowinput\*(rp "struct ifnet *ifp" "struct mbuf *m" .Ft void .Fn \*(lp*if_init\*(rp "void *if_softc" .Ft int .Fo \*(lp*if_resolvemulti\*(rp .Fa "struct ifnet *ifp" "struct sockaddr **retsa" "struct sockaddr *addr" .Fc .Ss "struct ifaddr member function" .Ft void .Fo \*(lp*ifa_rtrequest\*(rp .Fa "int cmd" "struct rtentry *rt" "struct sockaddr *dst" .Fc .\" .Ss "Global Variables" .Vt extern struct ifnethead ifnet ; .Vt extern struct ifaddr **ifnet_addrs ; .Vt extern int if_index ; .Vt extern int ifqmaxlen ; .Sh DATA STRUCTURES The kernel mechanisms for handling network interfaces reside primarily in the .Vt ifnet , if_data , ifaddr , and .Vt ifmultiaddr structures in .In net/if.h and .In net/if_var.h and the functions named above and defined in .Pa /sys/net/if.c . Those interfaces which are intended to be used by user programs are defined in .In net/if.h ; these include the interface flags, the .Vt if_data structure, and the structures defining the appearance of interface-related messages on the .Xr route 4 routing socket and in .Xr sysctl 3 . The header file .In net/if_var.h defines the kernel-internal interfaces, including the .Vt ifnet , ifaddr , and .Vt ifmultiaddr structures and the functions which manipulate them. (A few user programs will need .In net/if_var.h because it is the prerequisite of some other header file like .In netinet/if_ether.h . Most references to those two files in particular can be replaced by .In net/ethernet.h . ) .Pp The system keeps a linked list of interfaces using the .Li TAILQ macros defined in .Xr queue 3 ; this list is headed by a .Vt "struct ifnethead" called .Va ifnet . The elements of this list are of type .Vt "struct ifnet" , and most kernel routines which manipulate interface as such accept or return pointers to these structures. Each interface structure contains an .Vt if_data structure, which contains statistics and identifying information used by management programs, and which is exported to user programs by way of the .Xr ifmib 4 branch of the .Xr sysctl 3 MIB. Each interface also has a .Li TAILQ of interface addresses, described by .Vt ifaddr structures; the head of the queue is always an .Dv AF_LINK address (see .Xr link_addr 3 ) describing the link layer implemented by the interface (if any). (Some trivial interfaces do not provide any link layer addresses; this structure, while still present, serves only to identify the interface name and index.) .Pp Finally, those interfaces supporting reception of multicast datagrams have a .Li TAILQ of multicast group memberships, described by .Vt ifmultiaddr structures. These memberships are reference-counted. .Pp Interfaces are also associated with an output queue, defined as a .Vt "struct ifqueue" ; this structure is used to hold packets while the interface is in the process of sending another. .Pp .Ss The Vt ifnet Ss structure The fields of .Vt "struct ifnet" are as follows: .Bl -tag -width ".Va if_capabilities" -offset indent .It Va if_softc .Pq Vt "void *" A pointer to the driver's private state block. (Initialized by driver.) .It Va if_link .Pq Fn TAILQ_ENTRY ifnet .Xr queue 3 macro glue. .It Va if_xname .Pq Vt "char *" The name of the interface, (e.g., .Dq Li fxp0 or .Dq Li lo0 ) . (Initialized by driver.) .It Va if_dname .Pq Vt "const char *" The name of the driver. (Initialized by driver.) .It Va if_dunit .Pq Vt int A unique number assigned to each interface managed by a particular driver. Drivers may choose to set this to .Dv IF_DUNIT_NONE if a unit number is not associated with the device. (Initialized by driver.) .It Va if_addrhead .Pq Vt "struct ifaddrhead" The head of the .Xr queue 3 .Li TAILQ containing the list of addresses assigned to this interface. .It Va if_pcount .Pq Vt int A count of promiscuous listeners on this interface, used to reference-count the .Dv IFF_PROMISC flag. .It Va if_bpf .Pq Vt "struct bpf_if *" Opaque per-interface data for the packet filter, .Xr bpf 4 . (Initialized by .Fn bpf_attach . ) .It Va if_index .Pq Vt u_short A unique number assigned to each interface in sequence as it is attached. This number can be used in a .Vt "struct sockaddr_dl" to refer to a particular interface by index (see .Xr link_addr 3 ) . .It Va if_timer .Pq Vt short Number of seconds until the watchdog timer .Fn if_watchdog is called, or zero if the timer is disabled. (Set by driver, decremented by generic watchdog code.) .It Va if_flags .Pq Vt int Flags describing operational parameters of this interface (see below). (Manipulated by both driver and generic code.) .It Va if_capabilities .Pq Vt int Flags describing the capabilities the interface supports (see below). .It Va if_capenable .Pq Vt int Flags describing the enabled capabilities of the interface (see below). .\" .It Va if_ipending .\" Interrupt-pending bits for polled operation: .\" .Dv IFI_XMIT .\" (transmit complete interrupt) .\" and .\" .Dv IFI_RECV .\" (received packet ready interrupt). .\" See the .\" .Sx Polling .\" section, below. .\" (Manipulated by driver.) .It Va if_linkmib .Pq Vt "void *" A pointer to an interface-specific MIB structure exported by .Xr ifmib 4 . (Initialized by driver.) .It Va if_linkmiblen .Pq Vt size_t The size of said structure. (Initialized by driver.) .It Va if_data .Pq Vt "struct if_data" More statistics and information; see .Sx "The if_data structure" , below. (Initialized by driver, manipulated by both driver and generic code.) .It Va if_snd .Pq Vt "struct ifqueue" The output queue. (Manipulated by driver.) .\".It Va if_poll_slowq .\".Pq Vt "struct ifqueue *" .\"A pointer to the input queue for devices which do not support polling .\"well. .\"See the .\".Sx Polling .\"section, below. .\"(Initialized by driver.) .El .Pp There are in addition a number of function pointers which the driver must initialize to complete its interface with the generic interface layer: .Bl -ohang -offset indent .It Fn if_input Pass a packet to an appropriate upper layer as determined from the link-layer header of the packet. This routine is to be called from an interrupt handler or used to emulate reception of a packet on this interface. A single function implementing .Fn if_input can be shared among multiple drivers utilizing the same link-layer framing, e.g., Ethernet. .It Fn if_output Output a packet on interface .Fa ifp , or queue it on the output queue if the interface is already active. .It Fn if_start Start queued output on an interface. This function is exposed in order to provide for some interface classes to share a .Fn if_output among all drivers. .Fn if_start may only be called when the .Dv IFF_OACTIVE flag is not set. (Thus, .Dv IFF_OACTIVE does not literally mean that output is active, but rather that the device's internal output queue is full.) .It Fn if_done Not used. We are not even sure what it was ever for. The prototype is faked. .It Fn if_ioctl Process interface-related .Xr ioctl 2 requests (defined in .In sys/sockio.h ) . Preliminary processing is done by the generic routine .Fn ifioctl to check for appropriate privileges, locate the interface being manipulated, and perform certain generic operations like twiddling flags and flushing queues. See the description of .Fn ifioctl below for more information. .It Fn if_watchdog Routine called by the generic code when the watchdog timer, .Va if_timer , expires. Usually this will reset the interface. .\" .It Fn if_poll_recv .\" .It Fn if_poll_xmit .\" .It Fn if_poll_slowinput .\" .It Fn if_poll_intren .\" See the .\" .Sx Polling .\" section, below. .It Fn if_init Initialize and bring up the hardware, e.g., reset the chip and the watchdog timer and enable the receiver unit. Should mark the interface running, but not active .Dv ( IFF_RUNNING , ~IIF_OACTIVE ) . .It Fn if_resolvemulti Check the requested multicast group membership, .Fa addr , for validity, and if necessary compute a link-layer group which corresponds to that address which is returned in .Fa *retsa . Returns zero on success, or an error code on failure. .El .Ss "Interface Flags" Interface flags are used for a number of different purposes. Some flags simply indicate information about the type of interface and its capabilities; others are dynamically manipulated to reflect the current state of the interface. Flags of the former kind are marked .Aq S in this table; the latter are marked .Aq D . .Pp The macro .Dv IFF_CANTCHANGE defines the bits which cannot be set by a user program using the .Dv SIOCSIFFLAGS command to .Xr ioctl 2 ; these are indicated by an asterisk .Pq Ql * in the following listing. .Pp .Bl -tag -width ".Dv IFF_POINTOPOINT" -offset indent -compact .It Dv IFF_UP .Aq D The interface has been configured up by the user-level code. .It Dv IFF_BROADCAST .Aq S* The interface supports broadcast. .It Dv IFF_DEBUG .Aq D Used to enable/disable driver debugging code. .It Dv IFF_LOOPBACK .Aq S The interface is a loopback device. .It Dv IFF_POINTOPOINT .Aq S* The interface is point-to-point; .Dq broadcast address is actually the address of the other end. .It Dv IFF_RUNNING .Aq D* The interface has been configured and dynamic resources were successfully allocated. Probably only useful internal to the interface. .It Dv IFF_NOARP .Aq D Disable network address resolution on this interface. .It Dv IFF_PROMISC .Aq D* This interface is in promiscuous mode. .It Dv IFF_PPROMISC .Aq D This interface is in the permanently promiscuous mode (implies .Dv IFF_PROMISC ) . .It Dv IFF_ALLMULTI .Aq D* This interface is in all-multicasts mode (used by multicast routers). .It Dv IFF_OACTIVE .Aq D* The interface's hardware output queue (if any) is full; output packets are to be queued. .It Dv IFF_SIMPLEX .Aq S* The interface cannot hear its own transmissions. .It Dv IFF_LINK0 .It Dv IFF_LINK1 .It Dv IFF_LINK2 .Aq D Control flags for the link layer. (Currently abused to select among multiple physical layers on some devices.) .It Dv IFF_MULTICAST .Aq S* This interface supports multicast. .It Dv IFF_POLLING .Aq D* The interface is in .Xr polling 4 mode. See .Sx Interface Capabilities Flags for details. .El .Ss "Interface Capabilities Flags" Interface capabilities are specialized features an interface may or may not support. These capabilities are very hardware-specific and allow, when enabled, to offload specific network processing to the interface or to offer a particular feature for use by other kernel parts. .Pp It should be stressed that a capability can be completely uncontrolled (i.e., stay always enabled with no way to disable it) or allow limited control over itself (e.g., depend on another capability's state.) Such peculiarities are determined solely by the hardware and driver of a particular interface. Only the driver possesses the knowledge on whether and how the interface capabilities can be controlled. Consequently, capabilities flags in .Va if_capenable should never be modified directly by kernel code other than the interface driver. The command .Dv SIOCSIFCAP to .Fn ifioctl is the dedicated means to attempt altering .Va if_capenable on an interface. Userland code shall use .Xr ioctl 2 . .Pp The following capabilities are currently supported by the system: .Bl -tag -width ".Dv IFCAP_VLAN_HWTAGGING" -offset indent .It Dv IFCAP_NETCONS This interface can be a network console. .It Dv IFCAP_POLLING This interface supports .Xr polling 4 . See below for details. .It Dv IFCAP_RXCSUM This interface can do checksum validation on receiving data. Some interfaces do not have sufficient buffer storage to store frames above a certain MTU-size completely. The driver for the interface might disable hardware checksum validation if the MTU is set above the hardcoded limit. .It Dv IFCAP_TXCSUM This interface can do checksum calculation on transmitting data. .It Dv IFCAP_HWCSUM A shorthand for .Pq Dv IFCAP_RXCSUM | IFCAP_TXCSUM . .It Dv IFCAP_VLAN_HWTAGGING This interface can do VLAN tagging on output and demultiplex frames by their VLAN tag on input. .It Dv IFCAP_VLAN_MTU The .Xr vlan 4 driver can operate over this interface in software tagging mode without having to decrease MTU on .Xr vlan 4 interfaces below 1500 bytes. This implies the ability of this interface to cope with frames somewhat longer than permitted by the Ethernet specification. .It Dv IFCAP_JUMBO_MTU This Ethernet interface can transmit and receive frames up to 9000 bytes long. .El .Pp The ability of advanced network interfaces to offload certain computational tasks from the host CPU to the board is limited mostly to TCP/IP. Therefore a separate field associated with an interface (see .Va ifnet.if_data.ifi_hwassist below) keeps a detailed description of its enabled capabilities specific to TCP/IP processing. The TCP/IP module consults the field to see which tasks can be done on an .Em outgoing packet by the interface. The flags defined for that field are a superset of those for .Va mbuf.m_pkthdr.csum_flags , namely: .Bl -tag -width ".Dv CSUM_FRAGMENT" -offset indent .It Dv CSUM_IP The interface will compute IP checksums. .It Dv CSUM_TCP The interface will compute TCP checksums. .It Dv CSUM_UDP The interface will compute UDP checksums. .It Dv CSUM_IP_FRAGS The interface can compute a TCP or UDP checksum for a packet fragmented by the host CPU. Makes sense only along with .Dv CSUM_TCP or .Dv CSUM_UDP . .It Dv CSUM_FRAGMENT The interface will do the fragmentation of IP packets if necessary. The host CPU does not need to care about MTU on this interface as long as a packet to transmit through it is an IP one and it does not exceed the size of the hardware buffer. .El .Pp An interface notifies the TCP/IP module about the tasks the former has performed on an .Em incoming packet by setting the corresponding flags in the field .Va mbuf.m_pkthdr.csum_flags of the .Vt mbuf chain containing the packet. See .Xr mbuf 9 for details. .Pp The capability of a network interface to operate in .Xr polling 4 mode involves several flags in different global variables and per-interface fields. First, there is a system-wide .Xr sysctl 8 master switch named .Va kern.polling.enable , which can toggle .Xr polling 4 globally. If that variable is set to non-zero, .Xr polling 4 will be used on those devices where it is enabled individually. Otherwise, .Xr polling 4 will not be used in the system. Second, the capability flag .Dv IFCAP_POLLING set in interface's .Va if_capabilities indicates support for .Xr polling 4 on the particular interface. If set in .Va if_capabilities , the same flag can be marked or cleared in the interface's .Va if_capenable , thus initiating switch of the interface to .Xr polling 4 mode or interrupt mode, respectively. The actual mode change will occur at an implementation-specific moment in the future, e.g., during the next interrupt or .Xr polling 4 cycle. And finally, if the mode transition has been successful, the flag .Dv IFF_POLLING is marked or cleared in the interface's .Va if_flags to indicate the current mode of the interface. .Ss The Vt if_data Ss Structure In .Bx 4.4 , a subset of the interface information believed to be of interest to management stations was segregated from the .Vt ifnet structure and moved into its own .Vt if_data structure to facilitate its use by user programs. The following elements of the .Vt if_data structure are initialized by the interface and are not expected to change significantly over the course of normal operation: .Bl -tag -width ".Va ifi_lastchange" -offset indent .It Va ifi_type .Pq Vt u_char The type of the interface, as defined in .In net/if_types.h and described below in the .Sx "Interface Types" section. .It Va ifi_physical .Pq Vt u_char Intended to represent a selection of physical layers on devices which support more than one; never implemented. .It Va ifi_addrlen .Pq Vt u_char Length of a link-layer address on this device, or zero if there are none. Used to initialized the address length field in .Vt sockaddr_dl structures referring to this interface. .It Va ifi_hdrlen .Pq Vt u_char Maximum length of any link-layer header which might be prepended by the driver to a packet before transmission. The generic code computes the maximum over all interfaces and uses that value to influence the placement of data in .Vt mbuf Ns s to attempt to ensure that there is always sufficient space to prepend a link-layer header without allocating an additional .Vt mbuf . .\" (See .\" .Xr mbuf 9 . ) .\" .It Va ifi_recvquota .\" .Pq Vt u_char .\" Number of packets the interface is permitted to receive at one time .\" when in polled mode. .\" .It Va ifi_xmitquota .\" .Pq Vt u_char .\" Number of packets the interface is permitted to queue for transmission .\" at one time when in polled mode. .\" There is some controversy over .\" whether such a restriction makes any sense at all. .It Va ifi_datalen .Pq Vt u_char Length of the .Vt if_data structure. Allows some stabilization of the routing socket ABI in the face of increases in the length of .Vt struct ifdata . .It Va ifi_mtu .Pq Vt u_long The maximum transmission unit of the medium, exclusive of any link-layer overhead. .It Va ifi_metric .Pq Vt u_long A dimensionless metric interpreted by a user-mode routing process. .It Va ifi_baudrate .Pq Vt u_long The line rate of the interface, in bits per second. .It Va ifi_hwassist .Pq Vt u_long A detailed interpretation of the capabilities to offload computational tasks for .Em outgoing packets. The interface driver must keep this field in accord with the current value of .Va if_capenable . .It ifi_epoch .Pq Vt time_t The time the interface was attached or the last time the statistics below were reset. .Va ifi_epoch is intended to be used to set the SNMP variable .Va ifCounterDiscontinuityTime . It may also be used to determine if two successive queries for an interface of the same index have returned results for the same interface. .El .Pp The structure additionally contains generic statistics applicable to a variety of different interface types (except as noted, all members are of type .Vt u_long ) : .Bl -tag -width ".Va ifi_lastchange" -offset indent .It Va ifi_link_state .Pq Vt u_char The current link state of Ethernet interfaces. -See the +See the .Sx Interface Link States section for possible values. .It Va ifi_ipackets Number of packets received. .It Va ifi_ierrors Number of receive errors detected (e.g., FCS errors, DMA overruns, etc.). More detailed breakdowns can often be had by way of a link-specific MIB. .It Va ifi_opackets Number of packets transmitted. .It Va ifi_oerrors Number of output errors detected (e.g., late collisions, DMA overruns, etc.). More detailed breakdowns can often be had by way of a link-specific MIB. .It Va ifi_collisions Total number of collisions detected on output for CSMA interfaces. (This member is sometimes [ab]used by other types of interfaces for other output error counts.) .It Va ifi_ibytes Total traffic received, in bytes. .It Va ifi_obytes Total traffic transmitted, in bytes. .It Va ifi_imcasts Number of packets received which were sent by link-layer multicast. .It Va ifi_omcasts Number of packets sent by link-layer multicast. .It Va ifi_iqdrops Number of packets dropped on input. Rarely implemented. .It Va ifi_noproto Number of packets received for unknown network-layer protocol. .\" .It Va ifi_recvtiming .\" Amount of time, in microseconds, spent to receive an average packet on .\" this interface. .\" See the .\" .Sx Polling .\" section, below. .\" .It Va ifi_xmittiming .\" Amount of time, in microseconds, spent to service a transmit-complete .\" interrupt on this interface. .\" See the .\" .Sx Polling .\" section, below. .It Va ifi_lastchange .Pq Vt "struct timeval" The time of the last administrative change to the interface (as required for .Tn SNMP ) . .El .Ss Interface Types The header file .In net/if_types.h defines symbolic constants for a number of different types of interfaces. The most common are: .Pp .Bl -tag -offset indent -width ".Dv IFT_PROPVIRTUAL" -compact .It Dv IFT_OTHER none of the following .It Dv IFT_ETHER Ethernet .It Dv IFT_ISO88023 ISO 8802-3 CSMA/CD .It Dv IFT_ISO88024 ISO 8802-4 Token Bus .It Dv IFT_ISO88025 ISO 8802-5 Token Ring .It Dv IFT_ISO88026 ISO 8802-6 DQDB MAN .It Dv IFT_FDDI FDDI .It Dv IFT_PPP Internet Point-to-Point Protocol .Pq Xr ppp 8 .It Dv IFT_LOOP The loopback .Pq Xr lo 4 interface .It Dv IFT_SLIP Serial Line IP .It Dv IFT_PARA Parallel-port IP .Pq Dq Tn PLIP .It Dv IFT_ATM Asynchronous Transfer Mode .El .Ss Interface Link States The following link states are currently defined: .Pp .Bl -tag -offset indent -width ".Dv LINK_STATE_UNKNOWN" -compact .It Dv LINK_STATE_UNKNOWN The link is in an invalid or unknown state. .It Dv LINK_STATE_DOWN The link is down. .It Dv LINK_STATE_UP The link is up. .El .Ss The Vt ifaddr Ss Structure Every interface is associated with a list (or, rather, a .Li TAILQ ) of addresses, rooted at the interface structure's .Va if_addrlist member. The first element in this list is always an .Dv AF_LINK address representing the interface itself; multi-access network drivers should complete this structure by filling in their link-layer addresses after calling .Fn if_attach . Other members of the structure represent network-layer addresses which have been configured by means of the .Dv SIOCAIFADDR command to .Xr ioctl 2 , called on a socket of the appropriate protocol family. The elements of this list consist of .Vt ifaddr structures. Most protocols will declare their own protocol-specific interface address structures, but all begin with a .Vt "struct ifaddr" which provides the most-commonly-needed functionality across all protocols. Interface addresses are reference-counted. .Pp The members of .Vt "struct ifaddr" are as follows: .Bl -tag -width ".Va ifa_rtrequest" -offset indent .It Va ifa_addr .Pq Vt "struct sockaddr *" The local address of the interface. .It Va ifa_dstaddr .Pq Vt "struct sockaddr *" The remote address of point-to-point interfaces, and the broadcast address of broadcast interfaces. .Va ( ifa_broadaddr is a macro for .Va ifa_dstaddr . ) .It Va ifa_netmask .Pq Vt "struct sockaddr *" The network mask for multi-access interfaces, and the confusion generator for point-to-point interfaces. .It Va ifa_ifp .Pq Vt "struct ifnet *" A link back to the interface structure. .It Va ifa_link .Pq Fn TAILQ_ENTRY ifaddr .Xr queue 3 glue for list of addresses on each interface. .It Va ifa_rtrequest See below. .It Va ifa_flags .Pq Vt u_short Some of the flags which would be used for a route representing this address in the route table. .It Va ifa_refcnt .Pq Vt short The reference count. .It Va ifa_metric .Pq Vt int A metric associated with this interface address, for the use of some external routing protocol. .El .Pp References to .Vt ifaddr structures are gained manually, by incrementing the .Va ifa_refcnt member. References are released by calling either the .Fn ifafree function or the .Fn IFAFREE macro. .Pp .Fn ifa_rtrequest is a pointer to a function which receives callouts from the routing code .Pq Fn rtrequest to perform link-layer-specific actions upon requests to add, resolve, or delete routes. The .Fa cmd argument indicates the request in question: .Dv RTM_ADD , RTM_RESOLVE , or .Dv RTM_DELETE . The .Fa rt argument is the route in question; the .Fa dst argument is the specific destination being manipulated for .Dv RTM_RESOLVE , or a null pointer otherwise. .Sh FUNCTIONS The functions provided by the generic interface code can be divided into two groups: those which manipulate interfaces, and those which manipulate interface addresses. In addition to these functions, there may also be link-layer support routines which are used by a number of drivers implementing a specific link layer over different hardware; see the documentation for that link layer for more details. .Ss The Vt ifmultiaddr Ss Structure Every multicast-capable interface is associated with a list of multicast group memberships, which indicate at a low level which link-layer multicast addresses (if any) should be accepted, and at a high level, in which network-layer multicast groups a user process has expressed interest. .Pp The elements of the structure are as follows: .Bl -tag -width ".Va ifma_refcount" -offset indent .It Va ifma_link .Pq Fn LIST_ENTRY ifmultiaddr .Xr queue 3 macro glue. .It Va ifma_addr .Pq Vt "struct sockaddr *" A pointer to the address which this record represents. The memberships for various address families are stored in arbitrary order. .It Va ifma_lladdr .Pq Vt "struct sockaddr *" A pointer to the link-layer multicast address, if any, to which the network-layer multicast address in .Va ifma_addr is mapped, else a null pointer. If this element is non-nil, this membership also holds an invisible reference to another membership for that link-layer address. .It Va ifma_refcount .Pq Vt u_int A reference count of requests for this particular membership. .El .Ss Interface Manipulation Functions .Bl -ohang -offset indent .It Fn if_attach Link the specified interface .Fa ifp into the list of network interfaces. Also initialize the list of addresses on that interface, and create a link-layer .Vt ifaddr structure to be the first element in that list. (A pointer to this address structure is saved in the global array .Va ifnet_addrs . ) .It Fn if_down Mark the interface .Fa ifp as down (i.e., .Dv IFF_UP is not set), flush its output queue, notify protocols of the transition, and generate a message from the .Xr route 4 routing socket. .It Fn if_up Mark the interface .Fa ifp as up, notify protocols of the transition, and generate a message from the .Xr route 4 routing socket. .It Fn ifpromisc Add or remove a promiscuous reference to .Fa ifp . If .Fa pswitch is true, add a reference; if it is false, remove a reference. On reference count transitions from zero to one and one to zero, set the .Dv IFF_PROMISC flag appropriately and call .Fn if_ioctl to set up the interface in the desired mode. .It Fn if_allmulti As .Fn ifpromisc , but for the all-multicasts .Pq Dv IFF_ALLMULTI flag instead of the promiscuous flag. .It Fn ifunit Return an .Vt ifnet pointer for the interface named .Fa name . .It Fn ifioctl Process the ioctl request .Fa cmd , issued on socket .Fa so by thread .Fa td , with data parameter .Fa data . This is the main routine for handling all interface configuration requests from user mode. It is ordinarily only called from the socket-layer .Xr ioctl 2 handler, and only for commands with class .Sq Li i . Any unrecognized commands will be passed down to socket .Fa so Ns 's protocol for further interpretation. The following commands are handled by .Fn ifioctl : .Pp .Bl -tag -width ".Dv OSIOCGIFNETMASK" -offset indent -compact .It Dv SIOCGIFCONF .It Dv OSIOCGIFCONF Get interface configuration. (No call-down to driver.) .Pp .It Dv SIOCSIFNAME Set the interface name. .Dv RTM_IFANNOUNCE departure and arrival messages are sent so that routing code that relies on the interface name will update its interface list. Caller must have appropriate privilege. (No call-down to driver.) .It Dv SIOCGIFCAP .It Dv SIOCGIFFLAGS .It Dv SIOCGIFMETRIC .It Dv SIOCGIFMTU .It Dv SIOCGIFPHYS Get interface capabilities, flags, metric, MTU, medium selection. (No call-down to driver.) .Pp .It Dv SIOCSIFCAP Enable or disable interface capabilities. Caller must have appropriate privilege. Before a call to the driver-specific .Fn if_ioctl routine, the requested mask for enabled capabilities is checked against the mask of capabilities supported by the interface, .Va if_capabilities . Requesting to enable an unsupported capability is invalid. The rest is supposed to be done by the driver, which includes updating .Va if_capenable and .Va if_data.ifi_hwassist appropriately. .Pp .It Dv SIOCSIFFLAGS Change interface flags. Caller must have appropriate privilege. If a change to the .Dv IFF_UP flag is requested, .Fn if_up or .Fn if_down is called as appropriate. Flags listed in .Dv IFF_CANTCHANGE are masked off, and the field .Va if_flags in the interface structure is updated. Finally, the driver .Fn if_ioctl routine is called to perform any setup requested. .Pp .It Dv SIOCSIFMETRIC .It Dv SIOCSIFPHYS Change interface metric or medium. Caller must have appropriate privilege. .Pp .It Dv SIOCSIFMTU Change interface MTU. Caller must have appropriate privilege. MTU values less than 72 or greater than 65535 are considered invalid. The driver .Fn if_ioctl routine is called to implement the change; it is responsible for any additional sanity checking and for actually modifying the MTU in the interface structure. .Pp .It Dv SIOCADDMULTI .It Dv SIOCDELMULTI Add or delete permanent multicast group memberships on the interface. Caller must have appropriate privilege. The .Fn if_addmulti or .Fn if_delmulti function is called to perform the operation; qq.v. .Pp .It Dv SIOCSIFDSTADDR .It Dv SIOCSIFADDR .It Dv SIOCSIFBRDADDR .It Dv SIOCSIFNETMASK The socket's protocol control routine is called to implement the requested action. .Pp .It Dv OSIOGIFADDR .It Dv OSIOCGIFDSTADDR .It Dv OSIOCGIFBRDADDR .It Dv OSIOCGIFNETMASK The socket's protocol control routine is called to implement the requested action. On return, .Vt sockaddr structures are converted into old-style (no .Va sa_len member). .El .El .Pp .Fn if_down , .Fn ifioctl , .Fn ifpromisc , and .Fn if_up must be called at .Fn splnet or higher. .Ss "Interface Address Functions" Several functions exist to look up an interface address structure given an address. .Fn ifa_ifwithaddr returns an interface address with either a local address or a broadcast address precisely matching the parameter .Fa addr . .Fn ifa_ifwithdstaddr returns an interface address for a point-to-point interface whose remote .Pq Dq destination address is .Fa addr . .Pp .Fn ifa_ifwithnet returns the most specific interface address which matches the specified address, .Fa addr , subject to its configured netmask, or a point-to-point interface address whose remote address is .Fa addr if one is found. .Pp .Fn ifaof_ifpforaddr returns the most specific address configured on interface .Fa ifp which matches address .Fa addr , subject to its configured netmask. If the interface is point-to-point, only an interface address whose remote address is precisely .Fa addr will be returned. .Pp All of these functions return a null pointer if no such address can be found. .Ss "Interface Multicast Address Functions" The .Fn if_addmulti , .Fn if_delmulti , and .Fn ifmaof_ifpforaddr functions provide support for requesting and relinquishing multicast group memberships, and for querying an interface's membership list, respectively. The .Fn if_addmulti function takes a pointer to an interface, .Fa ifp , and a generic address, .Fa sa . It also takes a pointer to a .Vt "struct ifmultiaddr *" which is filled in on successful return with the address of the group membership control block. The .Fn if_addmulti function performs the following four-step process: .Bl -enum -offset indent .It Call the interface's .Fn if_resolvemulti entry point to determine the link-layer address, if any, corresponding to this membership request, and also to give the link layer an opportunity to veto this membership request should it so desire. .It Check the interface's group membership list for a pre-existing membership for this group. If one is not found, allocate a new one; if one is, increment its reference count. .It If the .Fn if_resolvemulti routine returned a link-layer address corresponding to the group, repeat the previous step for that address as well. .It If the interface's multicast address filter needs to be changed because a new membership was added, call the interface's .Fn if_ioctl routine (with a .Fa cmd argument of .Dv SIOCADDMULTI ) to request that it do so. .El .Pp The .Fn if_delmulti function, given an interface .Fa ifp and an address, .Fa sa , reverses this process. Both functions return zero on success, or a standard error number on failure. .Pp The .Fn ifmaof_ifpforaddr function examines the membership list of interface .Fa ifp for an address matching .Fa addr , and returns a pointer to that .Vt "struct ifmultiaddr" if one is found, else it returns a null pointer. .Sh SEE ALSO .Xr ioctl 2 , .Xr link_addr 3 , .Xr queue 3 , .Xr sysctl 3 , .Xr bpf 4 , .Xr ifmib 4 , .Xr lo 4 , .Xr netintro 4 , .Xr polling 4 , .Xr config 8 , .Xr ppp 8 , .Xr mbuf 9 , .Xr rtentry 9 .Rs .%A Gary R. Wright .%A W. Richard Stevens .%B TCP/IP Illustrated .%V Vol. 2 .%O Addison-Wesley, ISBN 0-201-63354-X .Re .Sh AUTHORS This manual page was written by .An Garrett A. Wollman . Index: stable/5/share/man/man9/physio.9 =================================================================== --- stable/5/share/man/man9/physio.9 (revision 139701) +++ stable/5/share/man/man9/physio.9 (revision 139702) @@ -1,138 +1,138 @@ .\" $NetBSD: physio.9,v 1.2 1996/11/11 00:05:12 lukem Exp $ .\" .\" Copyright (c) 1996 The NetBSD Foundation, Inc. .\" All rights reserved. .\" .\" This code is derived from software contributed to The NetBSD Foundation .\" by Paul Kranenburg. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" 3. All advertising materials mentioning features or use of this software .\" must display the following acknowledgement: .\" This product includes software developed by the NetBSD .\" Foundation, Inc. and its contributors. .\" 4. Neither the name of The NetBSD Foundation nor the names of its .\" contributors may be used to endorse or promote products derived .\" from this software without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED .\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE .\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" .\" $FreeBSD$ .\" .Dd July 8, 2004 .Dt PHYSIO 9 .Os .Sh NAME .Nm physio .Nd initiate I/O on raw devices .Sh SYNOPSIS .In sys/param.h .In sys/systm.h .In sys/bio.h .In sys/buf.h .Ft int .Fn physio "dev_t dev" "struct uio *uio" "int ioflag" .Sh DESCRIPTION The .Fn physio is a helper function typically called from character device .Fn read and .Fn write routines to start I/O on a user process buffer. The maximum amount of data to transfer with each call is determined by .Fa dev->si_iosize_max . -The +The .Fn physio call converts the I/O request into a .Fn strategy request and passes the new request to the driver's .Fn strategy routine for processing. .Pp Since .Fa uio normally describes user space addresses, .Fn physio needs to lock the those pages into memory. This is done by calling .Fn vmapbuf for the appropriate pages. .Fn physio always awaits the completion of the entire requested transfer before returning, unless an error condition is detected earlier. .Pp A break-down of the arguments follows: .Bl -tag -width indent .It Fa dev The device number identifying the device to interact with. .It Fa uio The description of the entire transfer as requested by the user process. Currently, the results of passing a .Fa uio structure with the .Va uio_segflg set to anything other than .Dv UIO_USERSPACE are undefined. .It Fa ioflag The ioflag argument from the .Fn read or .Fn write function calling .Fn physio . .El .Sh RETURN VALUES If successful .Fn physio returns 0. .Er EFAULT is returned if the address range described by .Fa uio is not accessible by the requesting process. .Fn physio will return any error resulting from calls to the device strategy routine, by examining the .Dv B_ERROR buffer flag and the .Va b_error field. Note that the actual transfer size may be less than requested by .Fa uio if the device signals an .Dq "end of file" condition. .Sh SEE ALSO .Xr read 2 , .Xr write 2 .Sh HISTORY The .Nm manual page is originally from .Nx with minor changes for applicability with .Fx . .Pp The .Nm call has been completely re-written for providing higher I/O and paging performance. Index: stable/5/share/man/man9/rtentry.9 =================================================================== --- stable/5/share/man/man9/rtentry.9 (revision 139701) +++ stable/5/share/man/man9/rtentry.9 (revision 139702) @@ -1,303 +1,303 @@ .\" .\" Copyright 1996 Massachusetts Institute of Technology .\" .\" Permission to use, copy, modify, and distribute this software and .\" its documentation for any purpose and without fee is hereby .\" granted, provided that both the above copyright notice and this .\" permission notice appear in all copies, that both the above .\" copyright notice and this permission notice appear in all .\" supporting documentation, and that the name of M.I.T. not be used .\" in advertising or publicity pertaining to distribution of the .\" software without specific, written prior permission. M.I.T. makes .\" no representations about the suitability of this software for any .\" purpose. It is provided "as is" without express or implied .\" warranty. .\" .\" THIS SOFTWARE IS PROVIDED BY M.I.T. ``AS IS''. M.I.T. DISCLAIMS .\" ALL EXPRESS OR IMPLIED WARRANTIES WITH REGARD TO THIS SOFTWARE, .\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF .\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT .\" SHALL M.I.T. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT .\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF .\" USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND .\" ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, .\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT .\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" .\" $FreeBSD$ .\" .Dd October 7, 2004 .Os .Dt RTENTRY 9 .Sh NAME .Nm rtentry .Nd structure of an entry in the kernel routing table .Sh SYNOPSIS .In sys/types.h .In sys/socket.h .In net/route.h .Sh DESCRIPTION The kernel provides a common mechanism by which all protocols can store and retrieve entries from a central table of routes. Parts of this mechanism are also used to interact with user-level processes by means of a socket in the .Xr route 4 pseudo-protocol family. The .In net/route.h header file defines the structures and manifest constants used in this facility. .Pp The basic structure of a route is defined by .Vt "struct rtentry" , which includes the following fields: .Bl -tag -offset indent -width 6n .It Vt "struct radix_node rt_nodes[2]" ; Glue used by the radix-tree routines. These members also include in their substructure the key (i.e., destination address) and mask used when the route was created. The .Fn rt_key rt and .Fn rt_mask rt macros can be used to extract this information (in the form of a .Vt "struct sockaddr *" ) given a .Vt "struct rtentry *" . .It Vt "struct sockaddr *rt_gateway" ; The .Dq target of the route, which can either represent a destination in its own right (some protocols will put a link-layer address here), or some intermediate stop on the way to that destination (if the .Dv RTF_GATEWAY flag is set). .It Vt "u_long rt_flags" ; See below. .It Vt "struct ifnet *rt_ifp" ; .It Vt "struct ifaddr *rt_ifa" ; These two fields represent the .Dq answer , as it were, to the question posed by a route lookup; that is, they name the interface and interface address to be used in sending a packet to the destination or set of destinations which this route represents. .It Vt "struct rt_metrics_lite rt_rmx" ; See below. .It Vt "long rt_refcnt" ; Route entries are reference-counted; this field indicates the number of external (to the radix tree) references. If the .Dv RTF_UP flag is not present, the .Fn rtfree function will delete the route from the radix tree when the last reference drops. .It Vt "struct sockaddr *rt_genmask" ; When the .Fn rtalloc family of functions performs a cloning operation as requested by the .Dv RTF_CLONING flag, this field is used as the mask for the new route which is inserted into the table. If this field is a null pointer, then a host route is generated. .It Vt "caddr_t rt_llinfo" ; When the .Dv RTF_LLINFO flag is set, this field contains information specific to the link layer represented by the named interface address. (It is normally managed by the .Va rt_ifa->ifa_rtrequest routine.) Protocols such as .Xr arp 4 use this field to reference per-destination state internal to that protocol. .It Vt "struct rtentry *rt_gwroute" ; This member is a reference to a route whose destination is .Va rt_gateway . It is only used for .Dv RTF_GATEWAY routes. .It Vt "struct rtentry *rt_parent" ; A reference to the route from which this route was cloned, or a null pointer if this route was not generated by cloning. See also the .Dv RTF_WASCLONED flag. .It Vt "struct mtx rt_mtx" ; Mutex to lock this routing entry. .El .Pp The following flag bits are defined: .Bl -tag -offset indent -width ".Dv RTF_BLACKHOLE" -compact .It Dv RTF_UP The route is not deleted. .It Dv RTF_GATEWAY The route points to an intermediate destination and not the ultimate recipient; the .Va rt_gateway and .Va rt_gwroute fields name that destination. .It Dv RTF_HOST This is a host route. .It Dv RTF_REJECT The destination is presently unreachable. This should result in an .Er EHOSTUNREACH error from output routines. .It Dv RTF_DYNAMIC This route was created dynamically by .Fn rtredirect . .It Dv RTF_MODIFIED This route was modified by .Fn rtredirect . .It Dv RTF_DONE Used only in the .Xr route 4 protocol, indicating that the request was executed. .It Dv RTF_CLONING When this route is returned as a result of a lookup, automatically create a new route using this one as a template and .Va rt_genmask (if present) as a mask. .It Dv RTF_XRESOLVE When this route is returned as a result of a lookup, send a report on the .Xr route 4 interface requesting that an external process perform resolution for this route. (Used in conjunction with .Dv RTF_CLONING . ) .It Dv RTF_LLINFO Indicates that this route represents information being managed by a link layer's adaptation layer (e.g., .Tn ARP ) . .It Dv RTF_STATIC Indicates that this route was manually added by means of the .Xr route 8 command. .It Dv RTF_BLACKHOLE Requests that output sent via this route be discarded. .It Dv RTF_PROTO1 .It Dv RTF_PROTO2 .It Dv RTF_PROTO3 Protocol-specific. .It Dv RTF_PRCLONING This flag is obsolete and simply ignored by facility. .It Dv RTF_WASCLONED Indicates that this route was generated as a result of cloning requested by the .Dv RTF_CLONING flag. When set, the .Va rt_parent field indicates the route from which this one was generated. .It Dv RTF_PINNED (Reserved for future use to indicate routes which are not to be modified by a routing protocol.) .It Dv RTF_LOCAL Indicates that the destination of this route is an address configured as belonging to this system. .It Dv RTF_BROADCAST Indicates that the destination is a broadcast address. .It Dv RTF_MULTICAST Indicates that the destination is a multicast address. .El .Pp Every route has associated with it a set of metrics, stored in .Vt "struct rt_metrics_lite" . Metrics are supplied in .Vt "struct rt_metrics" passed with routing control messages via .Xr route 4 API. Currently only .Vt rmx_mtu , rmx_expire , and .Vt rmx_pksent metrics are used in -.Vt "struct rt_metrics_lite" . +.Vt "struct rt_metrics_lite" . All others are ignored. .Pp The following metrics are defined by .Vt "struct rt_metrics" : .Bl -tag -offset indent -width 6n .It Vt "u_long rmx_locks" ; Flag bits indicating which metrics the kernel is not permitted to dynamically modify. .It Vt "u_long rmx_mtu" ; MTU for this path. .It Vt "u_long rmx_hopcount" ; Number of intermediate systems on the path to this destination. .It Vt "u_long rmx_expire" ; The time (a la .Xr time 3 ) at which this route should expire, or zero if it should never expire. It is the responsibility of individual protocol suites to ensure that routes are actually deleted once they expire. .It Vt "u_long rmx_recvpipe" ; Nominally, the bandwidth-delay product for the path .Em from the destination .Em to this system. In practice, this value is used to set the size of the receive buffer (and thus the window in sliding-window protocols like .Tn TCP ) . .It Vt "u_long rmx_sendpipe" ; As before, but in the opposite direction. .It Vt "u_long rmx_ssthresh" ; The slow-start threshold used in .Tn TCP congestion-avoidance. .It Vt "u_long rmx_rtt" ; The round-trip time to this destination, in units of .Dv RMX_RTTUNIT per second. .It Vt "u_long rmx_rttvar" ; The average deviation of the round-type time to this destination, in units of .Dv RMX_RTTUNIT per second. .It Vt "u_long rmx_pksent" ; A count of packets successfully sent via this route. .It Vt "u_long rmx_filler[4]" ; .\" XXX badly named Empty space available for protocol-specific information. .El .Sh SEE ALSO .Xr route 4 , .Xr route 8 , .Xr rtalloc 9 .Sh HISTORY The .Vt rtentry structure first appeared in .Bx 4.2 . The radix-tree representation of the routing table and the .Vt rt_metrics structure first appeared in .Bx 4.3 reno . .Sh BUGS There are a number of historical relics remaining in this interface. The .Va rt_gateway and .Va rmx_filler fields could be named better. .Pp There is some disagreement over whether it is legitimate for .Dv RTF_LLINFO to be set by any process other than .Va rt_ifa->ifa_rtrequest . .Sh AUTHORS This manual page was written by .An Garrett Wollman . Index: stable/5/share/man/man9/suser.9 =================================================================== --- stable/5/share/man/man9/suser.9 (revision 139701) +++ stable/5/share/man/man9/suser.9 (revision 139702) @@ -1,133 +1,133 @@ .\" .\" Copyright (c) 1996 Julian R Elischer .\" All rights reserved. .\" .\" This code is derived from software contributed by Kenneth Stailey. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" 3. All advertising materials mentioning features or use of this software .\" must display the following acknowledgement: .\" This product includes software developed for the FreeBSD Project .\" by Julian R Elischer .\" 4. The name of the author may not be used to endorse or promote products .\" derived from this software without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, .\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED .\" AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, .\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" .\" $FreeBSD$ .\" .Dd April 2, 2002 .Dt SUSER 9 .Os .Sh NAME .Nm suser , .Nm suser_cred .Nd check if credentials have superuser privilege .Sh SYNOPSIS .In sys/param.h .In sys/systm.h .Ft int .Fn suser "struct thread *td" .Ft int .Fn suser_cred "struct ucred *cred" "int flag" .Sh DESCRIPTION The .Fn suser and .Fn suser_cred functions check if the credentials given include superuser powers. .Pp The .Fn suser function is the most common, and should be used unless special circumstances dictate otherwise. .Pp The .Fn suser_cred function should be used when the credentials to be checked are not the thread's own, when there is no thread, when superuser powers should be extended to imprisoned roots, or when the credential to be checked is the real user rather than the effective user. .Pp By default, a process does not command superuser powers if it has been imprisoned by the .Xr jail 2 system call. There are cases however where this is appropriate, and this can be done by passing .Dv SUSER_ALLOWJAIL in the .Fa flag argument to the .Fn suser_cred function. It is important to review carefully in each case that this does not weaken the prison. Generally, only where the action is protected by .Xr chroot 2 implicit in the .Xr jail 2 call should such powers be granted. .Pp By default, the credential checked is the effective user. -There are cases -where it is instead necessary to check the real user (for example, when +There are cases +where it is instead necessary to check the real user (for example, when determining if resource limits should be applied), and this can be done by passing the .Dv SUSER_RUID flag in the .Fa flag argument to the .Fn suser_cred function. .Pp The .Fn suser and .Fn suser_cred functions note the fact that superuser powers have been used in the process structure of the process specified. Because part of their function is to notice whether superuser powers have been used, the functions should only be called after other permission possibilities have been exhausted. .Sh RETURN VALUES The .Fn suser and .Fn suser_cred functions return 0 if the user has superuser powers and .Er EPERM otherwise. This is the .Em reverse logic of some other implementations of .Fn suser in which a TRUE response indicates superuser powers. .Sh SEE ALSO .Xr chroot 2 , .Xr jail 2 .Sh BUGS The .Fn suser and .Fn suser_cred functions don't, in fact, record that superuser privileges have been used, and haven't done so since August 2000.