Index: head/share/man/man4/man4.i386/glxsb.4 =================================================================== --- head/share/man/man4/man4.i386/glxsb.4 (revision 276291) +++ head/share/man/man4/man4.i386/glxsb.4 (revision 276292) @@ -1,97 +1,97 @@ .\" $OpenBSD: glxsb.4,v 1.5 2007/05/31 19:19:54 jmc Exp $ .\" .\"Copyright (c) 2006 Tom Cosgrove .\" .\"Permission to use, copy, modify, and distribute this software for any .\"purpose with or without fee is hereby granted, provided that the above .\"copyright notice and this permission notice appear in all copies. .\" .\"THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES .\"WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF .\"MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR .\"ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES .\"WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN .\"ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\"OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" .\" $FreeBSD$ .\" .Dd June 8, 2008 .Dt GLXSB 4 i386 .Os .Sh NAME .Nm glxsb .Nd Geode LX Security Block crypto accelerator .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your kernel configuration file: .Bd -ragged -offset indent .Cd "device crypto" .Cd "device glxsb" .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 glxsb_load="YES" .Ed .Sh DESCRIPTION The .Nm driver supports the security block of the Geode LX series processors. The Geode LX is a member of the AMD Geode family of integrated x86 system chips. .Pp Driven by periodic checks for available data from the generator, .Nm supplies entropy to the .Xr random 4 driver for common usage. .Pp .Nm also supports acceleration of AES-128-CBC operations for .Xr crypto 4 . It also registers itself to accelerate other HMAC algorithms, although there is no hardware acceleration for those algorithms. This is only needed so .Nm can work with .Xr ipsec 4 . .Sh CAVEAT The .Xr crypto 9 framework will fail to open the crypto session on the device if the AES key's length is != 128 bits. This prevents the use of the .Nm device driver with AES keys of length != 128 bits. .Sh SEE ALSO .Xr crypto 4 , .Xr intro 4 , -.Xr pci 4 , .Xr ipsec 4 , +.Xr pci 4 , .Xr random 4 , .Xr crypto 9 .Sh HISTORY The .Nm device driver first appeared in .Ox 4.1 . The .Nm device driver was imported into .Fx 7.1 . .Sh AUTHORS .An -nosplit The .Nm device driver was written for .Ox by .An Tom Cosgrove . It was ported to .Fx by .An Patrick Lamaiziere Aq Mt patfbsd@davenulle.org . Index: head/share/man/man4/man4.powerpc/snd_ai2s.4 =================================================================== --- head/share/man/man4/man4.powerpc/snd_ai2s.4 (revision 276291) +++ head/share/man/man4/man4.powerpc/snd_ai2s.4 (revision 276292) @@ -1,88 +1,88 @@ .\"- .\" Copyright (c) 2009 Nathan Whitehorn .\" 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 ``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 January 20, 2009 .Dt SND_AI2S 4 .Os .Sh NAME .Nm snd_ai2s .Nd "Apple I2S audio device 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 sound" .Cd "device snd_ai2s" .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 snd_ai2s_load="YES" .Ed .Sh DESCRIPTION The .Nm driver provides support for the Apple I2S audio controllers found predominantly in G4 and G5 machines, along with the snapper and tumbler codecs. Some machines (e.g. the Mac Mini) do not have configurable codecs and so lack hardware volume control. .Sh HARDWARE Chips supported by the .Nm driver include: .Pp .Bl -bullet -compact .It Apple Tumbler Audio .It Apple Snapper Audio .El .Sh SEE ALSO -.Xr sound 4 , -.Xr snd_davbus 4 +.Xr snd_davbus 4 , +.Xr sound 4 .Sh HISTORY The .Nm device driver appeared in .Nx 2.0 and then in .Fx 8.0 . .Sh AUTHORS .An -nosplit The .Nm driver was written by .An Tsubai Masanari Aq Mt tsubai@netbsd.org , and ported to .Fx by .An Marco Trillo Aq Mt marcotrillo@gmail.com . .Sh BUGS Recording and operation with non-44.1 Khz audio are not currently supported. Index: head/share/man/man4/man4.powerpc/snd_davbus.4 =================================================================== --- head/share/man/man4/man4.powerpc/snd_davbus.4 (revision 276291) +++ head/share/man/man4/man4.powerpc/snd_davbus.4 (revision 276292) @@ -1,80 +1,80 @@ .\"- .\" Copyright (c) 2009 Nathan Whitehorn .\" 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 ``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 January 20, 2009 .Dt SND_DAVBUS 4 .Os .Sh NAME .Nm snd_davbus .Nd "Apple Davbus audio device 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 sound" .Cd "device snd_davbus" .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 snd_davbus_load="YES" .Ed .Sh DESCRIPTION The .Nm driver provides support for the Apple Davbus audio controllers found in many G3-era Apple machines. .Sh HARDWARE Chips supported by the .Nm driver include: .Pp .Bl -bullet -compact .It Apple Burgundy Audio .It Apple Screamer Audio .El .Sh SEE ALSO -.Xr sound 4 , -.Xr snd_ai2s 4 +.Xr snd_ai2s 4 , +.Xr sound 4 .Sh HISTORY The .Nm device driver appeared in .Fx 8.0 . .Sh AUTHORS .An -nosplit The .Nm driver was written by .An Marco Trillo Aq Mt marcotrillo@gmail.com . .Sh BUGS Recording is not currently supported. Index: head/sys/boot/forth/brand.4th.8 =================================================================== --- head/sys/boot/forth/brand.4th.8 (revision 276291) +++ head/sys/boot/forth/brand.4th.8 (revision 276292) @@ -1,125 +1,125 @@ .\" Copyright (c) 2011 Devin Teske .\" 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 18, 2011 .Dt BRAND.4TH 8 .Os .Sh NAME .Nm brand.4th .Nd FreeBSD ASCII art boot module .Sh DESCRIPTION The file that goes by the name of .Nm is a set of commands designed to draw the ASCII art BSD brand above the boot loader menu. The commands of .Nm by themselves are not enough for most uses. Please refer to the examples below for the most common situations, and to .Xr loader 8 for additional commands. .Pp Before using any of the commands provided in .Nm , it must be included through the command: .Pp .Dl include brand.4th .Pp This line is present in the default .Pa /boot/menu.rc file, so it is not needed (and should not be re-issued) in a normal setup. .Pp The commands provided by it are: .Pp .Bl -tag -width disable-module_module -compact -offset indent .It Ic draw-brand Draws the BSD brand. .Pp The brand that is drawn is configured by setting the .Ic loader_brand variable in .Xr loader.conf 5 to one of .Dq Li fbsd (the default) or .Dq Li none . .Pp The position of the logo can be configured by setting the .Ic loader_brand_x and .Ic loader_brand_y variables in .Xr loader.conf 5 . The default values are 2 (x) and 1 (y). .El .Pp The environment variables that effect its behavior are: .Bl -tag -width bootfile -offset indent .It Va loader_brand Selects the desired brand in the beastie boot menu. Possible values are: .Dq Li fbsd (default) or .Dq Li none . .It Va loader_brand_x Sets the desired column position of the brand. Default is 2. .It Va loader_brand_y Sets the desired row position of the brand. Default is 1. .El .Sh FILES .Bl -tag -width /boot/loader.4th -compact .It Pa /boot/loader The .Xr loader 8 . .It Pa /boot/brand.4th .Nm itself. .It Pa /boot/loader.rc .Xr loader 8 bootstrapping script. .El .Sh EXAMPLES Set FreeBSD brand in .Xr loader.conf 5 : .Pp .Bd -literal -offset indent -compact loader_brand="fbsd" .Ed .Sh SEE ALSO .Xr loader.conf 5 , -.Xr loader 8 , +.Xr loader 8 .Sh HISTORY The .Nm set of commands first appeared in .Fx 9.0 . .Sh AUTHORS The .Nm set of commands was written by .An -nosplit .An Devin Teske Aq dteske@FreeBSD.org . Index: head/sys/boot/forth/delay.4th.8 =================================================================== --- head/sys/boot/forth/delay.4th.8 (revision 276291) +++ head/sys/boot/forth/delay.4th.8 (revision 276292) @@ -1,126 +1,126 @@ .\" Copyright (c) 2011 Devin Teske .\" 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 18, 2011 .Dt DELAY.4TH 8 .Os .Sh NAME .Nm delay.4th .Nd FreeBSD debugging boot module .Sh DESCRIPTION The file that goes by the name of .Nm is a set of commands designed to add debugging capabilities to .Xr loader 8 . The commands of .Nm by themselves are not enough for most uses. Please refer to the examples below for the most common situations, and to .Xr loader 8 for additional commands. .Pp Before using any of the commands provided in .Nm , it must be included through the command: .Pp .Dl include delay.4th .Pp This line is present in .Pa /boot/beastie.4th file, so it is not needed (and should not be re-issued) in a normal setup. .Pp The commands provided by it are: .Pp .Bl -tag -width disable-module_module -compact -offset indent .It Ic delay_execute Executes the [string] procedure stored in the .Ic delay_command environment variable after .Ic loader_delay seconds. .Pp If the optional .Ic delay_showdots environment variable is set, a continuous series of dots is printed. .Pp During the duration, the user can either press Ctrl-C (or Esc) to abort or ENTER to proceed immediately. .El .Pp The environment variables that effect its behavior are: .Bl -tag -width bootfile -offset indent .It Va delay_command The command to be executed by .Ic delay_execute . .It Va loader_delay The duration (in seconds) to delay before executing .Ic delay_command . .It Va delay_showdots If set, will cause .Ic delay_execute to print a continuous series of dots during the delay duration. .El .Sh FILES .Bl -tag -width /boot/loader.4th -compact .It Pa /boot/loader The .Xr loader 8 . .It Pa /boot/delay.4th .Nm itself. .It Pa /boot/loader.rc .Xr loader 8 bootstrapping script. .El .Sh EXAMPLES Introducing a 5-second delay before including another file from .Pa /boot/loader.rc : .Pp .Bd -literal -offset indent -compact include /boot/delay.4th set delay_command="include /boot/other.4th" set delay_showdots set loader_delay=5 delay_execute .Ed .Sh SEE ALSO .Xr loader.conf 5 , -.Xr loader 8 , .Xr beastie.4th 8 , +.Xr loader 8 , .Xr loader.4th 8 .Sh HISTORY The .Nm set of commands first appeared in .Fx 9.0 . .Sh AUTHORS The .Nm set of commands was written by .An -nosplit .An Devin Teske Aq dteske@FreeBSD.org . Index: head/sys/boot/forth/menu.4th.8 =================================================================== --- head/sys/boot/forth/menu.4th.8 (revision 276291) +++ head/sys/boot/forth/menu.4th.8 (revision 276292) @@ -1,352 +1,352 @@ .\" Copyright (c) 2011-2013 Devin Teske .\" 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 August 6, 2013 .Dt MENU.4TH 8 .Os .Sh NAME .Nm menu.4th .Nd FreeBSD dynamic menu boot module .Sh DESCRIPTION The file that goes by the name of .Nm is a set of commands designed to display a dynamic menu system managed through a system of carefully named environment variables. The commands of .Nm by themselves are not enough for most uses. Please refer to the examples below for the most common situations, and to .Xr loader 8 for additional commands. .Pp Before using any of the commands provided in .Nm , it must be included through the command: .Pp .Dl include menu.4th .Pp This line is present in the default .Pa /boot/menu.rc file, so it is not needed (and should not be re-issued) in a normal setup. .Pp The commands provided by it are: .Pp .Bl -tag -width disable-module_module -compact -offset indent .It Ic menu-init Draws the menu bounding box and initializes some internal state variables. This should be called before any other menu-related functions. .It Ic menu-display Displays the menu (configured via the below documented environment variables) and blocks on keyboard input, awaiting user action. .It Ic menu-erase Clears the screen area within the menu bounding box. .It Ic menu-redraw Calls .Ic menu-erase and then redraws the menu. .It Ic menu-unset Unsets the environment variables associated with individual menu items, clearing the way for a new menu. .It Ic menu-clear Calls .Ic menu-unset and then .Ic menu-erase . .El .Pp The environment variables that effect its behavior are: .Bl -tag -width bootfile -offset indent .It Va loader_color If set to .Dq Li NO (case-insensitive) or .Dq Li 0 , causes the menu to be displayed without color. The default is to use ANSI coloring whenever possible. If serial boot is enabled, color is disabled by default. Color features include the use of ANSI bold for numbers appearing to the left of menuitems and the use of special .Dq Li ansi variables described below. .It Va autoboot_delay Number of seconds .Ic menu-display will wait before executing .Va menu_timeout_command .Ic ( boot by default) unless a key is pressed. If set to .Dq Li NO (case-insensitive) .Ic menu-display will wait for user input and never execute .Ic menu_timeout_command . If set to .Dq Li -1 , .Ic menu-display will boot immediately, preventing both interruption of the .Ic autoboot process and escaping to the loader prompt. Default is .Dq Li 10 . See .Xr loader 8 for additional information. .It Va menu_timeout_command The command to be executed after .Va autoboot_delay seconds if a key is not pressed. The default is .Ic boot . .It Va loader_menu_frame Sets the desired box style to draw around the boot menu. Possible values are: .Dq Li single .Pq the default , .Dq Li double , and .Dq Li none . .It Va loader_menu_timeout_x Sets the desired column position of the timeout countdown text. Default is 4. .It Va loader_menu_timeout_y Sets the desired row position of the timeout countdown text. Default is 23. .It Va loader_menu_title The text to display above the menu. Default is .Dq Li "Welcome to FreeBSD" . .It Va loader_menu_title_align Default is to align .Ic loader_menu_title centered above the menu. This can be set to .Dq Li left or .Dq Li right to instead display the title left-or-right justified .Pq respectively . .It Va loader_menu_x Sets the desired column position of the boot menu. Default is 5. .It Va loader_menu_y Sets the desired row position of the boot menu. Default is 10. .It Va menu_caption[x] The text to be displayed for the numbered menuitem .Dq Li x . .It Va menu_command[x] The command to be executed when the number associated with menuitem .Dq Li x is pressed. See the list of included FICL words below for some ideas. .It Va menu_keycode[x] An optional decimal ASCII keycode to be associated with menuitem .Dq Li x . When pressed, will cause the execution of .Va menu_command[x] . .It Va ansi_caption[x] If .Va loader_color is set .Pq enabled by default , use this caption for menuitem .Dq Li x instead of .Va menu_caption[x] . .It Va toggled_text[x] For menuitems where .Va menu_command[x] is set to .Dq Li toggle_menuitem (or a derivative thereof), the text displayed will toggle between this and .Va menu_caption[x] . .It Va toggled_ansi[x] Like .Va toggled_text[x] except used when .Va loader_color is enabled .Pq default . .It Va menu_caption[x][y] For menuitems where .Va menu_command[x] is set to .Dq Li cycle_menuitem (or a derivative thereof), the text displayed will cycle between this and other .Va menu_caption[x][y] entries. .It Va ansi_caption[x][y] Like .Va menu_caption[x][y] except used when .Va loader_color is enabled .Pq default . .It Va menu_acpi When set to a number .Dq Li x associated with a given menuitem, that menuitem will only appear when running on i386-compatible hardware, .Va hint.acpi.0.rsdp is set (indicating the presence of hardware ACPI support as detected by .Xr loader 8 ) , and .Va hint.acpi.0.disabled is not set. On non-i386 hardware, menuitems configured after the .Dq Li menu_acpi menuitem will use a lower number (to compensate for the missing ACPI menuitem) but continue to function as expected. On i386-compatible hardware lacking ACPI support (as detected by .Xr loader 8 ) , subsequent menuitems will retain their associated numbers. .It Va hint.acpi.0.rsdp Set automatically by .Xr loader 8 on i386-compatible hardware when ACPI support is detected at boot time. Effects the display of the .Dq Li menu_acpi menuitem (if configured). .It Va hint.acpi.0.disabled Effects the display of the .Va menu_acpi menuitem. If set, the menuitem will display .Va toggled_text[x] .Va ( toggled_ansi[x] if .Va loader_color is set), otherwise .Va menu_caption[x] .Va ( ansi_caption[x] if .Va loader_color is set). .It Va menu_options When set to a number .Dq Li x , a single blank-line and an .Dq Li Options header are inserted between .Va menu_caption[x-1] and .Va menu_caption[x] (if configured). .It Va menu_reboot If set, adds a built-in .Dq Li Reboot menuitem to the end of the last configured menuitem. If .Va menu_options is configured, the .Dq Li Reboot menuitem will be inserted before the .Dq Options separator. .El .Pp In addition, it provides the following FICL words: .Pp .Bl -tag -width disable-module_module -compact -offset indent .It Ic arch-i386? ( -- BOOL ) Returns true (-1) on i386 and false (0) otherwise. .It Ic acpipresent? ( -- BOOL ) Returns true (-1) if ACPI is present and false (0) otherwise. .It Ic acpienabled? ( -- BOOL ) Returns true (-1) if ACPI is enabled and false (0) otherwise. .It Ic toggle_menuitem ( N -- N ) Toggles menuitem .Dq Li N between .Va menu_caption[x] and .Va toggled_text[x] (where .Dq Li N represents the ASCII decimal value for .Dq Li x ) . .It Ic cycle_menuitem ( N -- N ) Cycles menuitem .Dq Li N between .Va menu_caption[x][y] entries (where .Va N represents the ASCII decimal value for .Va x ) . .El .Pp For all values of .Dq Li x above, use any number between 1 through 9. Sorry, double-digits are not currently supported. .Sh FILES .Bl -tag -width /boot/loader.4th -compact .It Pa /boot/loader The .Xr loader 8 . .It Pa /boot/menu.4th .Nm itself. .It Pa /boot/loader.rc .Xr loader 8 bootstrapping script. .El .Sh EXAMPLES A simple boot menu: .Pp .Bd -literal -offset indent -compact include /boot/menu.4th menu-init set menu_caption[1]="Boot" set menu_command[1]="boot" set menu_options=2 set menu_caption[2]="Option: NO" set toggled_text[2]="Option: YES" set menu_command[2]="toggle_menuitem" set menu_timeout_command="boot" set menu_reboot menu-display .Ed .Sh SEE ALSO .Xr loader.conf 5 , +.Xr beastie.4th 8 , .Xr loader 8 , -.Xr loader.4th 8 , -.Xr beastie.4th 8 +.Xr loader.4th 8 .Sh HISTORY The .Nm set of commands first appeared in .Fx 9.0 . .Sh AUTHORS The .Nm set of commands was written by .An -nosplit .An Devin Teske Aq dteske@FreeBSD.org . Index: head/sys/boot/forth/menusets.4th.8 =================================================================== --- head/sys/boot/forth/menusets.4th.8 (revision 276291) +++ head/sys/boot/forth/menusets.4th.8 (revision 276292) @@ -1,372 +1,372 @@ .\" Copyright (c) 2012 Devin Teske .\" 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 November 5, 2012 .Dt MENUSETS.4TH 8 .Os .Sh NAME .Nm menusets.4th .Nd FreeBSD dynamic submenu boot module .Sh DESCRIPTION The file that goes by the name of .Nm is a set of commands designed to add submenu functionality to the dynamic menu system provided by .Xr menu.4th 8 . Submenus are managed through a system of carefully named environment variables. The commands of .Nm by themselves are not enough for most uses. Please refer to the examples below for the most common situations, and to .Xr menu.4th 8 for additional commands. .Pp Before using any of the commands provided in .Nm , it must be included through the command: .Pp .Dl include menusets.4th .Pp This line is present in the default .Pa /boot/menu-commands.4th file, so it is not needed (and should not be re-issued) in a normal setup. .Pp The commands provided by it are: .Pp .Bl -tag -width menuset-loadinitial -compact -offset indent .It Ic menuset-loadsetnum Takes a single integer on the stack to identify the menuset environment variables to be activated (see environment variables below). .It Ic menuset-loadinitial If $menuset_initial is set, passes the value to menuset-loadsetnum. The value must be a number. .It Ic menusets-unset Unsets the environment variables associated with all menusets. Increments starting at 1 and stops at the first unconfigured menuset. A menuset is considered configured if the caption for item 1 is set. .El .Pp The environment variables that effect its behavior are: .Bl -tag -width bootfile -offset indent .It Va menuset_initial Number to pass to menuset-loadsetnum when menuset-loadinitial is called. .It Va menuset_nameN Used to give a name to a menuset. .El .Pp When a menuset is NOT given a name (the default), menuset N is comprised of the following environment variables: .Pp .Bl -tag -width menusetN_caption[x][y] -compact -offset indent .It Va ansisetN_caption[x] -> ansi_caption[x] .It Va ansisetN_caption[x][y] -> ansi_caption[x][y] .It Va menusetN_acpi -> menu_acpi .It Va menusetN_caption[x] -> menu_caption[x] .It Va menusetN_caption[x][y] -> menu_caption[x][y] .It Va menusetN_command[x] -> menu_command[x] .It Va menusetN_init -> .Dq Li evaluated .It Va menusetN_init[x] -> menu_init[x] .It Va menusetN_keycode[x] -> menu_keycode[x] .It Va menusetN_options -> menu_options .It Va menusetN_optionstext -> menu_optionstext .It Va menusetN_reboot -> menu_reboot .It Va toggledsetN_ansi[x] -> toggled_ansi[x] .It Va toggledsetN_text[x] -> toggled_text[x] .El .Pp When you choose to give a menuset a name (by setting $menuset_nameN), menuset N is instead comprised of the following environment variables: .Pp .Bl -tag -width NAMEmenu_caption[x][y] -compact -offset indent .It Va NAMEansi_caption[x] -> ansi_caption[x] .It Va NAMEansi_caption[x][y] -> ansi_caption[x][y] .It Va NAMEmenu_acpi -> menu_acpi .It Va NAMEmenu_caption[x] -> menu_caption[x] .It Va NAMEmenu_caption[x][y] -> menu_caption[x][y] .It Va NAMEmenu_command[x] -> menu_command[x] .It Va NAMEmenu_init -> .Dq Li evaluated .It Va NAMEmenu_init[x] -> menu_init[x] .It Va NAMEmenu_keycode[x] -> menu_keycode[x] .It Va NAMEmenu_options -> menu_options .It Va NAMEmenu_optionstext -> menu_optionstext .It Va NAMEmenu_reboot -> menu_reboot .It Va NAMEtoggled_ansi[x] -> toggled_ansi[x] .It Va NAMEtoggled_text[x] -> toggled_text[x] .El .Pp where .Dq Li NAME is the value of $menuset_nameN. In the case of $NAMEmenu_init ($menusetN_init when $menuset_nameN is unset), the value is evaluated as an FICL statement. This can be used to dynamically adjust the menuset variables right before the menu is activated. .Pp In addition, .Nm provides the following FICL words: .Pp .Bl -tag -width menuset -compact -offset indent .It Ic menuset-checksetnum ( N -- ) Given a single integer on the stack, sets a global variable .Va menuset_use_name to a boolean based on whether $menuset_nameN is set (true) or not (false). Also sets $affix temporary variable (prefix or infix depending on menuset_use_name). Automatically called by menuset-loadsetnum and menusets-unset. .It Ic menuset-loadvar ( -- ) Used indirectly to shorten syntax and mitigate dictionary size. Requires the following temporary environment variables: .Pp .Bl -tag -width affix -compact -offset indent .It Va type should be set to one of: menu toggled ansi .It Va var should be set to one of: caption command keycode text ... .It Va affix either a prefix (menuset_use_name is true) or infix (menuset_use_name is false) .El .Pp If the global .Va menuset_use_name is true, the variable ${type}_${var} is made to equal the value of the variable ${affix}${type}_${var} (note: in this case menuset-checksetnum has set $affix to $menuset_nameN). Otherwise (when .Va menuset_use_name is false), the variable ${type}_${var} is made to equal the value of the variable ${type}set${affix}_${var} (note: in this case menuset-checksetnum has set $affix to N). .Pp Both the global variable .Va menuset_use_name and the environment variable $affix are automatically handled by menuset-checksetnum above (which is automatically called by menuset-loadsetnum). .It Ic menuset-unloadvar ( -- ) Used indirectly to shorten syntax and mitigate dictionary size. Like menuset-loadvar except it unsets the menuset variable. If global .Va menuset_use_name is true ($affix is $menuset_nameN), variable ${affix}${type}_${var} is unset. Otherwise, $affix is N and variable ${type}set${affix}_${var} is unset. .It Ic menuset-loadmenuvar ( -- ) Sets $type to .Dq menu and calls menuset-loadvar. .It Ic menuset-unloadmenuvar ( -- ) Sets $type to .Dq menu and calls menuset-unloadvar. .It Ic menuset-loadxvar ( -- ) Like menuset-loadvar except it takes an additional temporary variable $x. If the global .Va menuset_use_name is true (making $affix equal $menuset_nameN), sets variable ${type}_${var}[${x}] to variable ${affix}${type}_${var}[${x}]. Otherwise ($affix being N), sets the same variable to instead ${type}set{affix}_${var}[${x}]. .It Ic menuset-unloadxvar ( -- ) Like menuset-loadxvar except it unsets the menuset variable. If global .Va menuset_use_name is true, unsets ${affix}${type}_${var}[${x}]. Otherwise, unsets ${type}set${affix}_${var}[${x}]. .It Ic menuset-loadansixvar ( -- ) Sets $type to .Dq ansi and calls menuset-loadxvar .It Ic menuset-unloadansixvar ( -- ) Sets $type to .Dq ansi and calls menuset-unloadxvar .It Ic menuset-loadmenuxvar ( -- ) Sets $type to .Dq ansi and calls menuset-loadxvar .It Ic menuset-unloadmenuxvar ( -- ) Sets $type to .Dq ansi and calls menuset-unloadxvar .It Ic menuset-loadtoggledxvar ( -- ) Sets $type to .Dq toggled and calls menuset-loadxvar .It Ic menuset-unloadtoggledxvar ( -- ) Sets $type to .Dq toggled and calls menuset-unloadxvar .It Ic menuset-loadxyvar ( -- ) Like menuset-loadxvar except it takes an additional temporary variable $y. If the global .Va menuset_use_name is true ($affix is $menuset_nameN), sets variable ${type}_${var}[${x}][${y}] to ${affix}${type}_${var}[${x}][${y}]. Otherwise ($affix is N) sets the same variable to instead ${type}set${affix}_${var}[${x}][${y}]. .It Ic menuset-unloadxyvar ( -- ) Like menuset-loadxyvar except it unsets the menuset variable. If the global .Va menuset_use_name is true, unsets ${affix}${type}_${var}[${x}][${y}]. Otherwise, unsets ${type}set${affix}_${var}[${x}][${y}]. .It Ic menuset-loadansixyvar ( -- ) Sets $type to .Dq ansi and calls menuset-loadxyvar. .It Ic menuset-unloadansixyvar ( -- ) Sets $type to .Dq ansi and calls menuset-unloadxyvar. .It Ic menuset-loadmenuxyvar ( -- ) Sets $type to .Dq menu and calls menuset-loadxyvar. .It Ic menuset-unloadmenuxyvar ( -- ) Sets $type to .Dq menu and calls menuset-unloadxyvar. .It Ic menuset-setnum-namevar ( N -- C-Addr/U ) Takes a single integer on the stack and replaces it with a string (in c-addr/u format) whose value is .Dq menuset_nameN . For example, if given 1 returns .Dq menuset_name1 . .It Ic menuset-cleanup ( N -- ) Unsets all the various temporary variables, currently .Va type , .Va var , .Va x , .Va y , and .Va affix . .El .Pp For all values of .Dq Li x above, use any number between 1 through 9. Sorry, double-digits are not currently supported. For all values of .Dq Li N above, use any number between 1 and 65535. .Sh FILES .Bl -tag -width /boot/menu-commands.4th -compact .It Pa /boot/loader The .Xr loader 8 . .It Pa /boot/menu.4th Dynamic menu module. .It Pa /boot/menu-commands.4th Contains the goto_menu command. .It Pa /boot/menusets.4th .Nm itself. .It Pa /boot/loader.rc .Xr loader 8 bootstrapping script. .El .Sh EXAMPLES A simple boot menu with a submenu: .Pp .Bd -literal -offset indent -compact include /boot/menu.4th include /boot/menu-commands.4th menu-init set menuset1_caption[1]="Boot" set menuset1_command[1]="boot" set menuset1_caption[2]="Submenu..." set menuset1_command[2]="2 goto_menu" set menuset2_caption[1]="Back" set menuset2_command[1]="1 goto_menu" set menuset_initial=2 menuset-loadinitial menu-display .Ed .Pp The same boot menu with named menusets: .Pp .Bd -literal -offset indent -compact include /boot/menu.4th include /boot/menu-commands.4th menu-init set menuset_name1=main set mainmenu_caption[1]="Boot" set mainmenu_command[1]="boot" set mainmenu_caption[2]="Submenu..." set mainmenu_command[2]="2 goto_menu" set menuset_name2=sub set submenu_caption[1]="Back" set submenu_command[1]="1 goto_menu" .Ed .Sh SEE ALSO .Xr loader.conf 5 , +.Xr beastie.4th 8 , .Xr loader 8 , .Xr loader.4th 8 , -.Xr menu.4th 8 , -.Xr beastie.4th 8 +.Xr menu.4th 8 .Sh HISTORY The .Nm set of commands first appeared in .Fx 10.0 . .Sh AUTHORS The .Nm set of commands was written by .An -nosplit .An Devin Teske Aq dteske@FreeBSD.org . Index: head/sys/boot/forth/version.4th.8 =================================================================== --- head/sys/boot/forth/version.4th.8 (revision 276291) +++ head/sys/boot/forth/version.4th.8 (revision 276292) @@ -1,128 +1,128 @@ .\" Copyright (c) 2011-2013 Devin Teske .\" 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 August 6, 2013 .Dt VERSION.4TH 8 .Os .Sh NAME .Nm version.4th .Nd FreeBSD version string boot module .Sh DESCRIPTION The file that goes by the name of .Nm is a set of commands designed to draw the boot loader version at the bottom-right of the screen. The commands of .Nm by themselves are not enough for most uses. Please refer to the examples below for the most common situations, and to .Xr loader 8 for additional commands. .Pp Before using any of the commands provided in .Nm , it must be included through the command: .Pp .Dl include version.4th .Pp This line is present in the default .Pa /boot/menu.rc file, so it is not needed (and should not be re-issued) in a normal setup. .Pp The commands provided by it are: .Pp .Bl -tag -width disable-module_module -compact -offset indent .It Ic print_version Prints the contents of the .Va loader_version environment variable right-justified at the column .Va loader_version_x and row .Va loader_version_y . .El .Pp The environment variables that effect its behavior are: .Bl -tag -width bootfile -offset indent .It Va loader_version Set automatically by .Xr loader 8 , but you can override it by setting in .Xr loader.conf 5 . This should be the version of boot loader used. .It Va loader_version_x Sets the desired ending column position of .Va loader_version . Default is 80. .It Va loader_version_y Sets the desired ending row position of .Va loader_version . Default is 24. .It Va loader_color If set to .Dq Li NO (case-insensitive) or .Dq Li 0 , causes the version to be printed without color .Pq default is ANSI Cyan . .El .Sh FILES .Bl -tag -width /boot/version.4th -compact .It Pa /boot/loader The .Xr loader 8 . .It Pa /boot/version.4th .Nm itself. .It Pa /boot/loader.rc .Xr loader 8 bootstrapping script. .El .Sh EXAMPLES Override .Xr loader 8 version in .Xr loader.conf 5 : .Pp .Bd -literal -offset indent -compact loader_version="loader 1.1" .Ed .Sh SEE ALSO .Xr loader.conf 5 , -.Xr loader 8 , -.Xr color.4th 8 +.Xr color.4th 8 , +.Xr loader 8 .Sh HISTORY The .Nm set of commands first appeared in .Fx 9.0 . .Sh AUTHORS The .Nm set of commands was written by .An -nosplit .An Devin Teske Aq dteske@FreeBSD.org . Index: head/sys/teken/libteken/teken.3 =================================================================== --- head/sys/teken/libteken/teken.3 (revision 276291) +++ head/sys/teken/libteken/teken.3 (revision 276292) @@ -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 SEE ALSO .Xr ncurses 3 , .Xr termcap 3 , -.Xr syscons 4 . +.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/tools/tools/ether_reflect/ether_reflect.1 =================================================================== --- head/tools/tools/ether_reflect/ether_reflect.1 (revision 276291) +++ head/tools/tools/ether_reflect/ether_reflect.1 (revision 276292) @@ -1,109 +1,109 @@ .\" Copyright (c) 2008 George V. Neville-Neil .\" 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 23, 2008 .Dt ETHER_REFLECT 1 .Os .Sh NAME .Nm ether_reflect .Nd "reflect ethernet packets" .Sh SYNOPSIS .Nm .Op Fl a Ar ethernet address .Op Fl e Ar ethertype .Op Fl i Ar interface .Op Fl t Ar timeout .Op Fl p .Op Fl d .Sh DESCRIPTION The .Nm command implements a simple ethernet packet reflector using the .Xr PCAP 3 library and .Xr bpf 4 , the Berkeley Packet Filter. The program is useful primarily to test the low level round trip time of packets through an Ethernet interface and/or a switch. Network protocols, such as IP, and the network stack in general are never invoked, only the device driver that implements the particular interface is executed. As the .Nm command uses the .Xr bpf 4 device the user must have root privileges to execute this program. .Pp The options are as follows: .Bl -tag -width ".Fl d Ar argument" .It Fl a Ar address Instead of reversing the ethernet destination and source addresses supply a different destination ethernet address for each packet received. .It Fl e Ar ether type Use a different ethertype than the default, 0x8822, which is the IEEE ether type for driver testing. .It Fl i Ar interface Network interface, which can be found with ifconfig(1). .It Fl t Ar timeout The time, in milliseconds, to wait for a packet. Lower times decrease latency at the cost of CPU. .It Fl p Set the device into promiscuous mode before testing. This is not usually necessary. .It Fl d Debug output. Print various small pieces of debug information. .El .Sh EXAMPLES The following is an example of a typical usage of the .Nm command: .Pp .Dl "ether_reflect -i em0 -t 1" .Pp Reflect all test packets, those with an ether type of 0x8822, which are seen on ineterface em0. The timeout is 1 millisecond. .Pp .Dl "ether_reflect -i em0 -a 00:00:00:aa:bb:cc -t 1" .Pp Rewrite the destination address in each packet to 00:00:00:aa:bb:cc before reflecting the packet. .Sh SEE ALSO -.Xr ifconfig 8 , .Xr tcpdump 1 , +.Xr bpf 2 , .Xr pcap 4 , -.Xr bpf 2 . +.Xr ifconfig 8 .Sh HISTORY The .Nm program first appeared in .Fx 8.0 . .Sh AUTHORS This manual page was written by .An George V. Neville-Neil Aq Mt gnn@FreeBSD.org . .Sh BUGS Should be reported to the author or to .Aq Mt net@FreeBSD.org . Index: head/tools/tools/vimage/vimage.8 =================================================================== --- head/tools/tools/vimage/vimage.8 (revision 276291) +++ head/tools/tools/vimage/vimage.8 (revision 276292) @@ -1,195 +1,195 @@ .\" Copyright (c) 2002, 2003 Marko Zec .\" Copyright (c) 2009 University of Zagreb .\" Copyright (c) 2009 FreeBSD Foundation .\" .\" 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 August 25, 2009 .Dt VIMAGE 8 .Os .Sh NAME .Nm vimage .Nd manage virtual network stacks .Sh SYNOPSIS .Nm .Op Fl c | m .Ar vname .Op Ar param=value ... .Nm .Fl d .Ar vname .Nm .Fl l .Op Fl rvj .Op Ar vname .Nm .Fl i .Ar vname ifname .Op Ar newifname .Nm .Ar vi_name .Op command ... .Sh DESCRIPTION The .Nm utility is an alternative user interface for controlling virtual network stacks in FreeBSD, aimed primarily at supporting legacy applications which are not yet converted to using .Xr jail 8 , .Xr jexec 8 , and .Xr jls 8 . . .Ss Overview A virtual image or vimage is a jail with its own independent network stack instance. Every process, socket and network interface present in the system is always attached to one, and only one, virtual network stack instance (vnet). During system bootup sequence a default vnet is created to which all the configured interfaces and user processes are initially attached. Assuming that enough system resources are are available, a user with sufficient privileges can create and manage a hierarchy of subordinated virtual images. The .Nm command allows for creation, deletion and monitoring of virtual images, as well as for execution of arbitrary processes in a targeted virtual image. .Ss Invocation If invoked with no modifiers, the .Nm command spawns a new interactive shell in virtual image .Ar vname . If optional additional arguments following .Ar vname are provided, the first of those will be executed in place of the interactive shell, and the rest of the arguments will be passed as arguments to the executed command. .Pp The following modifiers are available: .Bl -tag -width indent .It Fl c Create a new virtual image named .Ar vname . Additional arguments, if provided, may be used to specify operating parameters different from defaults, in format .Ar param=value . See .Xr jail 8 for an extensive list of available parameters. .It Fl m Modify the parameters of a virtual image named .Ar vname , using the same syntax as with the -c form of the command. .It Fl d Delete the virtual image .Ar vname . No processes and/or sockets should exist in the target virtual image in order for the delete request to succeed. Non-loopback interfaces residing in the target virtual image will be reassigned to the virtual image's parent. .It Fl l List the properties and statistics for virtual images one level below the current one in the hierarchy. If an optional argument .Ar vname is provided, only the information regarding the target virtual image .Ar vname is displayed. With the optional .Op Ar -r switch enabled the list will include all virtual images below the current level in the vimage hierarchy. Enabling the optional .Op Ar -v or .Op Ar -j switches results in a more detailed output. .It Fl i Move interface .Ar ifname to the target virtual image .Ar vname . Interfaces will be automatically renamed to .So ethXX .Sc , unless an optional argument specifying the desired interface name .Op Ar newifname is provided. .El .Sh EXAMPLES Create a new virtual image named .So v1 .Sc , which is allowed to create and manage an own subhierarchy of vimages: .Pp .Dl vimage -c v1 children.max=100 .Pp Execute the .So ifconfig .Sc command in the virtual image .So v1 .Sc : .Pp .Dl vimage v1 ifconfig .Pp Move the interface .So vlan0 .Sc to the virtual image .So v1 .Sc while renaming the interface as .So ve0 .Sc : .Pp .Dl vimage -i v1 vlan0 ve0 .Pp Show the status information for virtual image .So v1 .Sc : .Pp .Dl vimage -lv v1 .Sh DIAGNOSTICS The .Nm command exits 0 on success, and >0 if an error occurs. .Sh SEE ALSO -.Xr jail 8 -.Xr jexec 8 +.Xr jail 8 , +.Xr jexec 8 , .Xr jls 8 .Sh HISTORY Network stack virtualization framework first appeared as a patchset against the FreeBSD 4.7 kernel in 2002, and was maintained outside of the main FreeBSD tree. As a result of a project sponsored by the FreeBSD Foundation and Stiching NLNet, integrated virtualized network stack first appeared in FreeBSD 8.0. .Sh AUTHORS .An Marko Zec Aq Mt zec@fer.hr .Sh BUGS Deletion of vimages / vnets is known to leak kernel memory and fail at stopping various timers, hence may lead to system crashes.