Index: head/lib/libc/iconv/iconvctl.3 =================================================================== --- head/lib/libc/iconv/iconvctl.3 (revision 222599) +++ head/lib/libc/iconv/iconvctl.3 (revision 222600) @@ -1,162 +1,162 @@ .\" Copyright (c) 2009 Gabor Kovesdan .\" 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. .\" .\" Portions of this text are reprinted and reproduced in electronic form .\" from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- .\" Portable Operating System Interface (POSIX), The Open Group Base .\" Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of .\" Electrical and Electronics Engineers, Inc and The Open Group. In the .\" event of any discrepancy between this version and the original IEEE and .\" The Open Group Standard, the original IEEE and The Open Group Standard is .\" the referee document. The original Standard can be obtained online at .\" http://www.opengroup.org/unix/online.html. .\" .\" $FreeBSD$ .\" .Dd November 7, 2009 .Dt ICONVCTL 3 .Os .Sh NAME .Nm iconvctl .Nd controlling and diagnostical facility for .Xr iconv 3 .Sh LIBRARY .Lb libc .Sh SYNOPSIS .In iconv.h .Ft int .Fn iconvctl "iconv_t cd" "int request" "void *argument" .Sh DESCRIPTION The .Fn iconvctl function can retrieve or set specific conversion setting from the .Fa cd conversion descriptor. The .Fa request parameter specifies the operation to accomplish and .Fa argument is an operation-specific argument. .Pp The possible operations are the following: .Bl -tag -width -indent .It ICONV_TRIVIALP In this case .Fa argument is an .Ft int * variable, which is set to 1 if the encoding is trivial one, i.e. the input and output encodings are the same. Otherwise, the variable will be 0. .It ICONV_GET_TRANSLITERATE Determines if transliteration is enabled. The answer is stored in .Fa argument , which is of .Ft int * . It will be set to 1 if this feature is enabled or set to 0 otherwise. .It ICONV_SET_TRANSLITERATE Enables transliteration if .Fa argument , which is of .Ft int * set to 1 or disables it if .Fa argument is set to 0. .It ICONV_GET_DISCARD_ILSEQ Determines if illegal sequences are discarded or not. The answer is stored in .Fa argument , which is of .Ft int * . It will be set to 1 if this feature is enabled or set to 0 otherwise. .It ICONV_SET_DISCARD_ILSEQ Sets whether illegal sequences are discarded or not. .Fa argument , which is of .Ft int * set to 1 or disables it if .Fa argument is set to 0. .It ICONV_SET_HOOKS Sets callback functions, which will be called back after successful conversions. The callback functions are stored in a .Ft struct iconv_hooks variable, which is passed to .Nm via .Fa argument by its address. .\" XXX: fallbacks are unimplemented and trying to set them will always .\" return EOPNOTSUPP but definitions are provided for source-level .\" compatibility. .\".It ICONV_SET_FALLBACKS .\"Sets callback functions, which will be called back after failed .\"conversions. .\"The callback functions are stored in a .\".Ft struct iconv_fallbacks .\"variable, which is passed to .\".Nm .\"via .\".Fa argument .\"by its address. .Sh RETURN VALUES Upon successful completion .Fn iconvctl , returns 0. Otherwise, \-1 is returned and errno is set to specify the kind of error. .Sh ERRORS The .Fn iconvctl function may cause an error in the following cases: .Bl -tag -width Er .It Bq Er EINVAL Unknown or unimplemented operation. .It Bq Er EBADF The conversion descriptor specified by .Fa cd is invalid. .Sh SEE ALSO .Xr iconv 1 , .Xr iconv 3 .Sh STANDARDS The .Nm facility is a non-standard extension, which appeared in the GNU implementation and was adopted in .Fx 9 for compatibility's sake. +.Sh AUTHORS +This manual page was written by +.An Gabor Kovesdan Aq gabor@FreeBSD.org . .Sh BUGS Transliteration is enabled in this implementation by default, so it is impossible by design to turn it off. Accordingly, trying to turn it off will always fail and \-1 will be returned. Getting the transliteration state will always succeed and indicate that it is turned on, though. -.Sh AUTHORS -This manual page was written by -.An Gabor Kovesdan Aq gabor@FreeBSD.org . Index: head/share/man/man4/bwn.4 =================================================================== --- head/share/man/man4/bwn.4 (revision 222599) +++ head/share/man/man4/bwn.4 (revision 222600) @@ -1,157 +1,157 @@ .\" Copyright (c) 2009 Christian Brueffer .\" 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 February 15, 2011 .Dt BWN 4 .Os .Sh NAME .Nm bwn .Nd Broadcom BCM43xx IEEE 802.11b/g wireless network driver .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your kernel configuration file: .Bd -ragged -offset indent .Cd "device siba_bwn" .Cd "device bwn" .Cd "device wlan" .Cd "device wlan_amrr" .Cd "device firmware" .Ed .Pp Alternatively, to load the driver as a module at boot time, place the following line in .Xr loader.conf 5 : .Bd -literal -offset indent if_bwn_load="YES" .Ed .Sh DESCRIPTION The .Nm driver provides support for Broadcom BCM43xx based PCI/CardBus network adapters. .Pp It supports .Cm station and .Cm monitor mode operation. Only one virtual interface may be configured at any time. For more information on configuring this device, see .Xr ifconfig 8 . .Pp This driver requires firmware to be loaded before it will work. The .Pa ports/net/bwn-firmware-kmod port needs to be installed before .Xr ifconfig 8 will work. Most cases you need to use bwn_v4_ucode module but if you are a LP (low power) PHY user please uses bwn_v4_lp_ucode module. .Sh HARDWARE The .Nm driver supports Broadcom BCM43xx based wireless devices, including: .Pp .Bl -column -compact "Apple Airport Extreme" "BCM4306" "Mini PCI" "a/b/g" -offset 6n .It Em "Card Chip Bus Standard" .It "Apple Airport Extreme BCM4318 PCI b/g" .It "ASUS WL-138g BCM4318 PCI b/g" .It "Buffalo WLI-CB-G54S BCM4318 CardBus b/g" .It "Dell Wireless 1390 BCM4311 Mini PCI b/g" .It "Dell Wireless 1470 BCM4318 Mini PCI b/g" .It "Dell Truemobile 1400 BCM4309 Mini PCI b/g" .It "HP Compaq 6715b BCM4312 PCI b/g" .It "HP nx6125 BCM4319 PCI b/g" .It "Linksys WPC54G Ver 3 BCM4318 CardBus b/g" .It "Linksys WPC54GS Ver 2 BCM4318 CardBus b/g" .It "US Robotics 5411 BCM4318 CardBus b/g" .El .Pp Users of older Broadcom chipsets (BCM4301, BCM4303 and BCM4306 rev 2) must use .Xr bwi 4 because the v4 version of the firmware does not support these chips. The newer firmware is too big to fit into these old chips. .Sh EXAMPLES Join an existing BSS network (i.e., connect to an access point): .Bd -literal -offset indent ifconfig wlan create wlandev bwn0 inet 192.168.0.20 \e netmask 0xffffff00 .Ed .Pp Join a specific BSS network with network name .Dq Li my_net : .Pp .Dl "ifconfig wlan create wlandev bwn0 ssid my_net up" .Pp Join a specific BSS network with 64-bit WEP encryption: .Bd -literal -offset indent ifconfig wlan create wlandev bwn0 ssid my_net \e wepmode on wepkey 0x1234567890 weptxkey 1 up .Ed .Sh LOADER TUNABLES Tunables can be set at the .Xr loader 8 prompt before booting the kernel or stored in .Xr loader.conf 5 . .Bl -tag -width indent .It Va hw.bwn.msi_disable This tunable disables MSI support on the hardware. The default value is 0. .It Va hw.bwn.usedma This tunable enables DMA operations on the hardware. If the value is 0, PIO mode would be used. The default value is 1. .El .Sh SEE ALSO .Xr arp 4 , .Xr bwi 4 , .Xr cardbus 4 , .Xr intro 4 , .Xr pci 4 , .Xr wlan 4 , .Xr wlan_amrr 4 , .Xr ifconfig 8 , .Xr wpa_supplicant 8 .Sh HISTORY The .Nm driver first appeared in .Fx 8.1 . -.Sh CAVEATS -Some LP PHY devices have DMA operation problems that in that case try to -use PIO mode. .Sh AUTHORS .An -nosplit The .Nm driver was written by .An Weongyo Jeong .Aq weongyo@FreeBSD.org . .\".Sh BUGS .\"Some card based on the BCM4306 and BCM4309 chips do not work properly .\"on channel 1, 2 and 3. +.Sh CAVEATS +Some LP PHY devices have DMA operation problems that in that case try to +use PIO mode. Index: head/share/man/man4/em.4 =================================================================== --- head/share/man/man4/em.4 (revision 222599) +++ head/share/man/man4/em.4 (revision 222600) @@ -1,288 +1,288 @@ .\" Copyright (c) 2001-2003, 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 May 14, 2010 .Dt EM 4 .Os .Sh NAME .Nm em .Nd "Intel(R) PRO/1000 Gigabit Ethernet adapter driver" .Sh SYNOPSIS To compile this driver into the kernel, place the following line in your kernel configuration file: .Bd -ragged -offset indent .Cd "device em" .Ed .Pp Alternatively, to load the driver as a module at boot time, place the following line in .Xr loader.conf 5 : .Bd -literal -offset indent if_em_load="YES" .Ed .Sh DESCRIPTION The .Nm driver provides support for PCI Gigabit Ethernet adapters based on the Intel 82540, 82541ER, 82541PI, 82542, 82543, 82544, 82545, 82546, 82546EB, 82546GB, 82547, 82571, 81572, 82573, and 82574 Ethernet controller chips. The driver supports Transmit/Receive checksum offload and Jumbo Frames on all but 82542-based adapters. Furthermore it supports TCP segmentation offload (TSO) on all adapters but those based on the 82543, 82544 and 82547 controller chips. The identification LEDs of the adapters supported by the .Nm driver can be controlled via the .Xr led 4 API for localization purposes. For further hardware information, see the .Pa README included with the driver. .Pp For questions related to hardware requirements, refer to the documentation supplied with your Intel PRO/1000 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. The .Nm driver supports the following media types: .Bl -tag -width ".Cm 10baseT/UTP" .It Cm autoselect Enables auto-negotiation for speed and duplex. .It Cm 10baseT/UTP Sets 10Mbps operation. Use the .Cm mediaopt option to select .Cm full-duplex mode. .It Cm 100baseTX Sets 100Mbps operation. Use the .Cm mediaopt option to select .Cm full-duplex mode. .It Cm 1000baseSX Sets 1000Mbps operation. Only .Cm full-duplex mode is supported at this speed. .It Cm 1000baseTX Sets 1000Mbps operation. Only .Cm full-duplex mode is supported at this speed. .El .Pp The .Nm driver supports the following media options: .Bl -tag -width ".Cm full-duplex" .It Cm full-duplex Forces full-duplex operation .It Cm half-duplex Forces half-duplex operation. .El .Pp Only use .Cm mediaopt to set the driver to .Cm full-duplex . If .Cm mediaopt is not specified, the driver defaults to .Cm half-duplex . .Pp For more information on configuring this device, see .Xr ifconfig 8 . .Sh HARDWARE The .Nm driver supports Gigabit Ethernet adapters based on the Intel 82540, 82541ER, 82541PI, 82542, 82543, 82544, 82545, 82546, 82546EB, 82546GB, 82547, 82571, 82572, 82573, and 82574 controller chips: .Pp .Bl -bullet -compact .It Intel PRO/1000 CT Network Connection (82547) .It Intel PRO/1000 F Server Adapter (82543) .It Intel PRO/1000 Gigabit Server Adapter (82542) .It Intel PRO/1000 GT Desktop Adapter (82541PI) .It Intel PRO/1000 MF Dual Port Server Adapter (82546) .It Intel PRO/1000 MF Server Adapter (82545) .It Intel PRO/1000 MF Server Adapter (LX) (82545) .It Intel PRO/1000 MT Desktop Adapter (82540) .It Intel PRO/1000 MT Desktop Adapter (82541) .It Intel PRO/1000 MT Dual Port Server Adapter (82546) .It Intel PRO/1000 MT Quad Port Server Adapter (82546EB) .It Intel PRO/1000 MT Server Adapter (82545) .It Intel PRO/1000 PF Dual Port Server Adapter (82571) .It Intel PRO/1000 PF Quad Port Server Adapter (82571) .It Intel PRO/1000 PF Server Adapter (82572) .It Intel PRO/1000 PT Desktop Adapter (82572) .It Intel PRO/1000 PT Dual Port Server Adapter (82571) .It Intel PRO/1000 PT Quad Port Server Adapter (82571) .It Intel PRO/1000 PT Server Adapter (82572) .It Intel PRO/1000 T Desktop Adapter (82544) .It Intel PRO/1000 T Server Adapter (82543) .It Intel PRO/1000 XF Server Adapter (82544) .It Intel PRO/1000 XT Server Adapter (82544) .El .Sh LOADER TUNABLES Tunables can be set at the .Xr loader 8 prompt before booting the kernel or stored in .Xr loader.conf 5 . .Bl -tag -width indent .It Va hw.em.rxd Number of receive descriptors allocated by the driver. The default value is 256. The 82542 and 82543-based adapters can handle up to 256 descriptors, while others can have up to 4096. .It Va hw.em.txd Number of transmit descriptors allocated by the driver. The default value is 256. The 82542 and 82543-based adapters can handle up to 256 descriptors, while others can have up to 4096. .It Va hw.em.rx_int_delay This value delays the generation of receive interrupts in units of 1.024 microseconds. The default value is 0, since adapters may hang with this feature being enabled. .It Va hw.em.rx_abs_int_delay If .Va hw.em.rx_int_delay is non-zero, this tunable limits the maximum delay in which a receive interrupt is generated. .It Va hw.em.tx_int_delay This value delays the generation of transmit interrupts in units of 1.024 microseconds. The default value is 64. .It Va hw.em.tx_abs_int_delay If .Va hw.em.tx_int_delay is non-zero, this tunable limits the maximum delay in which a transmit interrupt is generated. .El +.Sh FILES +.Bl -tag -width /dev/led/em* +.It Pa /dev/led/em* +identification LED device nodes +.El +.Sh EXAMPLES +Make the identification LED of em0 blink: +.Pp +.Dl "echo f2 > /dev/led/em0" +.Pp +Turn the identification LED of em0 off again: +.Pp +.Dl "echo 0 > /dev/led/em0" +.Pp .Sh DIAGNOSTICS .Bl -diag .It "em%d: Unable to allocate bus resource: memory" A fatal initialization error has occurred. .It "em%d: Unable to allocate bus resource: interrupt" A fatal initialization error has occurred. .It "em%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 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 FILES -.Bl -tag -width /dev/led/em* -.It Pa /dev/led/em* -identification LED device nodes -.El -.Sh EXAMPLES -Make the identification LED of em0 blink: -.Pp -.Dl "echo f2 > /dev/led/em0" -.Pp -Turn the identification LED of em0 off again: -.Pp -.Dl "echo 0 > /dev/led/em0" -.Pp .Sh SEE ALSO .Xr altq 4 , .Xr arp 4 , .Xr igb 4 , .Xr led 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.4 . .Sh AUTHORS The .Nm driver was written by .An Intel Corporation Aq freebsdnic@mailbox.intel.com . .Sh BUGS Hardware-assisted VLAN processing is disabled by default. You can enable it on an .Nm interface using .Xr ifconfig 8 . Index: head/share/man/man4/igb.4 =================================================================== --- head/share/man/man4/igb.4 (revision 222599) +++ head/share/man/man4/igb.4 (revision 222600) @@ -1,216 +1,216 @@ .\" Copyright (c) 2001-2003, 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 May 14, 2010 .Dt IGB 4 .Os .Sh NAME .Nm igb .Nd "Intel(R) PRO/1000 PCI Express Gigabit Ethernet adapter driver" .Sh SYNOPSIS To compile this driver into the kernel, place the following line in your kernel configuration file: .Bd -ragged -offset indent .Cd "device igb" .Ed .Pp Alternatively, to load the driver as a module at boot time, place the following line in .Xr loader.conf 5 : .Bd -literal -offset indent if_igb_load="YES" .Ed .Sh DESCRIPTION The .Nm driver provides support for PCI Express Gigabit Ethernet adapters based on the Intel 82575 and 82576 Ethernet controller chips. The driver supports Transmit/Receive checksum offload and Jumbo Frames. Furthermore it supports TCP segmentation offload (TSO) on all adapters. The identification LEDs of the adapters supported by the .Nm driver can be controlled via the .Xr led 4 API for localization purposes. .Pp For questions related to hardware requirements, refer to the documentation supplied with your Intel PRO/1000 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 9216. .Pp This driver supports hardware assisted VLANs. The .Nm driver supports the following media types: .Bl -tag -width ".Cm 10baseT/UTP" .It Cm autoselect Enables auto-negotiation for speed and duplex. .It Cm 10baseT/UTP Sets 10Mbps operation. Use the .Cm mediaopt option to select .Cm full-duplex mode. .It Cm 100baseTX Sets 100Mbps operation. Use the .Cm mediaopt option to select .Cm full-duplex mode. .It Cm 1000baseSX Sets 1000Mbps operation. Only .Cm full-duplex mode is supported at this speed. .It Cm 1000baseTX Sets 1000Mbps operation. Only .Cm full-duplex mode is supported at this speed. .El .Pp The .Nm driver supports the following media options: .Bl -tag -width ".Cm full-duplex" .It Cm full-duplex Forces full-duplex operation .It Cm half-duplex Forces half-duplex operation. .El .Pp Only use .Cm mediaopt to set the driver to .Cm full-duplex . If .Cm mediaopt is not specified, the driver defaults to .Cm half-duplex . .Pp For more information on configuring this device, see .Xr ifconfig 8 . .Sh HARDWARE The .Nm driver supports Gigabit Ethernet adapters based on the Intel 82575 and 82576 controller chips: .Pp .Bl -bullet -compact .It Intel Gigabit ET Dual Port Server Adapter (82576) .It Intel Gigabit VT Quad Port Server Adapter (82575) .El .Sh LOADER TUNABLES Tunables can be set at the .Xr loader 8 prompt before booting the kernel or stored in .Xr loader.conf 5 . .Bl -tag -width indent .It Va hw.igb.rxd Number of receive descriptors allocated by the driver. The default value is 256. The minimum is 80, and the maximum is 4096. .It Va hw.igb.txd Number of transmit descriptors allocated by the driver. The default value is 256. The minimum is 80, and the maximum is 4096. .It Va hw.igb.enable_aim If set to 1, enable Adaptive Interrupt Moderation. The default is to enable Adaptive Interrupt Moderation. .El +.Sh FILES +.Bl -tag -width /dev/led/igb* +.It Pa /dev/led/igb* +identification LED device nodes +.El +.Sh EXAMPLES +Make the identification LED of igb0 blink: +.Pp +.Dl "echo f2 > /dev/led/igb0" +.Pp +Turn the identification LED of igb0 off again: +.Pp +.Dl "echo 0 > /dev/led/igb0" +.Pp .Sh DIAGNOSTICS .Bl -diag .It "igb%d: Unable to allocate bus resource: memory" A fatal initialization error has occurred. .It "igb%d: Unable to allocate bus resource: interrupt" A fatal initialization error has occurred. .It "igb%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 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 FILES -.Bl -tag -width /dev/led/igb* -.It Pa /dev/led/igb* -identification LED device nodes -.El -.Sh EXAMPLES -Make the identification LED of igb0 blink: -.Pp -.Dl "echo f2 > /dev/led/igb0" -.Pp -Turn the identification LED of igb0 off again: -.Pp -.Dl "echo 0 > /dev/led/igb0" -.Pp .Sh SEE ALSO .Xr altq 4 , .Xr arp 4 , .Xr em 4 , .Xr led 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 7.1 . .Sh AUTHORS The .Nm driver was written by .An Intel Corporation Aq freebsdnic@mailbox.intel.com . Index: head/share/man/man4/mps.4 =================================================================== --- head/share/man/man4/mps.4 (revision 222599) +++ head/share/man/man4/mps.4 (revision 222600) @@ -1,173 +1,173 @@ .\" .\" Copyright (c) 2010 Spectra Logic 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, .\" without modification. .\" 2. Redistributions in binary form must reproduce at minimum a disclaimer .\" substantially similar to the "NO WARRANTY" disclaimer below .\" ("Disclaimer") and any redistribution must be conditioned upon .\" including a substantially similar Disclaimer requirement for further .\" binary redistribution. .\" .\" NO WARRANTY .\" 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 MERCHANTIBILITY AND FITNESS FOR .\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT .\" HOLDERS OR CONTRIBUTORS BE LIABLE FOR 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 DAMAGES. .\" .\" mps driver man page. .\" .\" Author: Ken Merry .\" .\" $Id: //depot/SpectraBSD/head/share/man/man4/mps.4#4 $ .\" $FreeBSD$ .\" .Dd September 13, 2010 .Dt MPS 4 .Os .Sh NAME .Nm mps .Nd LSI Fusion-MPT 2 Serial Attached SCSI driver .Sh SYNOPSIS To compile this driver into your kernel, place the following lines in your kernel configuration file: .Bd -ragged -offset indent .Cd "device scbus" .Cd "device mps" .Ed .Pp Or, to load the driver as a module at boot, place the following line in .Xr loader.conf 5 : .Bd -literal -offset indent mps_load="YES" .Ed .Sh DESCRIPTION The .Nm driver provides support for LSI Logic Fusion-MPT 2 .Tn SAS controllers. .Sh HARDWARE The following controllers are supported by the .Nm driver .Pp .Bl -bullet -compact .It LSI Logic SAS2004 (4 Port .Tn SAS ) .It LSI Logic SAS2008 (8 Port .Tn SAS ) .It LSI Logic SAS2108 (8 Port .Tn SAS ) .It LSI Logic SAS2116 (16 Port .Tn SAS ) .It LSI Logic SAS2208 (8 Port .Tn SAS ) .El .Sh CONFIGURATION To disable MSI interrupts for all .Nm driver instances, set the following tunable value in .Xr loader.conf 5 : .Bd -literal -offset indent hw.mps.disable_msi=1 .Ed .Pp To disable MSI-X interrupts for all .Nm driver instances, set the following tunable value in .Xr loader.conf 5 : .Bd -literal -offset indent hw.mps.disable_msix=1 .Ed .Pp To allow the driver to send multiple task management commands (like abort, LUN reset, etc.), set the following variable: .Bd -literal -offset indent hw.mps.X.allow_multiple_tm_cmds=1 .Ed .Pp via .Xr loader.conf 5 or .Xr sysctl 8 , where X is the adapter number. By default the driver only sends one task management command at a time, to avoid causing a potential controller lock-up. .Sh DEBUGGING To enable debugging prints from the .Nm driver, set the .Bd -literal -offset indent hw.mps.X.debug_level .Ed .Pp variable, where X is the adapter number, either in .Xr loader.conf 5 or via .Xr sysctl 8 . The following bits have the described effects: .Bl -tag -offset indent .It 0x01 Enable informational prints. .It 0x02 Enable tracing prints. .It 0x04 Enable prints for driver faults. .It 0x08 Enable prints for controller events. .El .Sh SEE ALSO .Xr cd 4 , .Xr ch 4 , .Xr da 4 , .Xr mpt 4 , .Xr pci 4 , .Xr sa 4 , .Xr scsi 4 , .Xr targ 4 +.Sh HISTORY +The +.Nm +driver first appeared in +.Fx 9.0 . +.Sh AUTHORS +.An -nosplit +The +.Nm +driver was originally written by +.An Scott Long Aq scottl@FreeBSD.org . +This man page was written by +.An Ken Merry Aq ken@FreeBSD.org . .Sh BUGS This driver is still in development, it has only been tested on the amd64 architecture and has some known shortcomings: .Bl -bullet -compact .It No IR (Integrated RAID) support. .It No userland utility support (e.g. .Xr mptutil 8). .It Sometimes the driver gets into a state where devices arrive and depart multiple times, without user intervention. .It The error recovery code isn't complete. .El -.Sh HISTORY -The -.Nm -driver first appeared in -.Fx 9.0 . -.Sh AUTHORS -.An -nosplit -The -.Nm -driver was originally written by -.An Scott Long Aq scottl@FreeBSD.org . -This man page was written by -.An Ken Merry Aq ken@FreeBSD.org . Index: head/share/man/man4/uep.4 =================================================================== --- head/share/man/man4/uep.4 (revision 222599) +++ head/share/man/man4/uep.4 (revision 222600) @@ -1,79 +1,79 @@ .\" Copyright (c) 2010 Gleb Smirnoff .\" 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 May 25, 2010 .Dt UEP 4 .Os .Sh NAME .Nm uep .Nd eGalax touchscreen driver .Sh SYNOPSIS To compile this driver into the kernel, place the following lines into your kernel configuration file: .Bd -ragged -offset indent .Cd "device uep" .Cd "device usb" .Ed .Pp Alternatively, to load the driver as a module at boot time, place the following line in .Xr loader.conf 5 : .Bd -literal -offset indent uep_load="YES" .Ed .Sh DESCRIPTION The .Nm driver provides support for the eGalax onscreen touch panels. .Pp The driver is stub. It just probes and attaches to USB device, creates device entry and feeds reassembled packets from the hardware to it. .Pp To get mouse working in .Xr X 7 , one needs to install .Pa ports/x11-drivers/xf86-input-egalax . -.Sh BUGS -.Nm -can't act like -.Xr sysmouse 4 , -since the latter does not support absolute motion events. .Sh FILES .Nm creates a blocking pseudo\-device file, .Pa /dev/uep0 . .Sh SEE ALSO .Xr usb 4 , .Xr loader.conf 5 , .Xr xorg.conf 5 Pq Pa ports/x11/xorg , .Xr egalax 4 Pq Pa ports/x11-drivers/xf86-input-egalax . .Sh AUTHORS .An -nosplit The .Nm driver was written by .An Gleb Smirnoff Aq glebius@FreeBSD.org +.Sh BUGS +.Nm +can't act like +.Xr sysmouse 4 , +since the latter does not support absolute motion events. Index: head/share/man/man4/umcs7840.4 =================================================================== --- head/share/man/man4/umcs7840.4 (revision 222599) +++ head/share/man/man4/umcs7840.4 (revision 222600) @@ -1,97 +1,97 @@ .\" .\" Copyright (c) 2010 Lev Serebryakov . .\" All rights reserved. .\" .\" This code is derived from software contributed to The NetBSD Foundation .\" by Lennart Augustsson. .\" .\" 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 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 FOUNDATION 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 10, 2010 .Dt UMCS7840 4 .Os .Sh NAME .Nm umcs7840 .Nd USB support for serial adapters based on the MCS7820 and MCS7840 chips .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your kernel configuration file: .Bd -ragged -offset indent .Cd "device umcs7840" .Ed .Pp Alternatively, to load the driver as a module at boot time, place the following line in .Xr loader.conf 5 : .Bd -literal -offset indent umcs7840_load="YES" .Ed .Sh DESCRIPTION The .Nm driver provides support for various multiport serial adapters based on the MosCom MCS7820 and MCS7840 chips. They are 2- or 4-port adapters with full-featured 16550-compatible UARTs and very flexible baud generators. Also, these chips support RS422/RS485 and IrDA oprations. .Pp The device is accessed through the .Xr ucom 4 driver which makes it behave like a .Xr tty 4 . .Pp Different ports on device are presented as sub-units, like .Pa /dev/ttyU0.1 and .Pa /dev/ttyU0.2 .Sh HARDWARE The .Nm driver was tested on the following adapters: .Pp .Bl -bullet -compact .It ST Lab U-360 two-port serial USB adapter .It ST Lab U-400 four-port serial USB adapter .El .Sh SEE ALSO .Xr tty 4 , .Xr ucom 4 , .Xr usb 4 -.Sh BUGS -This driver doesn't support access to any fine tunes of -chip, like RS522/RS485 mode, non-standard baudrates, etc. .Sh HISTORY The .Nm driver appeared in ports since December of 2010. .Sh AUTHORS .An -nosplit The .Nm driver was written by .An Lev Serebryakov .Aq lev@FreeBSD.org . +.Sh BUGS +This driver doesn't support access to any fine tunes of +chip, like RS522/RS485 mode, non-standard baudrates, etc. Index: head/share/man/man9/bus_adjust_resource.9 =================================================================== --- head/share/man/man9/bus_adjust_resource.9 (revision 222599) +++ head/share/man/man9/bus_adjust_resource.9 (revision 222600) @@ -1,101 +1,101 @@ .\" -*- nroff -*- .\" .\" Copyright (c) 2011 Advanced Computing Technologies LLC .\" Written by: John H. Baldwin .\" 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 April 29, 2011 .Dt BUS_ADJUST_RESOURCE 9 .Os .Sh NAME .Nm bus_adjust_resource .Nd adjust resource allocated from a parent bus .Sh SYNOPSIS .In sys/param.h .In sys/bus.h .Pp .In machine/bus.h .In sys/rman.h .In machine/resource.h .Ft int .Fn bus_adjust_resource "device_t dev" "int type" "struct resource *r" "u_long start" "u_long end" .Sh DESCRIPTION This function is used to ask the parent bus to adjust the resource range assigned to an allocated resource. The resource .Fa r should have been allocated by a previous call to .Xr bus_alloc_resource 9 . The new resource range must overlap the existing range of .Fa r . The .Fa type argument should match the .Fa type argument passed to .Xr bus_alloc_resource 9 when the resource was initially allocated. .Pp Note that none of the constraints of the original allocation request such as alignment or boundary restrictions are checked by .Fn bus_adjust_resource . It is the caller's responsibility to enforce any such requirements. .Sh RETURN VALUES The .Fn bus_adjust_resource method returns zero on success or an error code on failure. +.Sh EXAMPLES +Grow an existing memory resource by 4096 bytes. +.Bd -literal + struct resource *res; + int error; + + error = bus_adjust_resource(dev, SYS_RES_MEMORY, res, + rman_get_start(res), rman_get_end(res) + 0x1000); +.Ed .Sh ERRORS .Fn bus_adjust_resource will fail if: .Bl -tag -width Er .It Bq Er EINVAL The .Fa dev device does not have a parent device. .It Bq Er EINVAL The .Fa r resource is a shared resource. .It Bq Er EINVAL The new address range does not overlap with the existing address range of .Fa r . .It Bq Er EBUSY The new address range conflicts with another allocated resource. .El -.Sh EXAMPLES -Grow an existing memory resource by 4096 bytes. -.Bd -literal - struct resource *res; - int error; - - error = bus_adjust_resource(dev, SYS_RES_MEMORY, res, - rman_get_start(res), rman_get_end(res) + 0x1000); -.Ed .Sh SEE ALSO .Xr bus_alloc_resource 9 , .Xr bus_release_resource 9 , .Xr device 9 , .Xr driver 9 Index: head/share/misc/mdoc.template =================================================================== --- head/share/misc/mdoc.template (revision 222599) +++ head/share/misc/mdoc.template (revision 222600) @@ -1,35 +1,36 @@ .\" $FreeBSD$ .\" .\" The following requests are required for all man pages. .Dd Month day, year .Dt DOCUMENT_TITLE [section number] [architecture/volume] .Os [OPERATING_SYSTEM] [version/release] .Sh NAME .Nm name .Nd one line description of name .\" This next request is for sections 2 and 3 only. .\" .Sh LIBRARY .Sh SYNOPSIS .Sh DESCRIPTION .\" The following requests should be uncommented and used where appropriate. .\" .Sh IMPLEMENTATION NOTES .\" This next request is for sections 2, 3 and 9 function return values only. .\" .Sh RETURN VALUES .\" This next request is for sections 1, 6, 7 and 8 only. .\" .Sh ENVIRONMENT .\" .Sh FILES .\" This next request is for sections 1, 6, 7 and 8 only .\" (command return values (to shell)). .\" .Sh EXIT STATUS .\" .Sh EXAMPLES .\" This next request is for sections 1, 6, 7, 8 and 9 only .\" (fprintf/stderr type diagnostics). .\" .Sh DIAGNOSTICS .\" .Sh COMPATIBILITY .\" This next request is for sections 2, 3 and 9 error and signal handling only. .\" .Sh ERRORS .\" .Sh SEE ALSO .\" .Sh STANDARDS .\" .Sh HISTORY .\" .Sh AUTHORS .\" .Sh BUGS +.\" .Sh SECURITY CONSIDERATIONS Index: head/sys/teken/libteken/teken.3 =================================================================== --- head/sys/teken/libteken/teken.3 (revision 222599) +++ head/sys/teken/libteken/teken.3 (revision 222600) @@ -1,220 +1,220 @@ .\" Copyright (c) 2011 Ed Schouten .\" 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 May 9, 2011 .Dt TEKEN 3 .Os .Sh NAME .Nm teken .Nd xterm-like terminal emulation interface .Sh LIBRARY .Lb libteken .Sh SYNOPSIS .In teken.h .Ft void .Fn teken_init "teken_t *t" "const teken_funcs_t *funcs" "void *thunk" .Ft void .Fn teken_input "teken_t *t" "const void *buf" "size_t nbytes" .Ft const teken_pos_t * .Fn teken_get_winsize "teken_t *t" .Ft void .Fn teken_set_winsize "teken_t *t" "const teken_pos_t *size" .Ft const teken_pos_t * .Fn teken_get_cursor "teken_t *t" .Ft void .Fn teken_set_cursor "teken_t *t" "const teken_pos_t *pos" .Ft const teken_attr_t * .Fn teken_get_curattr "teken_t *t" .Ft void .Fn teken_set_curattr "teken_t *t" "const teken_attr_t *attr" .Ft const teken_attr_t * .Fn teken_get_defattr "teken_t *t" .Ft void .Fn teken_set_defattr "teken_t *t" "const teken_attr_t *attr" .Ft const char * .Fn teken_get_sequence "teken_t *t" "unsigned int id" .Ft teken_color_t .Fn teken_256to8 "teken_color_t color" .Ft void .Fn teken_get_defattr_cons25 "teken_t *t" "int *fg" "int *bg" .Ft void .Fn teken_set_8bit "teken_t *t" .Ft void .Fn teken_set_cons25 "teken_t *t" .Sh DESCRIPTION The .Nm library implements the input parser of a 256-color xterm-like terminal. It converts a stream of UTF-8 encoded characters into a series of primitive drawing instructions that can be used by a console driver or terminal emulator to render a terminal application. .Pp The .Fn teken_init function is used to initialize terminal state object .Fa t , having type .Vt teken_t . The supplied .Vt teken_funcs_t structure .Fa funcs contains a set of callback functions, which are called when supplying data to .Fn teken_input . The .Fa thunk argument stores an arbitrary pointer, which is passed to each invocation of the callback functions. .Pp The .Vt teken_funcs_t structure stores the following callbacks: .Bd -literal -offset indent typedef struct { tf_bell_t *tf_bell; /* Audible/visible bell. */ tf_cursor_t *tf_cursor; /* Move cursor to x/y. */ tf_putchar_t *tf_putchar; /* Put Unicode character at x/y. */ tf_fill_t *tf_fill; /* Fill rectangle with character. */ tf_copy_t *tf_copy; /* Copy rectangle to new location. */ tf_param_t *tf_param; /* Miscellaneous options. */ tf_respond_t *tf_respond; /* Send response string to user. */ } teken_funcs_t; .Ed .Pp All callbacks must be provided, though unimplemented callbacks may some times be sufficient. The actual types of these callbacks can be found in .In teken.h . .Pp By default, .Fn teken_init initializes the .Vt teken_t structure to emulate a terminal having 24 rows and 80 columns. The .Fn teken_get_winsize and .Fn teken_set_winsize functions can be used to obtain and modify the dimensions of the terminal. .Pp Even though the cursor position is normally controlled by input of data through .Fn teken_input and returned by the .Fn tf_cursor callback, it can be obtained and modified manually using the .Fn teken_get_cursor and .Fn teken_set_cursor functions. The same holds for .Fn teken_get_curattr and .Fn teken_set_curattr , which can be used to change the currently selected font attributes and foreground and background color. .Pp By default, .Nm emulates a white-on-black terminal, which means the default foreground color is white, while the background color is black. These defaults can be modified using .Fn teken_get_defattr and .Fn teken_set_defattr . .Pp The .Fn teken_get_sequence function is a utility function that can be used to obtain escape sequences of special keyboard keys, generated by user input. The .Fa id parameter must be one of the .Dv TKEY_* parameters listed in .In teken.h . .Sh LEGACY FEATURES This library also provides a set of functions that shouldn't be used in any modern applications. .Pp The .Fn teken_256to8 function converts a color code to one of the 8 primary colors, allowing the terminal to be rendered on graphics hardware that only supports 8 or 16 colors (e.g. VGA). .Pp The .Fn teken_get_defattr_cons25 function obtains the default terminal attributes as a pair of foreground and background colors, using ANSI color numbering. .Pp The .Fn teken_set_8bit function disables UTF-8 processing and switches to 8-bit character mode, which can be used to support character sets like CP437 and ISO-8859-1. .Pp The .Fn teken_set_cons25 function switches terminal emulation to .Dv cons25 , which is used by versions of .Fx prior to 9.0. -.Sh SECURITY CONSIDERATIONS -The -.Fn tf_respond -callback is used to respond to device status requests commands generated -by an application. -In the past, there have been various security issues, where a malicious -application sends a device status request before termination, causing -the generated response to be interpreted by applications such as -.Xr sh 1 . -.Pp -.Nm -only implements a small subset of responses which are unlikely to cause -any harm. -Still, it is advised to leave -.Fn tf_respond -unimplemented. .Sh SEE ALSO .Xr ncurses 3 , .Xr termcap 3 , .Xr syscons 4 . .Sh HISTORY The .Nm library appeared in .Fx 8.0 , though it was only available and used inside the kernel. In .Fx 9.0 , the .Nm library appeared in userspace. .Sh AUTHORS .An Ed Schouten Aq ed@FreeBSD.org +.Sh SECURITY CONSIDERATIONS +The +.Fn tf_respond +callback is used to respond to device status requests commands generated +by an application. +In the past, there have been various security issues, where a malicious +application sends a device status request before termination, causing +the generated response to be interpreted by applications such as +.Xr sh 1 . +.Pp +.Nm +only implements a small subset of responses which are unlikely to cause +any harm. +Still, it is advised to leave +.Fn tf_respond +unimplemented. Index: head/usr.bin/fstat/fuser.1 =================================================================== --- head/usr.bin/fstat/fuser.1 (revision 222599) +++ head/usr.bin/fstat/fuser.1 (revision 222600) @@ -1,153 +1,153 @@ .\" Copyright (c) 2005-2011 Stanislav Sedov .\" 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 REGENTS 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 May 13, 2011 .Dt FUSER 1 .Os .Sh NAME .Nm fuser .Nd list IDs of all processes that have one or more files open .Sh SYNOPSIS .Nm .Op Fl cfkmu .Op Fl M Ar core .Op Fl N Ar system .Op Fl s Ar signal .Op Ar .Sh DESCRIPTION The .Nm utility writes to stdout the PIDs of processes that have one or more named files open. For block and character special devices, all processes using files on that device are listed. A file is considered open by a process if it was explicitly opened, is the working directory, root directory, jail root directory, active executable text, kernel trace file or the controlling terminal of the process. If .Fl m option is specified, the .Nm utility will also look through mmapped files. .Pp The following options are available: .Bl -tag -width indent .It Fl c Treat files as mount point and report on any files open in the file system. .It Fl f The report must be only for named files. .It Fl k Send signal to reported processes .Pq SIGKILL by default . .It Fl m Search through mmapped files too. .It Fl u Write the user name associated with each process to stderr. .It Fl M Extract values associated with the name list from the specified core instead of the default .Pa /dev/kmem . .It Fl N Extract the name list from the specified system instead of the default, which is the kernel image the system has booted from. .It Fl s Use given signal name instead of default SIGKILL. .El .Pp The following symbols, written to stderr will indicate how files is used: .Bl -tag -width MOUNT .It Cm r The file is the root directory of the process. .It Cm c The file is the current workdir directory of the process. .It Cm j The file is the jail-root of the process. .It Cm t The file is the kernel tracing file for the process. .It Cm x The file is executable text of the process. .It Cm y The process use this file as its controlling tty. .It Cm m The file is mmapped. .It Cm w The file is open for writing. .It Cm a The file is open as append only .Pq O_APPEND was specified . .It Cm d The process bypasses fs cache while writing to this file .Pq O_DIRECT was specified . .It Cm s Shared lock is hold. .It Cm e Exclusive lock is hold. .El .Sh EXIT STATUS The .Nm utility returns 0 on successful completion and >0 otherwise. .Sh EXAMPLES The command: .Dq Li "fuser -fu ." writes to standard output the process IDs of processes that are using the current directory and writes to stderr an indication of how those processes are using the directory and user names associated with the processes that are using this directory. .Sh SEE ALSO .Xr fstat 1 , .Xr ps 1 , .Xr systat 1 , .Xr iostat 8 , .Xr pstat 8 , .Xr vmstat 8 .Sh STANDARDS The .Nm utility is expected to conform to .St -p1003.1-2004 . +.Sh HISTORY +The +.Nm +utility appeared in +.Fx 9.0 . +.Sh AUTHORS +The +.Nm +utility and this manual page was written by +.An Stanislav Sedov Aq stas@FreeBSD.org . .Sh BUGS Since .Nm takes a snapshot of the system, it is only correct for a very short period of time. When working via .Xr kvm 3 interface the report will be limited to filesystems the .Nm utility knows about (currently only cd9660, devfs, nfs, ntfs, nwfs, udf, ufs and zfs). -.Sh HISTORY -The -.Nm -utility appeared in -.Fx 9.0 . -.Sh AUTHORS -The -.Nm -utility and this manual page was written by -.An Stanislav Sedov Aq stas@FreeBSD.org .