Index: head/libexec/bootpd/bootpd.8 =================================================================== --- head/libexec/bootpd/bootpd.8 (revision 267667) +++ head/libexec/bootpd/bootpd.8 (revision 267668) @@ -1,310 +1,310 @@ .\" Copyright (c) 1988, 1989, 1991 Carnegie Mellon University .\" .\" $FreeBSD$ .\" .Dd February 10, 2004 .Dt BOOTPD 8 .Os .Sh NAME .Nm bootpd , bootpgw .Nd Internet Boot Protocol server/gateway .Sh SYNOPSIS .Nm .Op Fl i | s .Op Fl c Ar chdir-path .Op Fl d Ar level .Op Fl h Ar hostname .Op Fl t Ar timeout .Oo .Ar bootptab .Op Ar dumpfile .Oc .Nm bootpgw .Op Fl i | s .Op Fl d Ar level .Op Fl h Ar hostname .Op Fl t Ar timeout .Ar server .Sh DESCRIPTION The .Nm utility implements an Internet Bootstrap Protocol (BOOTP) server as defined in RFC951, RFC1532, and RFC1533. The .Nm bootpgw utility implements a simple BOOTP gateway which can be used to forward requests and responses between clients on one subnet and a BOOTP server (i.e.\& .Nm ) on another subnet. While either .Nm or .Nm bootpgw will forward BOOTREPLY packets, only .Nm bootpgw will forward BOOTREQUEST packets. .Pp One host on each network segment is normally configured to run either .Nm or .Nm bootpgw from .Xr inetd 8 by including one of the following lines in the file .Pa /etc/inetd.conf : .Pp .Dl bootps dgram udp wait root /usr/libexec/bootpd bootpd /etc/bootptab .Dl bootps dgram udp wait root /usr/libexec/bootpgw bootpgw server .Pp This mode of operation is referred to as "inetd mode" and causes .Nm (or .Nm bootpgw ) to be started only when a boot request arrives. If it does not receive another packet within fifteen minutes of the last one it received, it will exit to conserve system resources. The .Fl t option controls this timeout (see OPTIONS). .Pp It is also possible to run .Nm (or .Nm bootpgw ) in "standalone mode" (without .Xr inetd 8 ) by simply invoking it from a shell like any other regular command. Standalone mode is particularly useful when .Nm is used with a large configuration database, where the start up delay might otherwise prevent timely response to client requests. (Automatic start up in standalone mode can be done by invoking .Nm from within .Pa /etc/rc.local , for example.) Standalone mode is less useful for .Nm bootpgw which has very little start up delay because it does not read a configuration file. .Pp Either program automatically detects whether it was invoked from inetd or from a shell and automatically selects the appropriate mode. The .Fl s or .Fl i option may be used to force standalone or inetd mode respectively (see OPTIONS). .Sh OPTIONS The following options are available: .Bl -tag -width indent .It Fl t Ar timeout Specify the .Ar timeout value (in minutes) that a .Nm or .Nm bootpgw process will wait for a BOOTP packet before exiting. If no packets are received for .Ar timeout minutes, then the program will exit. A timeout value of zero means "run forever". In standalone mode, this option is forced to zero. .It Fl d Ar debug-level Set the .Ar debug-level variable that controls the amount of debugging messages generated. For example, .Fl d Ns 4 or .Fl d 4 will set the debugging level to 4. For compatibility with older versions of .Nm , omitting the numeric parameter (i.e., just .Fl d ) will simply increment the debug level by one. .It Fl c Ar chdir-path Set the current directory used by .Nm while checking the existence and size of client boot files. This is useful when client boot files are specified as relative pathnames, and .Nm needs to use the same current directory as the TFTP server (typically .Pa /tftpboot ) . This option is not recognized by .Nm bootpgw . .It Fl h Ar hostname Specify the hostname corresponding to the IP address to listen on. By default, .Nm listens on the IP address corresponding to the machine's hostname, as returned by .Xr gethostname 3 . .It Fl i Force inetd mode. This option is obsolete, but remains for compatibility with older versions of .Nm . .It Fl s Force standalone mode. This option is obsolete, but remains for compatibility with older versions of .Nm . .It Ar bootptab Specify the name of the configuration file from which .Nm loads its database of known clients and client options .No ( Nm only). .It Ar dumpfile Specify the name of the file that .Nm will dump its internal database into when it receives a SIGUSR1 signal .No ( Nm only). This option is only recognized if .Nm was compiled with the -DDEBUG flag. .It Ar server Specify the name of a BOOTP server to which .Nm bootpgw will forward all BOOTREQUEST packets it receives .Pf ( Nm bootpgw only). .El .Sh OPERATION Both .Nm and .Nm bootpgw operate similarly in that both listen for any packets sent to the .Em bootps port, and both simply forward any BOOTREPLY packets. They differ in their handling of BOOTREQUEST packets. .Pp When .Nm bootpgw is started, it determines the address of a BOOTP server whose name is provided as a command line parameter. When .Nm bootpgw receives a BOOTREQUEST packet, it sets the "gateway address" and "hop count" fields in the packet and forwards the packet to the BOOTP server at the address determined earlier. Requests are forwarded only if they indicate that the client has been waiting for at least three seconds. .Pp When .Nm is started it reads a configuration file, (normally .Pa /etc/bootptab ) that initializes the internal database of known clients and client options. This internal database is reloaded from the configuration file when .Nm receives a hangup signal (SIGHUP) or when it discovers that the configuration file has changed. .Pp When .Nm receives a BOOTREQUEST packet, it .\" checks the modification time of the .\" configuration file and reloads the database if necessary. Then it looks for a database entry matching the client request. If the client is known, .Nm composes a BOOTREPLY packet using the database entry found above, and sends the reply to the client (possibly using a gateway). If the client is unknown, the request is discarded (with a notice if debug > 0). .Pp If .Nm is compiled with the -DDEBUG option, receipt of a SIGUSR1 signal causes it to dump its internal database to the file .Pa /tmp/bootpd.dump or the dumpfile specified as a command line parameter. .Pp During initialization, both programs determine the UDP port numbers to be used by calling .Xr getservbyname 3 (which normally uses .Pa /etc/services ) . Two service names (and port numbers) are used: .Pp .Dl bootps BOOTP Server listening port .Dl bootpc BOOTP Client destination port .Pp If the port numbers cannot be determined using .Xr getservbyname 3 then the values default to bootps=67 and bootpc=68. .Sh FILES .Bl -tag -width /tmp/bootpd.dump -compact .It Pa /etc/bootptab Database file read by .Nm . .It Pa /tmp/bootpd.dump Debugging dump file created by .Nm . .It Pa /etc/services Internet service numbers. .It Pa /tftpboot Current directory typically used by the TFTP server and .Nm . .El .Sh "SEE ALSO" .Xr bootptab 5 , .Xr inetd 8 , .Xr tftpd 8 .Pp DARPA Internet Request For Comments: .Bl -tag -width RFC1533 -compact .It RFC951 Bootstrap Protocol .It RFC1532 Clarifications and Extensions for the Bootstrap Protocol .It RFC1533 DHCP Options and BOOTP Vendor Extensions .El .Sh AUTHORS This distribution is currently maintained by -.An Walter L. Wimer Aq walt+@cmu.edu . +.An Walter L. Wimer Aq Mt walt+@cmu.edu . .Pp The original BOOTP server was created by .An Bill Croft at Stanford University in January 1986. .Pp The current version of .Nm is primarily the work of .An David Kovar , .An Drew D. Perkins , and .An Walter L. Wimer , at Carnegie Mellon University. .Pp Enhancements and bug-fixes have been contributed by: .Pp (in alphabetical order) .Pp .An -split -.An Danny Backx Aq db@sunbim.be -.An John Brezak Aq brezak@ch.hp.com -.An Frank da Cruz Aq fdc@cc.columbia.edu -.An David R. Linn Aq drl@vuse.vanderbilt.edu -.An Jim McKim Aq mckim@lerc.nasa.gov -.An Gordon W. Ross Aq gwr@mc.com -.An Jason Zions Aq jazz@hal.com . +.An Danny Backx Aq Mt db@sunbim.be +.An John Brezak Aq Mt brezak@ch.hp.com +.An Frank da Cruz Aq Mt fdc@cc.columbia.edu +.An David R. Linn Aq Mt drl@vuse.vanderbilt.edu +.An Jim McKim Aq Mt mckim@lerc.nasa.gov +.An Gordon W. Ross Aq Mt gwr@mc.com +.An Jason Zions Aq Mt jazz@hal.com . .Sh BUGS Individual host entries must not exceed 1024 characters. Index: head/libexec/bootpd/tools/bootptest/bootptest.8 =================================================================== --- head/libexec/bootpd/tools/bootptest/bootptest.8 (revision 267667) +++ head/libexec/bootpd/tools/bootptest/bootptest.8 (revision 267668) @@ -1,77 +1,77 @@ .\" $FreeBSD$ .\" .\" bootptest.8 .Dd June 10, 1993 .Dt BOOTPTEST 8 .Os .Sh NAME .Nm bootptest .Nd "send BOOTP queries and print responses" .Sh SYNOPSIS .Nm .Op Fl f Ar bootfile .Op Fl h .Op Fl m Ar magic_number .Ar server\-name .Op Ar template\-file .Sh DESCRIPTION The .Nm utility sends BOOTP requests to the host specified as .Ar server\-name at one\-second intervals until either a response is received, or until ten requests have gone unanswered. After a response is received, .Nm will wait one more second listening for additional responses. .Sh OPTIONS .Bl -tag -width indent .It Fl f Ar bootfile Fill in the boot file field of the request with .Ar bootfile . .It Fl h Use the hardware (Ethernet) address to identify the client. By default, the IP address is copied into the request indicating that this client already knows its IP address. .It Fl m Ar magic_number Initialize the first word of the vendor options field with .Ar magic_number . .El .Pp A .Ar template\-file may be specified, in which case .Nm uses the (binary) contents of this file to initialize the .Em options area of the request packet. .Sh SEE ALSO .Xr bootpd 8 .Rs .%O RFC951 .%T "BOOTSTRAP PROTOCOL (BOOTP)" .Re .Rs .%O RFC1048 .%T "BOOTP Vendor Information Extensions" .Re .Sh AUTHORS The .Nm utility is a combination of original and derived works. The main program module .Pq Pa bootptest.c is original work by -.An "Gordon W. Ross" Aq gwr@mc.com . +.An Gordon W. Ross Aq Mt gwr@mc.com . The packet printing module .Pq Pa print\-bootp.c is a slightly modified version of a file from the .Bx .Xr tcpdump 1 program. .Pp This program includes software developed by the University of California, Lawrence Berkeley Laboratory and its contributors. (See the copyright notice in .Pa print\-bootp.c . ) Index: head/libexec/mknetid/mknetid.8 =================================================================== --- head/libexec/mknetid/mknetid.8 (revision 267667) +++ head/libexec/mknetid/mknetid.8 (revision 267668) @@ -1,152 +1,152 @@ .\" Copyright (c) 1995, 1996 .\" Bill Paul . 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. All advertising materials mentioning features or use of this software .\" must display the following acknowledgement: .\" This product includes software developed by Bill Paul. .\" 4. Neither the name of the University 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 Bill Paul 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 Bill Paul 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 June 23, 1996 .Dt MKNETID 8 .Os .Sh NAME .Nm mknetid .Nd "generate netid map data" .Sh SYNOPSIS .Nm .Op Fl q .Op Fl g Ar group_file .Op Fl p Ar passwd_file .Op Fl h Ar hosts_file .Op Fl n Ar netid_file .Op Fl d Ar domain .Sh DESCRIPTION The .Nm utility processes the contents of the .Xr group 5 , .Xr passwd 5 , .Xr hosts 5 and .Xr netid 5 files into the format used to generate the .Pa netid.byname .Tn NIS map. This map is used to hold credential information for both users and hosts in an operating system independent format. .Pp The .Nm utility checks for duplicate occurrences of netids and filters them out. .Pp The .Nm utility prints its results on the standard output. It is usually called only by .Pa /var/yp/Makefile when rebuilding the .Tn NIS maps. .Sh OPTIONS The .Nm utility supports the following options: .Bl -tag -width indent .It Fl q Normally, .Nm prints a warning message when it encounters a duplicate netid. This flag turns on 'quiet' mode, allowing the warnings to be suppressed. Other error messages may still be generated. .It Fl g Ar group_file Specify the location of the group information file. The compiled-in default is .Pa /etc/group . .It Fl p Ar passwd_file Specify the location of the passwd information file. The compiled-in default is .Pa /etc/passwd . .It Fl h Ar hosts_file Specify the location of the hosts database file. The compiled-in default is .Pa /etc/hosts . .It Fl n Ar netid_file Specify the location of the netid information file. The compiled-in default is .Pa /etc/netid . Note that no error is generated if the netid database cannot be found. The netid database is not likely to be present on most systems until .Tn Secure RPC support is added to .Fx . .It Fl d Ar domain By default, the .Nm utility uses the system domainname when generating netid records. If the system domainname is not set, the domain must be specified on the command line with the .Fl d flag. If the domainname is set, the .Fl d flag may be used to override it. .El .Sh FILES .Bl -tag -width /var/yp/Makefile -compact .It Pa /var/yp/Makefile the Makefile that calls .Nm yp_mkdb and .Nm to build the .Tn NIS databases .It Pa /etc/group the default group database file .It Pa /etc/passwd the default passwd database file .It Pa /etc/hosts the default hosts database file .It Pa /etc/netid the default netid database file .El .Sh SEE ALSO .Xr yp 8 , .Xr yp_mkdb 8 .Sh AUTHORS -.An Bill Paul Aq wpaul@ctr.columbia.edu +.An Bill Paul Aq Mt wpaul@ctr.columbia.edu Index: head/libexec/mknetid/netid.5 =================================================================== --- head/libexec/mknetid/netid.5 (revision 267667) +++ head/libexec/mknetid/netid.5 (revision 267668) @@ -1,91 +1,91 @@ .\" Copyright (c) 1996 Mats O Jansson .\" 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. All advertising materials mentioning features or use of this software .\" must display the following acknowledgement: .\" This product includes software developed by Mats O Jansson .\" 4. The name of the author may not be used to endorse or promote products .\" derived from this software without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS .\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED .\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY .\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" .\" $FreeBSD$ .\" .Dd January 13, 1996 .Dt NETID 5 .Os .Sh NAME .Nm netid .Nd .Tn YP network credential file .Sh DESCRIPTION Files in .Nm format are rare. One lives in the .Tn YP map .Pa netid.byname . The format is rather simple. Each row consists of two items: a key and a value. When created by .Xr mknetid 8 there are three types of records. .Pp The first type is information about which GIDs a UID has: .Pp .Sm off .Li unix . Ao Ar uid Ac @ Aq Ar yp-domain .Sm on .Sm off .Ao Ar uid Ac : Ao Ar gid Ac , Aq Ar gid .Sm on .Pp The second type contains information about hosts: .Pp .Sm off .Li unix . Ao Ar hostname Ac @ Aq Ar yp-domain .Sm on .Sm off .Li 0 : Aq Ar hostname .Sm on .Pp The third type refers to records from a .Nm file other than the two types above. .Sh FILES .Bl -tag -width ".Pa /etc/netid" -compact .It Pa /etc/netid for lines not generated automatically by .Xr mknetid 8 .El .Sh EXAMPLES A configuration file might look like the following: .Bd -literal unix.10714@kaka 10714:400,10 unix.jodie@kaka 0:jodie .Ed .Sh SEE ALSO .Xr mknetid 8 , .Xr yp 8 .Sh AUTHORS -.An Mats O Jansson Aq moj@stacken.kth.se +.An Mats O Jansson Aq Mt moj@stacken.kth.se Index: head/libexec/pppoed/pppoed.8 =================================================================== --- head/libexec/pppoed/pppoed.8 (revision 267667) +++ head/libexec/pppoed/pppoed.8 (revision 267668) @@ -1,219 +1,219 @@ .\"- .\" Copyright (c) 1999-2001 Brian Somers .\" 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 8, 1999 .Dt PPPOED 8 .Os .Sh NAME .Nm pppoed .Nd handle incoming PPP over Ethernet connections .Sh SYNOPSIS .Nm .Op Fl Fd\& .Op Fl P Ar pidfile .Op Fl a Ar name .Op Fl e Ar exec | Fl l Ar label .Op Fl n Ar ngdebug .Op Fl p Ar provider .Ar interface .Sh DESCRIPTION The .Nm utility listens to the given .Ar interface for PPP over Ethernet (PPPoE) service request packets, and actions them by negotiating a session then invoking a .Xr ppp 8 program. The negotiation is implemented by the .Dq pppoe netgraph node. See .Xr ng_pppoe 4 for details. .Pp The .Nm utility will only offer services to clients requesting services from the given .Ar provider , which is taken as an empty name if not provided. If a provider name of .Dq * is given, any PPPoE requests will be offered service. .Pp The supplied .Ar name will be given as the access concentrator name when establishing the connection. If no .Ar name is given, the current base hostname is used. .Pp After receiving a request (PADI) from the PPPoE netgraph node, .Nm .Xr fork 2 Ns s a child process and returns to service further requests. The child process offers service (using .Ar name ) and waits for a .Dv SUCCESS indication from the PPPoE node. On receipt of the .Dv SUCCESS indication, .Nm will execute .Pp .D1 Ic exec Pa /usr/sbin/ppp Fl direct Ar label .Pp as a shell sub-process. If .Ar label has not been specified, it defaults to .Ar provider . It is possible to specify another command using the .Ar exec argument. This is mandatory if .Ar provider and .Ar label are not given. The child process will have standard input and standard output attached to the same .Xr netgraph 4 data socket (see .Xr ng_socket 4 ) when started. .Pp The environment variables .Ev HISMACADDR and .Ev ACNAME are made available to the child process and are set to the MAC address of the peer and the name of the AC respectively. .Pp Upon invocation, .Nm will attach a .Dq pppoe netgraph node to the relevant .Dq ether node using .Dq Ar interface Ns \&: as the node name, and then connect that .Dq pppoe node to a local .Dq socket node. If the .Fl F option has not been given, .Nm will then go into the background and disassociate itself from the controlling terminal. When the .Fl F option is given, .Nm stays in the foreground. .Pp If the .Fl d option is given, additional diagnostics are provided (see the .Sx DIAGNOSTICS section below). If the .Fl n option is given, .Fn NgSetDebug is called with an argument of .Ar ngdebug . .Pp If .Ar pidfile is given, .Nm will write its process ID to this file on startup. .Sh DIAGNOSTICS After creating the necessary .Xr netgraph 4 nodes as described above, .Nm uses .Xr syslogd 8 to report all incoming connections. If the .Fl d option is given, .Nm will report on the child processes creation of a new netgraph socket, its service offer and the invocation of the .Xr ppp 8 program. If the .Fl n option is given, netgraph diagnostic messages are also redirected to .Xr syslogd 8 . .Pp It is sometimes useful to add the following to .Pa /etc/syslog.conf : .Bd -literal -offset indent !pppoed *.* /var/log/pppoed.log .Ed .Pp and the following to .Pa /etc/newsyslog.conf : .Pp .Dl "/var/log/pppoed.log 640 3 100 * Z" .Sh SEE ALSO .Xr NgSetDebug 3 , .Xr netgraph 4 , .Xr ng_ether 4 , .Xr ng_pppoe 4 , .Xr ng_socket 4 , .Xr syslog.conf 5 , .Xr ppp 8 , .Xr syslogd 8 .Sh HISTORY The .Nm utility was written by -.An Brian Somers Aq brian@Awfulhak.org +.An Brian Somers Aq Mt brian@Awfulhak.org and first appeared in .Fx 3.4 . .Sh BUGS If another netgraph node is using the given interface, .Nm will fail to start. This is because .Xr netgraph 4 does not currently allow node chaining. This may change in the future. Index: head/libexec/revnetgroup/revnetgroup.8 =================================================================== --- head/libexec/revnetgroup/revnetgroup.8 (revision 267667) +++ head/libexec/revnetgroup/revnetgroup.8 (revision 267668) @@ -1,159 +1,159 @@ .\" Copyright (c) 1995 .\" Bill Paul . 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. All advertising materials mentioning features or use of this software .\" must display the following acknowledgement: .\" This product includes software developed by Bill Paul. .\" 4. Neither the name of the University 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 Bill Paul 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 Bill Paul 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 October 24, 1995 .Dt REVNETGROUP 8 .Os .Sh NAME .Nm revnetgroup .Nd "generate reverse netgroup data" .Sh SYNOPSIS .Nm .Fl u | h .Op Fl f Ar netgroup_file .Sh DESCRIPTION The .Nm utility processes the contents of a file in .Xr netgroup 5 format into what is called .Pa reverse netgroup form. That is, where the original file shows netgroup memberships in terms of which members reside in a particular group, the reverse netgroup format specifies what groups are associated with a particular member. This information is used to generate the .Pa netgroup.byuser and .Pa netgroup.byhost .Tn NIS maps. These reverse netgroup maps are used to help speed up netgroup lookups, particularly for the .Fn innetgr library function. .Pp For example, the standard .Pa /etc/netgroup file may list a netgroup and a list of its members. Here, the netgroup is considered the .Em key and the member names are the .Em data . By contrast, the reverse .Pa netgroup.byuser database lists each unique member as the key and the netgroups to which the members belong become the data. Separate databases are created to hold information pertaining to users and hosts; this allows netgroup username lookups and netgroup hostname lookups to be performed using independent keyspaces. .Pp By constructing these reverse netgroup databases (and the corresponding .Tn NIS maps) in advance, the .Xr getnetgrent 3 library functions are spared from having to work out the dependencies themselves on the fly. This is important on networks with large numbers of users and hosts, since it can take a considerable amount of time to process very large netgroup databases. .Pp The .Nm utility prints its results on the standard output. It is usually called only by .Pa /var/yp/Makefile when rebuilding the .Tn NIS netgroup maps. .Sh OPTIONS The .Nm utility supports the following options: .Bl -tag -width indent .It Fl u Generate .Pa netgroup.byuser output; only username information in the original netgroup file is processed. .It Fl h Generate .Pa netgroup.byhost output; only hostname information in the original netgroup file is processed. (Note at least one of the .Fl u or .Fl h flags must be specified.) .It Op Fl f Ar netgroup_file The .Nm utility uses .Pa /etc/netgroup as its default input file. The .Fl f flag allows the user to specify an alternate input file. Specifying ``-'' as the input file causes .Nm to read from the standard input. .El .Sh FILES .Bl -tag -width /var/yp/Makefile -compact .It Pa /var/yp/Makefile the Makefile that calls .Nm yp_mkdb and .Nm to build the .Tn NIS databases .It Pa /etc/netgroup the default netgroup database file. This file is most often found only on the .Tn NIS master server .El .Sh SEE ALSO .Xr getnetgrent 3 , .Xr netgroup 5 , .Xr yp 8 , .Xr yp_mkdb 8 .Sh AUTHORS -.An Bill Paul Aq wpaul@ctr.columbia.edu +.An Bill Paul Aq Mt wpaul@ctr.columbia.edu Index: head/libexec/ypxfr/ypxfr.8 =================================================================== --- head/libexec/ypxfr/ypxfr.8 (revision 267667) +++ head/libexec/ypxfr/ypxfr.8 (revision 267668) @@ -1,308 +1,308 @@ .\" Copyright (c) 1995 .\" Bill Paul . 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. All advertising materials mentioning features or use of this software .\" must display the following acknowledgement: .\" This product includes software developed by Bill Paul. .\" 4. Neither the name of the University 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 Bill Paul 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 Bill Paul 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 5, 1995 .Dt YPXFR 8 .Os .Sh NAME .Nm ypxfr .Nd "transfer NIS database from remote server to local host" .Sh SYNOPSIS .Nm /usr/libexec/ypxfr .Op Fl f .Op Fl c .Op Fl d Ar target domain .Op Fl h Ar source host .Op Fl s Ar source domain .Op Fl p Ar path .Op Fl C Ar taskid program-number ipaddr port .Ar mapname .Sh DESCRIPTION The .Nm utility copies an .Tn NIS database (or .Pa map ) from one .Tn NIS server to another using .Tn NIS services. In .Fx , .Nm is generally invoked by .Xr ypserv 8 when it receives a map transfer request from .Xr yppush 8 . The .Nm utility is used primarily in environments where several .Tn NIS servers are in use in a single domain. One server, the .Tn NIS master, maintains the canonical copies of all .Tn NIS maps, and all the other servers, the .Tn NIS slaves, copy new versions of the maps from the master whenever any updates are made (i.e., when a user updates their password via .Xr yppasswd 1 ) . .Pp When run, .Nm creates a temporary database file in .Pa /var/yp/[domainname] , and fills it with the contents of .Ar mapname as supplied by the specified .Ar source host . When the entire map has been transferred, .Nm deletes the original copy of .Ar mapname and moves the temporary copy into its place. When the transfer is complete, .Nm will attempt to send a 'clear current map' request to the local .Xr ypserv 8 process to clear any possible references it may still have to the stale map. .Pp Note that all files created by .Nm are owner readable and writable only for security reasons. Since the .Tn NIS maps and the directory in which they reside are normally owned by root, this prevents non-privileged users from making unauthorized modifications. .Pp In order to maintain consistency across all .Tn NIS servers, .Nm can be run periodically in a .Xr cron 8 job. Maps which change infrequently need only be updated once a day (preferably late at night when system usage is lowest), whereas those that are subject to frequent changes (such a .Pa passwd.byname and .Pa passwd.byuid ) should be updated perhaps once every hour. Using .Xr cron 8 to automatically update the .Tn NIS maps is not strictly mandatory since all updates should be propagated by .Xr yppush 8 when .Pa /var/yp/Makefile is run on the .Tn NIS master server, however it is good practice on large networks where possible outages could cause .Tn NIS servers to fall out of sync with each other. .Pp When .Nm is invoked without a controlling terminal, e.g.\& from inside .Xr ypserv 8 , it logs all its output using the .Xr syslog 3 facility. .Sh NOTES The .Fx version of .Nm has support for a special map transfer protocol which works in conjunction with the .Fx .Xr rpc.ypxfrd 8 server. This protocol allows it to transfer raw map database files from the .Tn NIS master server and can be many times faster than the standard transfer method, particularly for very large .Tn NIS maps. The .Nm utility will check to see if the .Xr rpc.ypxfrd 8 server is registered on the .Tn NIS master server and attempt to use it if it is present. If it is not it will fall back to the standard transfer method, copying the map contents from .Xr ypserv 8 and creating new maps instead. .Pp Note that while the .Fx ypxfrd protocol is conceptually similar to the SunOS ypxfrd protocol, the .Fx protocol is not compatible with Sun's, therefore it will not work with Sun's ypxfrd server. .Fx slave systems can still transfer maps from any .No non- Ns Fx .Tn NIS server, however they will only be able to take advantage of the faster protocol if the master server is also running .Fx . .Sh OPTIONS The following options and flags are supported by .Nm : .Bl -tag -width indent .It Fl f Force a map transfer. Normally, .Nm will not transfer a map if it determines that the .Tn NIS master's copy is not newer than the existing copy already on the local host: the .Fl f flag forces a transfer regardless of which server's version is more recent. .It Fl c Do not send a 'clear current map' request to the .Xr ypserv 8 process running on the local host. This flag is normally used when invoking .Nm manually on a machine that is not yet running .Xr ypserv 8 . Without this flag, failure to contact the local .Tn NIS server will cause .Nm to abort the transfer. .It Fl d Ar target domain Specify a target domain other than the current .Tn NIS domain. .It Fl h Ar source host Specify the name of the host from which to copy the .Tn NIS maps. This option is used to ensure that .Nm only copies maps from the .Tn NIS master server. .It Fl s Ar source domain Specify the domain from which to transfer a map, in the event that the transfer is being done across two different .Tn NIS domains. .It Fl p Ar path Specify the top level directory containing the .Tn NIS maps. By default, this path is .Pa /var/yp . The .Fl p flag allows you to specify an alternate path should you wish to store your .Tn NIS maps in a different part of the file system. The .Tn NIS server, .Xr ypserv 8 , passes this flag to .Nm if it too has been told to use an alternate path. .It Fl C Ar taskid program-number ipaddr port These options are used only when .Nm is invoked by .Xr ypserv 8 in response to a map transfer request initiated by .Xr yppush 8 . In this instance, .Nm needs to 'callback' to the .Xr yppush 8 process and interact with it, so .Xr yppush 8 passes to it an IP address .Ar ipaddr , port number .Ar port , registered program number .Ar program-number and a transaction ID .Ar taskid that it can use to contact the waiting .Xr yppush 8 process on the master server. .It Ar mapname The name of the map to transfer. .El .Sh FILES .Bl -tag -width Pa -compact .It Pa /var/yp/[domainname]/[maps] The .Tn NIS maps for a particular .Tn NIS domain. .El .Sh SEE ALSO .Xr yp 8 , .Xr yppush 8 , .Xr ypserv 8 .Sh AUTHORS -.An Bill Paul Aq wpaul@ctr.columbia.edu +.An Bill Paul Aq Mt wpaul@ctr.columbia.edu Index: head/usr.sbin/acpi/acpiconf/acpiconf.8 =================================================================== --- head/usr.sbin/acpi/acpiconf/acpiconf.8 (revision 267667) +++ head/usr.sbin/acpi/acpiconf/acpiconf.8 (revision 267668) @@ -1,96 +1,96 @@ .\"- .\" Copyright (c) 2000 Dag-Erling Coïdan Smørgrav .\" 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 .\" in this position and unchanged. .\" 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. The name of the author may not be used to endorse or promote products .\" derived from this software without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" .\" $FreeBSD$ .\" .Dd June 10, 2014 .Dt ACPICONF 8 .Os .Sh NAME .Nm acpiconf .Nd control ACPI power management .Sh SYNOPSIS .Nm .Op Fl h .Op Fl i Ar batt .Op Fl k Ar ack .Op Fl s Ar type .Sh DESCRIPTION The .Nm utility allows the user control of the ACPI power management functions. The following command-line options are recognized: .Bl -tag -width ".Fl s Ar type" .It Fl h Displays a summary of available options. .It Fl i Ar batt Get design information about the specified battery. .It Fl k Ar ack Ack or abort a pending suspend request using the argument provided. .Sy Most users should not use this option directly. .It Fl s Ar type Enters the specified sleep mode. Recognized types are .Cm 1 (only the CPU clock is stopped), .Cm 2 (not implemented on most systems but similar to S1), .Cm 3 (the CPU context is lost and memory context is preserved), .Cm 4 (the CPU context is lost and memory context is stored to disk) and .Cm 5 (soft off). Sleep states may also be given as S1, S2, etc. The supported states depend on BIOS implementation, including ACPI byte code (AML). If the .Pa /etc/rc.suspend and .Pa /etc/rc.resume scripts are executable, they will be run before and after entering the given sleep state. .El .Sh SEE ALSO .Xr acpi 4 , .Xr acpidump 8 , .Xr apm 8 .Sh HISTORY The .Nm utility appeared in .Fx 5.0 . .Sh AUTHORS .An -nosplit The .Nm utility was written by -.An Mitsuru Iwasaki Aq iwasaki@FreeBSD.org . +.An Mitsuru Iwasaki Aq Mt iwasaki@FreeBSD.org . This manual page was written by -.An Dag-Erling Sm\(/orgrav Aq des@FreeBSD.org . +.An Dag-Erling Sm\(/orgrav Aq Mt des@FreeBSD.org . Index: head/usr.sbin/acpi/acpidb/acpidb.8 =================================================================== --- head/usr.sbin/acpi/acpidb/acpidb.8 (revision 267667) +++ head/usr.sbin/acpi/acpidb/acpidb.8 (revision 267668) @@ -1,167 +1,167 @@ .\"- .\" Copyright (c) 2003 Nate Lawson .\" 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 .\" in this position and unchanged. .\" 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. The name of the author may not be used to endorse or promote products .\" derived from this software without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" .\" $FreeBSD$ .\" .Dd August 7, 2003 .Dt ACPIDB 8 .Os .Sh NAME .Nm acpidb .Nd ACPI DSDT debugger .Sh SYNOPSIS .Nm .Ar input-file .Sh DESCRIPTION The .Nm utility is a debugger for the ACPI DSDT. It can parse and execute various AML methods and display the result. .Sh COMMANDS .Ss General-Purpose Commands .Bl -tag -width indent .It Ic Allocations Display list of current memory allocations .It Ic Dump Ar Address | Namepath Op Cm Byte | Word | Dword | Qword Display ACPI objects or memory .It Ic EnableAcpi Enable ACPI (hardware) mode .It Ic Help Show various help screens .It Ic History Display command history buffer .It Ic Level Ar DebugLevel Op Cm console Get/Set debug level for file or console .It Ic Locks Current status of internal mutexes .It Ic Quit No or Ic Exit Exit the debugger .It Ic Stats Op Cm Allocations | Memory | Misc | Objects | Tables Display namespace and memory statistics .It Ic Tables Display info about loaded ACPI tables .It Ic Unload Ar TableSig Op Ar Instance Unload an ACPI table .It Ic !\& Ar CommandNumber Execute command from history buffer .It Ic !! Execute last command again .El .Ss Namespace Access Commands .Bl -tag -width indent .It Ic Event Cm F | G Ar Value Generate AcpiEvent (Fixed/GPE) .It Ic Find Ar Name Find ACPI name(s) with wildcards .Ql ( ?\& is wildcard) .It Ic Method Display list of loaded control methods .It Ic Namespace Oo Ar Addr | Path Oc Op Ar Depth Display loaded namespace tree/subtree .It Ic Notify Ar NamePath Value Send a notification .It Ic Objects Ar ObjectType Display all objects of the given type .It Ic Owner Ar OwnerId Op Ar Depth Display loaded namespace by object owner .It Ic Prefix Op Ar NamePath Set or Get current execution prefix .It Ic References Ar Addr Find all references to object at addr .It Ic Resources Get and display resources .It Ic Terminate Delete namespace and all internal objects .It Ic Thread Ar Threads Loops NamePath Spawn threads to execute method(s) .El .Ss Control Method Execution Commands .Bl -tag -width indent .It Ic Arguments .Pq Ic Args Display method arguments .It Ic Breakpoint Ar AmlOffset Set an AML execution breakpoint .It Ic Call Run to next control method invocation .It Ic Debug Ar Namepath Op Ar Arguments Single Step a control method .It Ic Execute Ar Namepath Op Arguments Execute control method .It Ic Go Allow method to run to completion .It Ic Information Display info about the current method .It Ic Into Step into (not over) a method call .It Ic List Op OpcodeCount Display method ASL statements .It Ic Locals Display method local variables .It Ic Results Display method result stack .It Ic Set Cm A | L Ar # Value Set method data (Arguments/Locals) .It Ic Stop Terminate control method .It Ic Tree Display control method calling tree .It Ic Single step next AML opcode (over calls) .El .Ss File I/O Commands .Bl -tag -width indent .It Ic Close Close debug output file .It Ic Open Ar Filename Open a file for debug output .It Ic Load Ar Filename Load ACPI table from a file .El .Sh SEE ALSO .Xr acpi 4 , .Xr acpidump 8 , .Xr iasl 8 .Sh HISTORY The .Nm utility first appeared in the .Nm acpicatools port. It was imported for .Fx 5.2 . .Sh AUTHORS .An -nosplit The .Nm utility was written by -.An Mitsuru Iwasaki Aq iwasaki@FreeBSD.org +.An Mitsuru Iwasaki Aq Mt iwasaki@FreeBSD.org and uses Intel ACPI-CA for the backend. This manual page was written by .An Nate Lawson . Index: head/usr.sbin/acpi/acpidump/acpidump.8 =================================================================== --- head/usr.sbin/acpi/acpidump/acpidump.8 (revision 267667) +++ head/usr.sbin/acpi/acpidump/acpidump.8 (revision 267668) @@ -1,200 +1,200 @@ .\" ACPI (ACPI Package) .\" .\" Copyright (c) 1999 Doug Rabson .\" Copyright (c) 2000 Mitsuru IWASAKI .\" Copyright (c) 2000 Yasuo YOKOYAMA .\" Copyright (c) 2000 Hiroki Sato .\" 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 February 14, 2005 .Dt ACPIDUMP 8 .Os .Sh NAME .Nm acpidump .Nd dump ACPI tables and ASL .Sh SYNOPSIS .Nm .Op Fl d .Op Fl t .Op Fl h .Op Fl v .Op Fl f Ar dsdt_input .Op Fl o Ar dsdt_output .Sh DESCRIPTION The .Nm utility analyzes ACPI tables in physical memory and can dump them to a file. In addition, .Nm can call .Xr iasl 8 to disassemble AML (ACPI Machine Language) found in these tables and dump them as ASL (ACPI Source Language) to stdout. .Pp ACPI tables have an essential data block (the DSDT, Differentiated System Description Table) that includes information used on the kernel side such as detailed information about PnP hardware, procedures for controlling power management support, and so on. The .Nm utility can extract the DSDT data block from physical memory and store it into an output file and optionally also disassemble it. If any Secondary System Description Table (SSDT) entries exist, they will also be included in the output file and disassembly. .Pp When .Nm is invoked without the .Fl f option, it will read ACPI tables from physical memory via .Pa /dev/mem . First it searches for the RSDP (Root System Description Pointer), which has the signature .Qq RSD PTR\ \& , and then gets the RSDT (Root System Description Table), which includes a list of pointers to physical memory addresses for other tables. The RSDT itself and all other tables linked from RSDT are generically called SDTs (System Description Tables) and their header has a common format which consists of items such as Signature, Length, Revision, Checksum, OEMID, OEM Table ID, OEM Revision, Creator ID and Creator Revision. When invoked with the .Fl t flag, the .Nm utility dumps contents of the following tables: .Pp .Bl -tag -offset indent -width 12345 -compact .It DMAR .It DSDT .It ECDT .It FACS .It FADT .It HPET .It MADT .It MCFG .It RSD PTR .It RSDT .El .Pp The RSDT contains a pointer to the physical memory address of the FACP (Fixed ACPI Description Table). The FACP defines static system information about power management support (ACPI Hardware Register Implementation) such as interrupt mode (INT_MODEL), SCI interrupt number, SMI command port (SMI_CMD) and the location of ACPI registers. The FACP also has a pointer to a physical memory address for the DSDT. While the other tables are fixed format, the DSDT consists of free-formatted AML data. .Sh OPTIONS The following options are supported by .Nm : .Bl -tag -width indent .It Fl d Disassemble the DSDT into ASL using .Xr iasl 8 and print the results to stdout. .It Fl t Dump the contents of the various fixed tables listed above. .It Fl h Displays usage and exit. .It Fl v Enable verbose messages. .It Fl f Ar dsdt_input Load the DSDT from the specified file instead of physical memory. Since only the DSDT is stored in the file, the .Fl t flag may not be used with this option. .It Fl o Ar dsdt_output Store the DSDT data block from physical memory into the specified file. .El .Sh FILES .Bl -tag -width /dev/mem .It Pa /dev/mem .El .Sh EXAMPLES If a developer requests a copy of your ASL, please use the following command to dump all tables and compress the result. .Bd -literal -offset indent # acpidump -dt | gzip -c9 > my_computer.asl.gz .Ed .Pp This example dumps the DSDT from physical memory to foo.dsdt. It also prints the contents of various system tables and disassembles the AML contained in the DSDT to stdout, redirecting the output to foo.asl. .Bd -literal -offset indent # acpidump -t -d -o foo.dsdt > foo.asl .Ed .Pp This example reads a DSDT file and disassembles it to stdout. Verbose messages are enabled. .Bd -literal -offset indent # acpidump -v -d -f foo.dsdt .Ed .Sh SEE ALSO .Xr acpi 4 , .Xr mem 4 , .Xr acpiconf 8 , .Xr acpidb 8 , .Xr iasl 8 .Sh HISTORY The .Nm utility first appeared in .Fx 5.0 and was rewritten to use .Xr iasl 8 for .Fx 5.2 . .Sh AUTHORS -.An Doug Rabson Aq dfr@FreeBSD.org -.An Mitsuru IWASAKI Aq iwasaki@FreeBSD.org -.An Yasuo YOKOYAMA Aq yokoyama@jp.FreeBSD.org -.An Nate Lawson Aq njl@FreeBSD.org +.An Doug Rabson Aq Mt dfr@FreeBSD.org +.An Mitsuru IWASAKI Aq Mt iwasaki@FreeBSD.org +.An Yasuo YOKOYAMA Aq Mt yokoyama@jp.FreeBSD.org +.An Nate Lawson Aq Mt njl@FreeBSD.org .Pp .An -nosplit Some contributions made by -.An Chitoshi Ohsawa Aq ohsawa@catv1.ccn-net.ne.jp , -.An Takayasu IWANASHI Aq takayasu@wendy.a.perfect-liberty.or.jp , -.An Yoshihiko SARUMARU Aq mistral@imasy.or.jp , -.An Hiroki Sato Aq hrs@FreeBSD.org , -.An Michael Lucas Aq mwlucas@blackhelicopters.org +.An Chitoshi Ohsawa Aq Mt ohsawa@catv1.ccn-net.ne.jp , +.An Takayasu IWANASHI Aq Mt takayasu@wendy.a.perfect-liberty.or.jp , +.An Yoshihiko SARUMARU Aq Mt mistral@imasy.or.jp , +.An Hiroki Sato Aq Mt hrs@FreeBSD.org , +.An Michael Lucas Aq Mt mwlucas@blackhelicopters.org and -.An Michael Smith Aq msmith@FreeBSD.org . +.An Michael Smith Aq Mt msmith@FreeBSD.org . .Sh BUGS The current implementation does not dump the BOOT structure or other miscellaneous tables. Index: head/usr.sbin/adduser/adduser.8 =================================================================== --- head/usr.sbin/adduser/adduser.8 (revision 267667) +++ head/usr.sbin/adduser/adduser.8 (revision 267668) @@ -1,479 +1,479 @@ .\" Copyright (c) 1995-1996 Wolfram Schneider . Berlin. .\" All rights reserved. .\" Copyright (c) 2002-2004 Michael Telahun Makonnen .\" 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 September 15, 2012 .Dt ADDUSER 8 .Os .Sh NAME .Nm adduser .Nd command for adding new users .Sh SYNOPSIS .Nm .Op Fl CDENShq .Op Fl G Ar groups .Op Fl L Ar login_class .Op Fl M Ar mode .Op Fl d Ar partition .Op Fl f Ar file .Op Fl g Ar login_group .Op Fl k Ar dotdir .Op Fl m Ar message_file .Op Fl s Ar shell .Op Fl u Ar uid_start .Op Fl w Ar type .Sh DESCRIPTION The .Nm utility is a shell script, implemented around the .Xr pw 8 command, for adding new users. It creates passwd/group entries, a home directory, copies dotfiles and sends the new user a welcome message. It supports two modes of operation. It may be used interactively at the command line to add one user at a time, or it may be directed to get the list of new users from a file and operate in batch mode without requiring any user interaction. .Sh RESTRICTIONS .Bl -tag -width indent .It username Login name. The user name is restricted to whatever .Xr pw 8 will accept. Generally this means it may contain only lowercase characters or digits but cannot begin with the .Ql - character. Maximum length is 16 characters. The reasons for this limit are historical. Given that people have traditionally wanted to break this limit for aesthetic reasons, it has never been of great importance to break such a basic fundamental parameter in .Ux . You can change .Dv UT_NAMESIZE in .In utmp.h and recompile the world; people have done this and it works, but you will have problems with any precompiled programs, or source that assumes the 8-character name limit, such as NIS. The NIS protocol mandates an 8-character username. If you need a longer login name for e-mail addresses, you can define an alias in .Pa /etc/mail/aliases . .It "full name" This is typically known as the gecos field and usually contains the user's full name. Additionally, it may contain a comma separated list of values such as office number and work and home phones. If the name contains an ampersand it will be replaced by the capitalized login name when displayed by other programs. The .Ql \&: character is not allowed. .It shell Unless the .Fl S argument is supplied only valid shells from the shell database .Pq Pa /etc/shells are allowed. In addition, either the base name or the full path of the shell may be supplied. .It UID Automatically generated or your choice. It must be less than 32000. .It "GID/login group" Automatically generated or your choice. It must be less than 32000. .It password You may choose an empty password, disable the password, use a randomly generated password or specify your own plaintext password, which will be encrypted before being stored in the user database. .El .Sh UNIQUE GROUPS Perhaps you are missing what .Em can be done with this scheme that falls apart with most other schemes. With each user in their own group, they can safely run with a umask of 002 instead of the usual 022 and create files in their home directory without worrying about others being able to change them. .Pp For a shared area you create a separate UID/GID, you place each person that should be able to access this area into that new group. .Pp This model of UID/GID administration allows far greater flexibility than lumping users into groups and having to muck with the umask when working in a shared area. .Pp I have been using this model for almost 10 years and found that it works for most situations, and has never gotten in the way. (Rod Grimes) .Sh CONFIGURATION The .Nm utility reads its configuration information from .Pa /etc/adduser.conf . If this file does not exist, it will use predefined defaults. While this file may be edited by hand, the safer option is to use the .Fl C command line argument. With this argument, .Nm will start interactive input, save the answers to its prompts in .Pa /etc/adduser.conf , and promptly exit without modifying the user database. Options specified on the command line will take precedence over any values saved in this file. .Sh OPTIONS .Bl -tag -width indent .It Fl C Create new configuration file and exit. This option is mutually exclusive with the .Fl f option. .It Fl d Ar partition Home partition. Default partition, under which all user directories will be located. The .Pa /nonexistent partition is considered special. The .Nm script will not create and populate a home directory by that name. Otherwise, by default it attempts to create a home directory. .It Fl D Do not attempt to create the home directory. .It Fl E Disable the account. This option will lock the account by prepending the string .Dq Li *LOCKED* to the password field. The account may be unlocked by the super-user with the .Xr pw 8 command: .Pp .D1 Nm pw Cm unlock Op Ar name | uid .It Fl f Ar file Get the list of accounts to create from .Ar file . If .Ar file is .Dq Fl , then get the list from standard input. If this option is specified, .Nm will operate in batch mode and will not seek any user input. If an error is encountered while processing an account, it will write a message to standard error and move to the next account. The format of the input file is described below. .It Fl g Ar login_group Normally, if no login group is specified, it is assumed to be the same as the username. This option makes .Ar login_group the default. .It Fl G Ar groups Space-separated list of additional groups. This option allows the user to specify additional groups to add users to. The user is a member of these groups in addition to their login group. .It Fl h Print a summary of options and exit. .It Fl k Ar directory Copy files from .Ar directory into the home directory of new users; .Pa dot.foo will be renamed to .Pa .foo . .It Fl L Ar login_class Set default login class. .It Fl m Ar file Send new users a welcome message from .Ar file . Specifying a value of .Cm no for .Ar file causes no message to be sent to new users. Please note that the message file can reference the internal variables of the .Nm script. .It Fl M Ar mode Create the home directory with permissions set to .Ar mode . .It Fl N Do not read the default configuration file. .It Fl q Minimal user feedback. In particular, the random password will not be echoed to standard output. .It Fl s Ar shell Default shell for new users. The .Ar shell argument may be the base name of the shell or the full path. Unless the .Fl S argument is supplied the shell must exist in .Pa /etc/shells or be the special shell .Em nologin to be considered a valid shell. .It Fl S The existence or validity of the specified shell will not be checked. .It Fl u Ar uid Use UIDs from .Ar uid on up. .It Fl w Ar type Password type. The .Nm utility allows the user to specify what type of password to create. The .Ar type argument may have one of the following values: .Bl -tag -width ".Cm random" .It Cm no Disable the password. Instead of an encrypted string, the password field will contain a single .Ql * character. The user may not log in until the super-user manually enables the password. .It Cm none Use an empty string as the password. .It Cm yes Use a user-supplied string as the password. In interactive mode, the user will be prompted for the password. In batch mode, the last (10th) field in the line is assumed to be the password. .It Cm random Generate a random string and use it as a password. The password will be echoed to standard output. In addition, it will be available for inclusion in the message file in the .Va randompass variable. .El .El .Sh FORMAT When the .Fl f option is used, the account information must be stored in a specific format. All empty lines or lines beginning with a .Ql # will be ignored. All other lines must contain ten colon .Pq Ql \&: separated fields as described below. Command line options do not take precedence over values in the fields. Only the password field may contain a .Ql \&: character as part of the string. .Pp .Sm off .D1 Ar name : uid : gid : class : change : expire : gecos : home_dir : shell : password .Sm on .Bl -tag -width ".Ar password" .It Ar name Login name. This field may not be empty. .It Ar uid Numeric login user ID. If this field is left empty, it will be automatically generated. .It Ar gid Numeric primary group ID. If this field is left empty, a group with the same name as the user name will be created and its GID will be used instead. .It Ar class Login class. This field may be left empty. .It Ar change Password ageing. This field denotes the password change date for the account. The format of this field is the same as the format of the .Fl p argument to .Xr pw 8 . It may be .Ar dd Ns - Ns Ar mmm Ns - Ns Ar yy Ns Op Ar yy , where .Ar dd is for the day, .Ar mmm is for the month in numeric or alphabetical format: .Dq Li 10 or .Dq Li Oct , and .Ar yy Ns Op Ar yy is the four or two digit year. To denote a time relative to the current date the format is: .No + Ns Ar n Ns Op Ar mhdwoy , where .Ar n denotes a number, followed by the minutes, hours, days, weeks, months or years after which the password must be changed. This field may be left empty to turn it off. .It Ar expire Account expiration. This field denotes the expiry date of the account. The account may not be used after the specified date. The format of this field is the same as that for password ageing. This field may be left empty to turn it off. .It Ar gecos Full name and other extra information about the user. .It Ar home_dir Home directory. If this field is left empty, it will be automatically created by appending the username to the home partition. The .Pa /nonexistent home directory is considered special and is understood to mean that no home directory is to be created for the user. .It Ar shell Login shell. This field should contain either the base name or the full path to a valid login shell. .It Ar password User password. This field should contain a plaintext string, which will be encrypted before being placed in the user database. If the password type is .Cm yes and this field is empty, it is assumed the account will have an empty password. If the password type is .Cm random and this field is .Em not empty, its contents will be used as a password. This field will be ignored if the .Fl w option is used with a .Cm no or .Cm none argument. Be careful not to terminate this field with a closing .Ql \&: because it will be treated as part of the password. .El .Sh FILES .Bl -tag -width ".Pa /etc/adduser.message" -compact .It Pa /etc/master.passwd user database .It Pa /etc/group group database .It Pa /etc/shells shell database .It Pa /etc/login.conf login classes database .It Pa /etc/adduser.conf configuration file for .Nm .It Pa /etc/adduser.message message file for .Nm .It Pa /usr/share/skel skeletal login directory .It Pa /var/log/adduser logfile for .Nm .El .Sh SEE ALSO .Xr chpass 1 , .Xr passwd 1 , .Xr adduser.conf 5 , .Xr aliases 5 , .Xr group 5 , .Xr login.conf 5 , .Xr passwd 5 , .Xr shells 5 , .Xr adding_user 8 , .Xr pw 8 , .Xr pwd_mkdb 8 , .Xr rmuser 8 , .Xr vipw 8 , .Xr yp 8 .Sh HISTORY The .Nm command appeared in .Fx 2.1 . .Sh AUTHORS .An -nosplit This manual page and the original script, in Perl, was written by -.An Wolfram Schneider Aq wosch@FreeBSD.org . +.An Wolfram Schneider Aq Mt wosch@FreeBSD.org . The replacement script, written as a Bourne shell script with some enhancements, and the man page modification that came with it were done by -.An Mike Makonnen Aq mtm@identd.net . +.An Mike Makonnen Aq Mt mtm@identd.net . .Sh BUGS In order for .Nm to correctly expand variables such as .Va $username and .Va $randompass in the message sent to new users, it must let the shell evaluate each line of the message file. This means that shell commands can also be embedded in the message file. The .Nm utility attempts to mitigate the possibility of an attacker using this feature by refusing to evaluate the file if it is not owned and writable only by the root user. In addition, shell special characters and operators will have to be escaped when used in the message file. .Pp Also, password ageing and account expiry times are currently settable only in batch mode or when specified in .Pa /etc/adduser.conf . The user should be able to set them in interactive mode as well. Index: head/usr.sbin/adduser/adduser.conf.5 =================================================================== --- head/usr.sbin/adduser/adduser.conf.5 (revision 267667) +++ head/usr.sbin/adduser/adduser.conf.5 (revision 267668) @@ -1,221 +1,221 @@ .\" .\" Copyright (c) 2004 Tom Rhodes .\" 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 12, 2007 .Dt ADDUSER.CONF 5 .Os .Sh NAME .Nm adduser.conf .Nd .Xr adduser 8 configuration file .Sh DESCRIPTION The .Pa /etc/adduser.conf file is automatically generated by the .Xr adduser 8 utility when invoked with the .Fl C command-line option. It is not meant to be edited by hand. .Pp The .Pa /etc/adduser.conf file is used to pre-set certain configuration options for the .Xr adduser 8 utility. When .Xr adduser 8 is invoked, it will check to see if this file exists, and if so, the configuration will be used or offered as the default settings. The .Nm file offers three types of configuration: .Bl -bullet .It Default settings offered by .Xr adduser 8 . These options are specified in the configuration file and offered as the default during every invocation of the .Xr adduser 8 utility. .It Configuration options which can be set in .Nm , but overridden by passing a flag to .Xr adduser 8 . .It Configuration supported by .Xr adduser 8 but not offered by a flag or during initial invocation. .El .Pp In the first case, these options can be set in .Nm but will still be offered when .Xr adduser 8 is invoked. In the second case, .Xr adduser 8 will read the configuration data unless a flag has been passed to override it. For example, the .Va defaultshell option. In the third case, the configuration will be utilized, but the user will never be prompted to modify the default setting by either a flag or an .Xr adduser 8 prompt. For example, the .Va upwexpire setting. .Pp The following configuration options can be set in .Nm : .Bl -tag -width ".Va defaultgroups" -offset indent .It Va defaultLgroup The default group new users will be added to. .It Va defaultclass The default class to place users in as described in .Xr login.conf 5 . .It Va defaultgroups This option is used to specify what other groups the new account should be added to. .It Va passwdtype May be one of .Cm no , none , random , or .Cm yes , as described in .Xr adduser 8 . As such, the text is not duplicated here and may be read in .Xr adduser 8 . .It Va homeprefix The default home directory prefix, usually .Pa /home . .It Va defaultshell The user's default shell which may be any of the shells listed in .Xr shells 5 . .It Va udotdir Defines the location of the default shell and environment configuration files. .It Va msgfile Location of the default new user message file. This message will be sent to all new users if specified here or at the .Xr adduser 8 prompt. .It Va disableflag The default message enclosed in brackets for the lock account prompt. .It Va upwexpire The default password expiration time. Format of the date is either a .Ux time in decimal, or a date in .Sm off .Ar dd No - Ar mmm No - Ar yy Op Ar yy .Sm on format, where .Ar dd is the day, .Ar mmm is the month in either numeric or alphabetic format, and .Ar yy Ns Op Ar yy is either a two or four digit year. This option also accepts a relative date in the form of .Sm off .Ar n Op Ar m h d w o y .Sm on where .Ar n is a decimal, octal (leading 0) or hexadecimal (leading 0x) digit followed by the number of Minutes, Hours, Days, Weeks, Months or Years from the current date at which the expiration time is to be set. .It Va uexpire The default account expire time. The format is similar to the .Va upwexpire option. .It Va ugecos The default information to be held in the GECOS field of .Pa /etc/master.passwd . .It Va uidstart The default user ID setting. This must be a number above 1000 and fewer than 65534. .El .Sh EXAMPLES The following is an example .Nm file created with the .Fl C .Xr adduser 8 flag and modified. .Bd -literal -offset indent # Configuration file for adduser(8). # NOTE: only *some* variables are saved. # Last Modified on Fri Mar 30 14:04:05 EST 2004. defaultLgroup= defaultclass= defaultgroups= passwdtype=yes homeprefix=/home defaultshell=/bin/csh udotdir=/usr/share/skel msgfile=/etc/adduser.msg disableflag= upwexpire=91d # Expire passwords 91 days after creation. .Ed .Sh SEE ALSO .Xr group 5 , .Xr passwd 5 , .Xr adduser 8 , .Xr pw 8 , .Xr rmuser 8 .Sh HISTORY The .Nm manual page first appeared in .Fx 5.3 . .Sh AUTHORS This manual page was written by -.An Tom Rhodes Aq trhodes@FreeBSD.org . +.An Tom Rhodes Aq Mt trhodes@FreeBSD.org . .Sh BUGS The internal variables documented here may change without notice. Do not rely on them. To modify this file invoke .Xr adduser 8 with the .Fl C option instead. Index: head/usr.sbin/ancontrol/ancontrol.8 =================================================================== --- head/usr.sbin/ancontrol/ancontrol.8 (revision 267667) +++ head/usr.sbin/ancontrol/ancontrol.8 (revision 267668) @@ -1,553 +1,553 @@ .\" Copyright (c) 1997, 1998, 1999 .\" Bill Paul 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. All advertising materials mentioning features or use of this software .\" must display the following acknowledgement: .\" This product includes software developed by Bill Paul. .\" 4. Neither the name of the author nor the names of any co-contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY Bill Paul 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 Bill Paul OR THE VOICES IN HIS HEAD .\" 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 September 10, 1999 .Dt ANCONTROL 8 .Os .Sh NAME .Nm ancontrol .Nd configure Aironet 4500/4800 devices .Sh SYNOPSIS .Nm .Fl i Ar iface Fl A .Nm .Fl i Ar iface Fl N .Nm .Fl i Ar iface Fl S .Nm .Fl i Ar iface Fl I .Nm .Fl i Ar iface Fl T .Nm .Fl i Ar iface Fl C .Nm .Fl i Ar iface Fl Q .Nm .Fl i Ar iface Fl Z .Nm .Fl i Ar iface Fl R .Nm .Fl i Ar iface Fl t Cm 0 Ns - Ns Cm 4 .Nm .Fl i Ar iface Fl s Cm 0 Ns - Ns Cm 3 .Nm .Fl i Ar iface .Op Fl v Cm 1 Ns - Ns Cm 4 .Fl a Ar AP .Nm .Fl i Ar iface Fl b Ar beacon_period .Nm .Fl i Ar iface .Op Fl v Cm 0 | 1 .Fl d Cm 0 Ns - Ns Cm 3 .Nm .Fl i Ar iface Fl e Cm 0 Ns - Ns Cm 4 .Nm .Fl i Ar iface .Op Fl v Cm 0 Ns - Ns Cm 8 .Fl k Ar key .Nm .Fl i Ar iface .Fl K Cm 0 Ns - Ns Cm 2 .Nm .Fl i Ar iface .Fl W Cm 0 Ns - Ns Cm 2 .Nm .Fl i Ar iface .Fl L Ar user_name .Nm .Fl i Ar iface Fl j Ar netjoin_timeout .Nm .Fl i Ar iface Fl l Ar station_name .Nm .Fl i Ar iface Fl m Ar mac_address .Nm .Fl i Ar iface .Op Fl v Cm 1 Ns - Ns Cm 3 .Fl n Ar SSID .Nm .Fl i Ar iface Fl o Cm 0 | 1 .Nm .Fl i Ar iface Fl p Ar tx_power .Nm .Fl i Ar iface Fl c Ar frequency .Nm .Fl i Ar iface Fl f Ar fragmentation_threshold .Nm .Fl i Ar iface Fl r Ar RTS_threshold .Nm .Fl i Ar iface Fl M Cm 0 Ns - Ns Cm 15 .Nm .Fl h .Sh DESCRIPTION The .Nm utility controls the operation of Aironet wireless networking devices via the .Xr an 4 driver. Most of the parameters that can be changed relate to the IEEE 802.11 protocol which the Aironet cards implement. This includes such things as the station name, whether the station is operating in ad-hoc (point to point) or infrastructure mode, and the network name of a service set to join. The .Nm utility can also be used to view the current NIC status, configuration and to dump out the values of the card's statistics counters. .Pp The .Ar iface argument given to .Nm should be the logical interface name associated with the Aironet device .Li ( an0 , an1 , etc.). If one is not specified the device .Dq Li an0 will be assumed. .Pp The .Nm utility is not designed to support the combination of arguments from different .Sx SYNOPSIS lines in a single .Nm invocation, and such combinations are not recommended. .Sh OPTIONS The options are as follows: .Bl -tag -width indent .It Fl i Ar iface Fl A Display the preferred access point list. The AP list can be used by stations to specify the MAC address of access points with which it wishes to associate. If no AP list is specified (the default) then the station will associate with the first access point that it finds which serves the SSID(s) specified in the SSID list. The AP list can be modified with the .Fl a option. .It Fl i Ar iface Fl N Display the SSID list. This is a list of service set IDs (i.e., network names) with which the station wishes to associate. There may be up to three SSIDs in the list: the station will go through the list in ascending order and associate with the first matching SSID that it finds. .It Fl i Ar iface Fl S Display NIC status information. This includes the current operating status, current BSSID, SSID, channel, beacon period and currently associated access point. The operating mode indicates the state of the NIC, MAC status and receiver status. When the .Qq Li synced keyword appears, it means the NIC has successfully associated with an access point, associated with an ad-hoc .Dq master station, or become a .Dq master itself. The beacon period can be anything between 20 and 976 milliseconds. The default is 100. .It Fl i Ar iface Fl I Display NIC capability information. This shows the device type, frequency, speed and power level capabilities and firmware revision levels. .It Fl i Ar iface Fl T Display the NIC's internal statistics counters. .It Fl i Ar iface Fl C Display current NIC configuration. This shows the current operation mode, receive mode, MAC address, power save settings, various timing settings, channel selection, diversity, transmit power and transmit speed. .It Fl i Ar iface Fl Q Display the cached signal strength information maintained by the .Xr an 4 driver. The driver retains information about signal strength and noise level for packets received from different hosts. The signal strength and noise level values are displayed in units of dBms by default. The .Va hw.an.an_cache_mode .Xr sysctl 8 variable can be set to .Cm raw , dbm or .Cm per . .It Fl i Ar iface Fl Z Clear the signal strength cache maintained internally by the .Xr an 4 driver. .It Fl i Ar iface Fl R Display RSSI map that converts from the RSSI index to percent and dBm. .It Fl i Ar iface Fl t Cm 0 Ns - Ns Cm 4 Select transmit speed. The available settings are as follows: .Bl -column ".Em TX rate" -offset indent .Em "TX rate NIC speed" .It Cm 0 Ta "Auto -- NIC selects optimal speed" .It Cm 1 Ta "1Mbps fixed" .It Cm 2 Ta "2Mbps fixed" .It Cm 3 Ta "5.5Mbps fixed" .It Cm 4 Ta "11Mbps fixed" .El .Pp Note that the 5.5 and 11Mbps settings are only supported on the 4800 series adapters: the 4500 series adapters have a maximum speed of 2Mbps. .It Fl i Ar iface Fl s Cm 0 Ns - Ns Cm 3 Set power save mode. Valid selections are as follows: .Bl -column ".Em Selection" -offset indent .Em "Selection Power save mode" .It Cm 0 Ta "None - power save disabled" .It Cm 1 Ta "Constantly awake mode (CAM)" .It Cm 2 Ta "Power Save Polling (PSP)" .It Cm 3 Ta "Fast Power Save Polling (PSP-CAM)" .El .Pp Note that for IBSS (ad-hoc) mode, only PSP mode is supported, and only if the ATIM window is non-zero. .It Fl i Ar iface Oo Fl v Cm 1 Ns - Ns Cm 4 Oc Fl a Ar AP Set preferred access point. The .Ar AP is specified as a MAC address consisting of 6 hexadecimal values separated by colons. By default, the .Fl a option only sets the first entry in the AP list. The .Fl v modifier can be used to specify exactly which AP list entry is to be modified. If the .Fl v flag is not used, the first AP list entry will be changed. .It Fl i Ar iface Fl b Ar beacon_period Set the ad-hoc mode beacon period. The .Ar beacon_period is specified in milliseconds. The default is 100ms. .It Fl i Ar iface Oo Fl v Cm 0 | 1 Oc Fl d Cm 0 Ns - Ns Cm 3 Select the antenna diversity. Aironet devices can be configured with up to two antennas, and transmit and receive diversity can be configured accordingly. Valid selections are as follows: .Bl -column ".Em Selection" -offset indent .Em "Selection Diversity" .It Cm 0 Ta "Select factory default diversity" .It Cm 1 Ta "Antenna 1 only" .It Cm 2 Ta "Antenna 2 only" .It Cm 3 Ta "Antenna 1 and 2" .El .Pp The receive and transmit diversity can be set independently. The user must specify which diversity setting is to be modified by using the .Fl v option: selection .Cm 0 sets the receive diversity and .Cm 1 sets the transmit diversity. .It Fl i Ar iface Fl e Cm 0 Ns - Ns Cm 4 Set the transmit WEP key to use. Note that until this command is issued, the device will use the last key programmed. The transmit key is stored in NVRAM. Currently set transmit key can be checked via .Fl C option. Selection .Cm 4 sets the card in .Dq "Home Network Mode" and uses the home key. .It Fl i Ar iface Oo Fl v Cm 0 Ns - Ns Cm 8 Oc Fl k Ar key Set a WEP key. For 40 bit prefix 10 hex character with 0x. For 128 bit prefix 26 hex character with 0x. Use .Qq as the key to erase the key. Supports 4 keys; even numbers are for permanent keys and odd number are for temporary keys. For example, .Fl v Cm 1 sets the first temporary key. (A .Dq permanent key is stored in NVRAM; a .Dq temporary key is not.) Note that the device will use the most recently-programmed key by default. Currently set keys can be checked via .Fl C option, only the sizes of the keys are returned. The value of .Cm 8 is for the home key. Note that the value for the home key can be read back from firmware. .It Fl i Ar iface Fl K Cm 0 Ns - Ns Cm 2 Set authorization type. Use .Cm 0 for none, .Cm 1 for .Dq Open , .Cm 2 for .Dq "Shared Key" . .It Fl i Ar iface Fl W Cm 0 Ns - Ns Cm 2 Enable WEP. Use .Cm 0 for no WEP, .Cm 1 to enable full WEP, .Cm 2 for mixed cell. .It Fl i Ar iface Fl L Ar user_name Enable LEAP and query for password. It will check to see if it has authenticated for up to 60s. To disable LEAP, set WEP mode. .It Fl i Ar iface Fl j Ar netjoin_timeout Set the ad-hoc network join timeout. When a station is first activated in ad-hoc mode, it will search out a .Dq master station with the desired SSID and associate with it. If the station is unable to locate another station with the same SSID after a suitable timeout, it sets itself up as the .Dq master so that other stations may associate with it. This timeout defaults to 10000 milliseconds (10 seconds) but may be changed with this option. The timeout should be specified in milliseconds. .It Fl i Ar iface Fl l Ar station_name Set the station name used internally by the NIC. The .Ar station_name can be any text string up to 16 characters in length. The default name is set by the driver to .Dq Li FreeBSD . .It Fl i Ar iface Fl m Ar mac_address Set the station address for the specified interface. The .Ar mac_address is specified as a series of six hexadecimal values separated by colons, e.g.: .Li 00:60:1d:12:34:56 . This programs the new address into the card and updates the interface as well. .It Fl i Ar iface Oo Fl v Cm 1 Ns - Ns Cm 3 Oc Fl n Ar SSID Set the desired SSID (network name). There are three SSIDs which allows the NIC to work with access points at several locations without needing to be reconfigured. The NIC checks each SSID in sequence when searching for a match. The SSID to be changed can be specified with the .Fl v modifier option. If the .Fl v flag is not used, the first SSID in the list is set. .It Fl i Ar iface Fl o Cm 0 | 1 Set the operating mode of the Aironet interface. Valid selections are .Cm 0 for ad-hoc mode and .Cm 1 for infrastructure mode. The default driver setting is for infrastructure mode. .It Fl i Ar iface Fl p Ar tx_power Set the transmit power level in milliwatts. Valid power settings vary depending on the actual NIC and can be viewed by dumping the device capabilities with the .Fl I flag. Typical values are 1, 5, 20, 50 and 100mW. Selecting 0 sets the factory default. .It Fl i Ar iface Fl c Ar frequency Set the radio frequency of a given interface. The .Ar frequency should be specified as a channel ID as shown in the table below. The list of available frequencies is dependent on radio regulations specified by regional authorities. Recognized regulatory authorities include the FCC (United States), ETSI (Europe), France and Japan. Frequencies in the table are specified in MHz. .Bl -column ".Em Channel ID" ".Em FCC" ".Em ETSI" ".Em France" ".Em Japan" -offset indent .Em "Channel ID FCC ETSI France Japan" .It Cm 1 Ta 2412 Ta 2412 Ta - Ta - .It Cm 2 Ta 2417 Ta 2417 Ta - Ta - .It Cm 3 Ta 2422 Ta 2422 Ta - Ta - .It Cm 4 Ta 2427 Ta 2427 Ta - Ta - .It Cm 5 Ta 2432 Ta 2432 Ta - Ta - .It Cm 6 Ta 2437 Ta 2437 Ta - Ta - .It Cm 7 Ta 2442 Ta 2442 Ta - Ta - .It Cm 8 Ta 2447 Ta 2447 Ta - Ta - .It Cm 9 Ta 2452 Ta 2452 Ta - Ta - .It Cm 10 Ta 2457 Ta 2457 Ta 2457 Ta - .It Cm 11 Ta 2462 Ta 2462 Ta 2462 Ta - .It Cm 12 Ta - Ta 2467 Ta 2467 Ta - .It Cm 13 Ta - Ta 2472 Ta 2472 Ta - .It Cm 14 Ta - Ta - Ta - Ta 2484 .El .Pp If an illegal channel is specified, the NIC will revert to its default channel. For NICs sold in the United States and Europe, the default channel is 3. For NICs sold in France, the default channel is 11. For NICs sold in Japan, the only available channel is 14. Note that two stations must be set to the same channel in order to communicate. .It Fl i Ar iface Fl f Ar fragmentation_threshold Set the fragmentation threshold in bytes. This threshold controls the point at which outgoing packets will be split into multiple fragments. If a single fragment is not sent successfully, only that fragment will need to be retransmitted instead of the whole packet. The fragmentation threshold can be anything from 64 to 2312 bytes. The default is 2312. .It Fl i Ar iface Fl r Ar RTS_threshold Set the RTS/CTS threshold for a given interface. This controls the number of bytes used for the RTS/CTS handshake boundary. The .Ar RTS_threshold can be any value between 0 and 2312. The default is 2312. .It Fl i Ar iface Fl M Cm 0 Ns - Ns Cm 15 Set monitor mode via bit mask, meaning: .Pp .Bl -tag -width indent -offset indent -compact .It Em Bit .Em Meaning .It 0 to not dump 802.11 packet. .It 1 to enable 802.11 monitor. .It 2 to monitor any SSID. .It 4 to not skip beacons, monitor beacons produces a high system load. .It 8 to enable full Aironet header returned via BPF. Note it appears that a SSID must be set. .El .It Fl h Print a list of available options and sample usage. .El .Sh SECURITY NOTES WEP .Pq Dq "wired equivalent privacy" is based on the RC4 algorithm, using a 24 bit initialization vector. .Pp RC4 is supposedly vulnerable to certain known plaintext attacks, especially with 40 bit keys. So the security of WEP in part depends on how much known plaintext is transmitted. .Pp Because of this, although counter-intuitive, using .Dq "shared key" authentication (which involves sending known plaintext) is less secure than using .Dq open authentication when WEP is enabled. .Pp Devices may alternate among all of the configured WEP keys when transmitting packets. Therefore, all configured keys (up to four) must agree. .Sh EXAMPLES .Bd -literal -offset indent ancontrol -i an0 -v 0 -k 0x12345678901234567890123456 ancontrol -i an0 -K 2 ancontrol -i an0 -W 1 ancontrol -i an0 -e 0 .Ed .Pp Sets a WEP key 0, enables .Dq "Shared Key" authentication, enables full WEP and uses transmit key 0. .Sh SEE ALSO .Xr an 4 , .Xr ifconfig 8 .Sh HISTORY The .Nm utility first appeared in .Fx 4.0 . .Sh AUTHORS The .Nm utility was written by -.An Bill Paul Aq wpaul@ee.columbia.edu . +.An Bill Paul Aq Mt wpaul@ee.columbia.edu . .Sh BUGS The statistics counters do not seem to show the amount of transmit and received frames as increasing. This is likely due to the fact that the .Xr an 4 driver uses unmodified packet mode instead of letting the NIC perform 802.11/ethernet encapsulation itself. .Pp Setting the channel does not seem to have any effect. Index: head/usr.sbin/apm/apm.8 =================================================================== --- head/usr.sbin/apm/apm.8 (revision 267667) +++ head/usr.sbin/apm/apm.8 (revision 267668) @@ -1,153 +1,153 @@ .\" LP (Laptop Package) .\" .\" Copyright (c) 1994 by Tatsumi Hosokawa .\" .\" This software may be used, modified, copied, and distributed, in .\" both source and binary form provided that the above copyright and .\" these terms are retained. Under no circumstances is the author .\" responsible for the proper functioning of this software, nor does .\" the author assume any responsibility for damages incurred with its .\" use. .\" .\" $FreeBSD$ .\" .Dd December 22, 2009 .Dt APM 8 i386 .Os .Sh NAME .Nm apm .Nd control the APM BIOS and display its information .Sh SYNOPSIS .Nm .Op Fl ablstzZ .Op Fl d Ar enable .Op Fl e Ar enable .Op Fl h Ar enable .Op Fl r Ar delta .Sh DESCRIPTION The .Nm utility controls the Intel / Microsoft APM (Advanced Power Management) BIOS and displays the current status of APM on laptop PCs. .Pp The options are as follows: .Bl -tag -width indent .It Fl a Display the current AC-line status as an integer value. The values 0, 1 and 2 correspond to the .Dq off-line state, .Dq on-line state or .Dq backup power state, respectively. .It Fl b Display an integer value reflecting the current battery status. The values 0, 1, 2, 3, correspond to the .Dq high status, .Dq low status, .Dq critical status, .Dq charging status respectively. .It Fl d Ar enable Disable/enable suspending of the display separately from a normal suspend using the boolean value for .Ar enable . This feature seems to not work on many different laptops, including the Libretto 30CT and 50CT. .It Fl e Ar enable Enable or disable APM functions of the computer, depending on the boolean .Ar enable argument. .It Fl h Ar enable Depending on the boolean value of .Ar enable , enable or disable the HLT instruction in the kernel context switch routine. These options are not necessary for almost all APM implementations, but for some implementations whose .Dq Pa Idle CPU call executes both CPU clock slowdown and HLT instruction, .Fl h Cm false is necessary to prevent the system from reducing its peak performance. See .Xr apm 4 for details. .It Fl l Display the remaining battery percentage. If your laptop does not support this function, 255 is displayed. .It Fl r Ar delta Enable the resume wakeup timer, if the laptop supports it. This does not actually suspend the laptop, but if the laptop is suspended, and it supports resume from suspend, then it will be resumed after .Ar delta seconds (from when you run this command, not from when you suspend). .It Fl s Display the status of the APM support as an integer value. The values 0 and 1 correspond to the .Dq disabled state or .Dq enabled state respectively. .It Fl t Display the estimated remaining battery lifetime in seconds. If it is unknown, -1 is displayed. .It Fl Z Transition the system into standby mode. This mode uses less power than full power mode, but more than suspend mode. Some laptops support resuming from this state on timer or Ring Indicator events. The output of .Nm tells what your laptop claims to support. .It Fl z Suspend the system. It is used by .Xr zzz 8 . .El .Pp If no options are specified, .Nm displays information and current status of APM in verbose mode. If multiple display options are given, the values are displayed one per line in the order given here. .Sh NOTES .Xr apmconf 8 has been merged in .Nm and thus .Nm replaces all of its functionality. .Sh SEE ALSO .Xr apm 4 , .Xr zzz 8 .Sh AUTHORS -.An Tatsumi Hosokawa Aq hosokawa@jp.FreeBSD.org +.An Tatsumi Hosokawa Aq Mt hosokawa@jp.FreeBSD.org .Sh BUGS Some APM implementations do not support parameters needed by .Nm . On such systems, .Nm displays them as unknown. .Pp Some APM implementations cannot handle events such as pushing the power button or closing the cover. On such implementations, the system .Ar must be suspended .Ar only by using .Nm or .Nm zzz . Index: head/usr.sbin/apmd/apmd.8 =================================================================== --- head/usr.sbin/apmd/apmd.8 (revision 267667) +++ head/usr.sbin/apmd/apmd.8 (revision 267668) @@ -1,322 +1,322 @@ .\" Copyright (c) 1999 Mitsuru IWASAKI .\" Copyright (c) 1999 KOIE Hidetaka .\" Copyright (c) 1999 Yoshihiko SARUMARU .\" Copyright (c) 1999 Norihiro Kumagai .\" 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. .\" .\" @(#)apmd.8 1.1 (FreeBSD) 6/28/99 .\" $FreeBSD$ .\" .Dd June 28, 1999 .Dt APMD 8 i386 .Os .Sh NAME .Nm apmd .Nd Advanced Power Management monitor daemon .Sh SYNOPSIS .Nm .Op Fl d .Op Fl f file .Op Fl s .Op Fl v .Sh DESCRIPTION The .Nm utility monitors the occurrence of the specified Advanced Power Management .Pq Tn APM events and, if one of the events occurs, it executes the sequence of commands corresponding to the event. Only the events specified in the configuration file are notified to .Nm ; all other events are ignored. For each event posted by the APM BIOS, .Nm invokes the sequence of commands specified in the configuration file. When .Nm is running with monitoring suspend/standby requests, the kernel will not process those requests. Therefore, if you wish action to be taken when these events occur, you need to explicitly configure the appropriate commands or built-in functions in the configuration file. .Pp The .Nm utility recognizes the following runtime options: .Bl -tag -width f_file .It Fl d Starts in debug mode. This causes .Nm to execute in the foreground instead of in daemon mode. .It Fl f Ar file Specifies a different configuration file .Ar file to be used in place of the default .Pa /etc/apmd.conf . .It Fl s Causes .Nm to simulate a POWERSTATECHANGE event when a power state change is detected (AC_POWER_STATE) but the bios of the laptop does not report it. This enables you to do things like dimming the LCD backlight when you unplug the power cord. .It Fl v Verbose mode. .El .Pp When .Nm starts, it reads the configuration file .Pa ( /etc/apmd.conf as default) and notifies the set of events to be monitored to the APM device driver. When it terminates, the APM device driver automatically cancels monitored events. .Pp If the .Nm process receives a .Dv SIGHUP , it will reread its configuration file and notify the APM device driver of any changes to its configuration. .Pp The .Nm utility uses the device .Pa /dev/apmctl to issue .Xr ioctl 2 requests for monitoring events and for controlling the APM system. This device file is opened exclusively, so only a single .Nm process can be running at any time. .Pp When .Nm receives an APM event, it forks a child process to execute the commands specified in the configuration file and then continues listening for more events. The child process executes the commands specified, one at a time and in the order that they are listed. .Pp While .Nm is processing the command list for SUSPEND/STANDBY requests, the APM kernel device driver issues notifications to APM BIOS once per second so that the BIOS knows that there are still some commands pending, and that it should not complete the request just yet. .Pp The .Nm utility creates the file .Pa /var/run/apmd.pid , and stores its process id there. This can be used to kill or reconfigure .Nm . .Sh CONFIGURATION FILE The structure of the .Nm configuration file is quite simple. For example: .Bd -literal apm_event SUSPENDREQ { exec "sync && sync && sync"; exec "sleep 1"; exec "zzz"; } .Ed .Pp will cause .Nm to receive the APM event .Ql SUSPENDREQ (which may be posted by an LCD close), run the .Ql sync command 3 times and wait for a while, then execute .Nm zzz ( Ns Nm apm Fl z ) to put the system in the suspend state. .Bl -bullet .It The apm_event keyword .Bd -ragged -offset indent .Ql apm_event is the keyword which indicates the start of configuration for each event. .Ed .It APM events .Bd -ragged -offset indent If you wish to execute the same commands for different events, the event names should be delimited by a comma. The following are valid event names: .Bl -item .It - Events ignored by the kernel if .Nm is running: .Pp .Bl -tag -width USERSUSPENDREQ -compact -offset indent .It STANDBYREQ .It USERSTANDBYREQ .It SUSPENDREQ should include sync in the command list, .It USERSUSPENDREQ should include sync in the command list, .It BATTERYLOW only zzz should be specified in the command list. .El .It - Events passed to .Nm after kernel handling: .Pp .Bl -tag -width USERSUSPENDREQ -compact -offset indent .It NORMRESUME .It CRITRESUME .It STANDBYRESUME .It POWERSTATECHANGE .It UPDATETIME .It CAPABILITIESCHANGE .El .Pp Other events will not be sent to .Nm . .El .Ed .It command line syntax .Bd -ragged -offset indent In the example above, the three lines beginning with .Ql exec are commands for the event. Each line should be terminated with a semicolon. The command list for the event should be enclosed by .Ql { and .Ql } . The .Nm utility uses .Pa /bin/sh for double-quotation enclosed command execution, just as with .Xr system 3 . Each command is executed in order until the end of the list is reached or a command finishes with a non-zero status code. The .Nm utility will report any failed command's status code via .Xr syslog 3 and will then reject the request event posted by the APM BIOS. .Ed .It Built-in functions .Bd -ragged -offset indent You can also specify .Nm built-in functions instead of command lines. A built-in function name should be terminated with a semicolon, just as with a command line. The following built-in functions are currently supported: .Bl -item .It .Bl -tag -width ".It - reject" .It - reject Reject last request posted by APM BIOS. This can be used to reject a SUSPEND request when the LCD is closed and put the system in a STANDBY state instead. .El .El .Ed .El .Sh FILES .Bl -tag -width /etc/apmd.conf -compact .It Pa /etc/apmd.conf .It Pa /dev/apmctl .It Pa /var/run/apmd.pid .El .Sh EXAMPLES Sample configuration commands include: .Bd -literal apm_event SUSPENDREQ { exec "/etc/rc.suspend apm suspend"; } apm_event USERSUSPENDREQ { exec "sync && sync && sync"; exec "sleep 1"; exec "apm -z"; } apm_event NORMRESUME { exec "/etc/rc.resume apm suspend"; } apm_event STANDBYRESUME { exec "/etc/rc.resume apm standby"; } # resume event configuration for serial mouse users by # reinitializing a moused(8) connected to a serial port. # #apm_event NORMRESUME { # exec "kill -HUP `cat /var/run/moused.pid`"; #} # # suspend request event configuration for ATA HDD users: # execute standby instead of suspend. # #apm_event SUSPENDREQ { # reject; # exec "sync && sync && sync"; # exec "sleep 1"; # exec "apm -Z"; #} .Ed .Sh SEE ALSO .Xr apm 4 , .Xr apm 8 .Sh HISTORY The .Nm utility appeared in .Fx 3.3 . .Sh AUTHORS -.An Mitsuru IWASAKI Aq iwasaki@FreeBSD.org -.An KOIE Hidetaka Aq koie@suri.co.jp +.An Mitsuru IWASAKI Aq Mt iwasaki@FreeBSD.org +.An KOIE Hidetaka Aq Mt koie@suri.co.jp .Pp .An -nosplit Some contributions made by -.An Warner Losh Aq imp@FreeBSD.org , -.An Hiroshi Yamashita Aq bluemoon@msj.biglobe.ne.jp , -.An Yoshihiko SARUMARU Aq mistral@imasy.or.jp , -.An Norihiro Kumagai Aq kuma@nk.rim.or.jp , -.An NAKAGAWA Yoshihisa Aq nakagawa@jp.FreeBSD.org , +.An Warner Losh Aq Mt imp@FreeBSD.org , +.An Hiroshi Yamashita Aq Mt bluemoon@msj.biglobe.ne.jp , +.An Yoshihiko SARUMARU Aq Mt mistral@imasy.or.jp , +.An Norihiro Kumagai Aq Mt kuma@nk.rim.or.jp , +.An NAKAGAWA Yoshihisa Aq Mt nakagawa@jp.FreeBSD.org , and -.An Nick Hilliard Aq nick@foobar.org . +.An Nick Hilliard Aq Mt nick@foobar.org . Index: head/usr.sbin/asf/asf.8 =================================================================== --- head/usr.sbin/asf/asf.8 (revision 267667) +++ head/usr.sbin/asf/asf.8 (revision 267668) @@ -1,179 +1,179 @@ .\" Copyright (c) 2003 Greg Lehey. 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 Greg Lehey ``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 Greg Lehey 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 20, 2006 .Dt ASF 8 .Os .Sh NAME .Nm asf .Nd add symbol files .Sh SYNOPSIS .Nm .Op Fl afKksVx .Op Fl M Ar core .Op Fl N Ar system .Op Fl o Ar outfile .Op Fl X Ar suffix .Op Ar modules-path Op Ar outfile .Sh DESCRIPTION By default, .Nm reads .Xr kldstat 8 output from standard input and writes to the .Pa .asf file a list of .Xr gdb 1 commands to add symbol files from KLDs in subdirectories of the subdirectory .Pa modules of the current directory, which is intended to be a kernel build directory. This allows .Xr gdb 1 to load the symbols into the debugging environment. .Pp An optional .Ar modules-path argument can specify a semicolon-separated list of directory pathnames similar to the .Va kern.module_path sysctl. Each directory in the list will be searched in turn for modules. The default list consists of just one element, .Pa modules , which is suitable if the current directory is a kernel build directory. .Pp If .Ar outfile is specified, .Nm writes to it instead of .Pa .asf . If .Ar outfile is a single dash .Pq Sq Fl , standard output is used. .Sh OPTIONS The following options modify the function of .Nm : .Bl -tag -width indent .It Fl a When writing to an explicit .Ar outfile , append to the file rather than overwriting it. .It Fl f Instead of trying to simplistically guess the path for each module, perform a traversal in the same way that .Xr find 1 does to locate an exact path for each module, no matter where in .Ar modules-path it is located. .It Fl K Instead of reading from standard input, use the conventional system interface to get the list of modules currently loaded. .It Fl k Instead of reading from standard input, start a .Xr kldstat 8 and read the information from it. .It Fl M Specify the core file for .Xr kvm 3 . Implies .Fl V . .It Fl N Specify the system file for .Xr kvm 3 . Implies .Fl V . .It Fl o Specify the file for .Nm to write or append its output to. If .Ar outfile is a single dash .Pq Sq Fl , standard output is used. .It Fl s Do not prepend a (guessed) subdirectory of the module path. .It Fl V Instead of reading from standard input, use the .Xr kvm 3 interface to get the list of modules. This interface allows for inspecting system crash dumps, as well as the live system. The .Fl M and .Fl N options will be of use if inspecting a crash dump. Elevated privileges, e.g., those of a superuser, may be needed to use this option. .It Fl X Add .Ar suffix to the list of suffixes .Nm tries to append to KLD file names. The default list consists of .Pa .debug , .Pa .symbols , and the null suffix. The null suffix always stays at the list tail, after the suffix added. Should it be needed in the middle of the list, a blank suffix can be specified to .Fl X instead. .It Fl x Clear the list of suffixes .Nm tries to append to KLD file names. Only the null suffix is left in the list. .El .Sh EXAMPLES To add symbol files from the system search path specified by the .Va kern.module_path sysctl, the following command can be used: .Pp .Dl asf -s `sysctl -n kern.module_path` .Sh SEE ALSO .Xr gdb 1 , .Xr kvm 3 , .Xr kld 4 , .Xr kldstat 8 , .Xr sysctl 8 .Sh HISTORY The .Nm utility first appeared in .Fx 5.2 . .Sh AUTHORS -.An Greg Lehey Aq grog@FreeBSD.org +.An Greg Lehey Aq Mt grog@FreeBSD.org .Sh BUGS Module paths are guessed in a rather naive way by default. It is likely to lag behind the changes to the build tree layout. Using .Fl f is recommended. Index: head/usr.sbin/bhyve/bhyve.8 =================================================================== --- head/usr.sbin/bhyve/bhyve.8 (revision 267667) +++ head/usr.sbin/bhyve/bhyve.8 (revision 267668) @@ -1,307 +1,307 @@ .\" Copyright (c) 2013 Peter Grehan .\" 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 AUTHORS 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 AUTHORS 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 2, 2014 .Dt BHYVE 8 .Os .Sh NAME .Nm bhyve .Nd "run a guest operating system inside a virtual machine" .Sh SYNOPSIS .Nm .Op Fl aehwxACHPW .Op Fl c Ar numcpus .Op Fl g Ar gdbport .Op Fl p Ar vcpu:hostcpu .Op Fl s Ar slot,emulation Ns Op , Ns Ar conf .Op Fl l Ar lpcdev Ns Op , Ns Ar conf .Ar vmname .Sh DESCRIPTION .Nm is an experimental hypervisor that runs guest operating systems inside a virtual machine. .Pp Parameters such as the number of virtual CPUs, amount of guest memory, and I/O connectivity can be specified with command-line parameters. .Pp The guest operating system must be loaded with .Xr bhyveload 4 or a similar boot loader before running .Nm . .Pp .Nm runs until the guest operating system reboots or an unhandled hypervisor exit is detected. .Sh OPTIONS .Bl -tag -width 10n .It Fl a The guest's local APIC is configured in xAPIC mode. The xAPIC mode is the default setting so this option is redundant. It will be deprecated in a future version. .It Fl A Generate ACPI tables. Required for .Fx Ns /amd64 guests. .It Fl c Ar numcpus Number of guest virtual CPUs. The default is 1 and the maximum is 16. .It Fl C Include guest memory in core file. .It Fl H Yield the virtual CPU thread when a HLT instruction is detected. If this option is not specified, virtual CPUs will use 100% of a host CPU. .It Fl g Ar gdbport For .Fx Ns /amd64 kernels compiled with .Cd "option bvmdebug" , allow a remote kernel kgdb to be relayed to the guest kernel gdb stub via a local IPv4 address and this port. This option will be deprecated in a future version. .It Fl p Ar vcpu:hostcpu Pin guest's virtual CPU .Em vcpu to .Em hostcpu . .It Fl P Force the guest virtual CPU to exit when a PAUSE instruction is detected. .It Fl W Force virtio PCI device emulations to use MSI interrupts instead of MSI-X interrupts. .It Fl s Ar slot,emulation Ns Op , Ns Ar conf Configure a virtual PCI slot and function. .Pp .Nm bhyve provides PCI bus emulation and virtual devices that can be attached to slots on the bus. There are 32 available slots, with the option of providing up to 8 functions per slot. .Bl -tag -width 10n .It Ar slot .Ar pcislot[:function] .Ar bus:pcislot:function .Pp The .Ar pcislot value is 0 to 31. The optional function value is 0 to 7. The optional .Ar bus value is 0 to 255. If not specified, the function value defaults to 0. If not specified, the bus value defaults to 0. .It Ar emulation .Bl -tag -width 10n .It Li hostbridge | Li amd_hostbridge .Pp Provide a simple host bridge. This is usually configured at slot 0, and is required by most guest operating systems. The .Li amd_hostbridge emulation is identical but uses a PCI vendor ID of .Li AMD . .It Li passthru PCI pass-through device. .It Li virtio-net Virtio network interface. .It Li virtio-blk Virtio block storage interface. .It Li virtio-rnd Virtio RNG interface. .It Li ahci-cd AHCI controller attached to an ATAPI CD/DVD. .It Li ahci-hd AHCI controller attached to a SATA hard-drive. .It Li uart PCI 16550 serial device. .It Li lpc LPC PCI-ISA bridge with COM1 and COM2 16550 serial ports. The LPC bridge emulation can only be configured on bus 0. .El .It Op Ar conf This optional parameter describes the backend for device emulations. If .Ar conf is not specified, the device emulation has no backend and can be considered unconnected. .Pp Network devices: .Bl -tag -width 10n .It Ar tapN Ns Op , Ns Ar mac=xx:xx:xx:xx:xx:xx .It Ar vmnetN Ns Op , Ns Ar mac=xx:xx:xx:xx:xx:xx .Pp If .Ar mac is not specified, the MAC address is derived from a fixed OUI and the remaining bytes from an MD5 hash of the slot and function numbers and the device name. .Pp The MAC address is an ASCII string in .Xr ethers 5 format. .El .Pp Block storage devices: .Bl -tag -width 10n .It Pa /filename Ns Oo , Ns Li nocache Oc Ns Oo , Ns Li direct Oc Ns Oo , Ns Li ro Oc .It Pa /dev/xxx Ns Oo , Ns Ar nocache Oc Ns Oo , Ns Ar direct Oc Ns Oo , Ns Ar ro Oc .Bl -tag -width 8n .It Li nocache Open the file with .Dv O_DIRECT . .It Li direct Open the file using .Dv O_SYNC . .It Li ro Force the file to be opened read-only. .El .Pp The .Li nocache , .Li direct , and .Li ro options are not available for virtio block devices. .El .Pp TTY devices: .Bl -tag -width 10n .It Li stdio Connect the serial port to the standard input and output of the bhyve process. .It Pa /dev/xxx Use the host TTY device for serial port I/O. .El .Pp Pass-through devices: .Bl -tag -width 10n .It Ns Ar slot Ns / Ns Ar bus Ns / Ns Ar function Connect to a PCI device on the host at the selector described by .Ar slot , .Ar bus , and .Ar function numbers. .El .Pp The host device must have been reserved at boot-time using the .Va pptdev loader variable as described in .Xr vmm 4 . .El .It Fl l Ar lpcdev Ns Op , Ns Ar conf Allow devices behind the LPC PCI-ISA bridge to be configured. The only supported devices are the TTY-class devices, .Li com1 and .Li com2 . .It Fl m Ar size Ns Op Ar K|k|M|m|G|g|T|t Guest physical memory size in bytes. This must be the same size that was given to .Xr bhyveload 8 . .Pp The size argument may be suffixed with one of K, M, G or T (either upper or lower case) to indicate a multiple of kilobytes, megabytes, gigabytes, or terabytes. If no suffix is given, the value is assumed to be in megabytes. .It Fl e Force .Nm to exit when a guest issues an access to an I/O port that is not emulated. This is intended for debug purposes. .It Fl w Ignore accesses to unimplemented Model Specific Registers (MSRs). This is intended for debug purposes. .It Fl x The guest's local APIC is configured in x2APIC mode. .It Fl Y Disable MPtable generation. .It Fl h Print help message and exit. .It Ar vmname Alphanumeric name of the guest. This should be the same as that created by .Xr bhyveload 8 . .El .Sh EXAMPLES The guest operating system must have been loaded with .Xr bhyveload 4 or a similar boot loader before .Xr bhyve 4 can be run. .Pp To run a virtual machine with 1GB of memory, two virtual CPUs, a virtio block device backed by the .Pa /my/image filesystem image, and a serial port for the console: .Bd -literal -offset indent bhyve -c 2 -s 0,hostbridge -s 1,lpc -s 2,virtio-blk,/my/image \\ -l com1,stdio -A -H -P -m 1G vm1 .Ed .Pp Run a 24GB single-CPU virtual machine with three network ports, one of which has a MAC address specified: .Bd -literal -offset indent bhyve -s 0,hostbridge -s 1,lpc -s 2:0,virtio-net,tap0 \\ -s 2:1,virtio-net,tap1 \\ -s 2:2,virtio-net,tap2,mac=00:be:fa:76:45:00 \\ -s 3,virtio-blk,/my/image -l com1,stdio \\ -A -H -P -m 24G bigvm .Ed .Pp Run an 8GB quad-CPU virtual machine with 8 AHCI SATA disks, an AHCI ATAPI CD-ROM, a single virtio network port, an AMD hostbridge, and the console port connected to an .Xr nmdm 4 null-model device. .Bd -literal -offset indent bhyve -c 4 \e\ -s 0,amd_hostbridge -s 1,lpc \\ -s 1:0,ahci-hd,/images/disk.1 \\ -s 1:1,ahci-hd,/images/disk.2 \\ -s 1:2,ahci-hd,/images/disk.3 \\ -s 1:3,ahci-hd,/images/disk.4 \\ -s 1:4,ahci-hd,/images/disk.5 \\ -s 1:5,ahci-hd,/images/disk.6 \\ -s 1:6,ahci-hd,/images/disk.7 \\ -s 1:7,ahci-hd,/images/disk.8 \\ -s 2,ahci-cd,/images.install.iso \\ -s 3,virtio-net,tap0 \\ -l com1,/dev/nmdm0A \\ -A -H -P -m 8G .Ed .Sh SEE ALSO .Xr bhyve 4 , .Xr nmdm 4 , .Xr vmm 4 , .Xr ethers 5 , .Xr bhyvectl 8 , .Xr bhyveload 8 .Sh HISTORY .Nm first appeared in .Fx 10.0 . .Sh AUTHORS -.An Neel Natu Aq neel@freebsd.org -.An Peter Grehan Aq grehan@freebsd.org +.An Neel Natu Aq Mt neel@freebsd.org +.An Peter Grehan Aq Mt grehan@freebsd.org Index: head/usr.sbin/bhyveload/bhyveload.8 =================================================================== --- head/usr.sbin/bhyveload/bhyveload.8 (revision 267667) +++ head/usr.sbin/bhyveload/bhyveload.8 (revision 267668) @@ -1,157 +1,157 @@ .\" .\" Copyright (c) 2012 NetApp Inc .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL 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 January 7, 2012 .Dt BHYVELOAD 8 .Os .Sh NAME .Nm bhyveload .Nd load a .Fx guest inside a bhyve virtual machine .Sh SYNOPSIS .Nm .Op Fl m Ar mem-size .Op Fl d Ar disk-path .Op Fl h Ar host-path .Op Fl e Ar name=value .Op Fl c Ar cons-dev .Ar vmname .Sh DESCRIPTION .Nm is used to load a .Fx guest inside a .Xr bhyve 4 virtual machine. .Pp .Nm is based on .Xr loader 8 and will present an interface identical to the .Fx loader on the user's terminal. .Pp The virtual machine is identified as .Ar vmname and will be created if it does not already exist. .Sh OPTIONS The following options are available: .Bl -tag -width indent .It Fl m Ar mem-size Xo .Sm off .Op Cm K | k | M | m | G | g | T | t .Xc .Sm on .Ar mem-size is the amount of memory allocated to the guest. .Pp The .Ar mem-size argument may be suffixed with one of .Cm K , .Cm M , .Cm G or .Cm T (either upper or lower case) to indicate a multiple of Kilobytes, Megabytes, Gigabytes or Terabytes respectively. .Pp The default value of .Ar mem-size is 256M. .It Fl d Ar disk-path The .Ar disk-path is the pathname of the guest's boot disk image. .It Fl h Ar host-path The .Ar host-path is the directory at the top of the guest's boot filesystem. .It Fl e Ar name=value Set the FreeBSD loader environment variable .Ar name to .Ar value . .Pp The option may be used more than once to set more than one environment variable. .It Fl c Ar cons-dev .Ar cons-dev is a .Xr tty 4 device to use for .Nm terminal I/O. .Pp The text string "stdio" is also accepted and selects the use of unbuffered standard I/O. This is the default value. .El .Sh EXAMPLES To create a virtual machine named .Ar freebsd-vm that boots off the ISO image .Pa /freebsd/release.iso and has 1GB memory allocated to it: .Pp .Dl "bhyveload -m 1G -d /freebsd/release.iso freebsd-vm" .Pp To create a virtual machine named .Ar test-vm with 256MB of memory allocated, the guest root filesystem under the host directory .Pa /user/images/test and terminal I/O sent to the .Xr nmdm 4 device .Pa /dev/nmdm1B .Pp .Dl "bhyveload -m 256MB -h /usr/images/test -c /dev/nmdm1B test-vm" .Sh SEE ALSO .Xr bhyve 4 , .Xr nmdm 4 , .Xr vmm 4 , .Xr bhyve 8 , .Xr loader 8 .Sh HISTORY .Nm first appeared in .Fx 10.0 , and was developed at NetApp Inc. .Sh AUTHORS .Nm was developed by .An -nosplit -.An "Neel Natu" Aq neel@FreeBSD.org +.An Neel Natu Aq Mt neel@FreeBSD.org at NetApp Inc with a lot of help from -.An Doug Rabson Aq dfr@FreeBSD.org +.An Doug Rabson Aq Mt dfr@FreeBSD.org . .Sh BUGS .Nm can only load .Fx as a guest. Index: head/usr.sbin/bluetooth/ath3kfw/ath3kfw.8 =================================================================== --- head/usr.sbin/bluetooth/ath3kfw/ath3kfw.8 (revision 267667) +++ head/usr.sbin/bluetooth/ath3kfw/ath3kfw.8 (revision 267668) @@ -1,78 +1,78 @@ .\" Copyright (c) 2010 Maksim Yevmenkin .\" 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 9, 2010 .Dt ATH3KFW 8 .Os .Sh NAME .Nm ath3kfw .Nd firmware download utility for Atheros AR3011 chip based Bluetooth USB devices .Sh SYNOPSIS .Nm .Fl d Ar device_name .Fl f Ar firmware_file_name .Nm .Fl h .Sh DESCRIPTION The .Nm utility downloads the specified firmware file to the specified .Xr ugen 4 device. .Pp This utility will .Em only work with Atheros AR3011 chip based Bluetooth USB devices. The identification is currently based on USB vendor ID/product ID pair. The vendor ID should be 0x0cf3 .Pq Dv USB_VENDOR_ATHEROS2 and the product ID should be 0x3000. .Pp Firmware files ath3k-1.fw and ath3k-2.fw can be obtained from the linux-firmware RPM. .Pp The options are as follows: .Bl -tag -width indent .It Fl d Ar device_name Specify .Xr ugen 4 device name. .It Fl f Ar firmware_file_name Specify firmware file name for download. .It Fl h Display usage message and exit. .El .Sh EXIT STATUS .Ex -std .Sh SEE ALSO .Xr libusb 3 , .Xr ugen 4 , .Xr devd 8 .Sh AUTHORS -.An Maksim Yevmenkin Aq m_evmenkin@yahoo.com +.An Maksim Yevmenkin Aq Mt m_evmenkin@yahoo.com .Sh BUGS Most likely. Please report if found. Index: head/usr.sbin/bluetooth/bcmfw/bcmfw.8 =================================================================== --- head/usr.sbin/bluetooth/bcmfw/bcmfw.8 (revision 267667) +++ head/usr.sbin/bluetooth/bcmfw/bcmfw.8 (revision 267668) @@ -1,105 +1,105 @@ .\" Copyright (c) 2003 Maksim Yevmenkin .\" 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. .\" .\" $Id: bcmfw.8,v 1.7 2003/05/21 00:33:40 max Exp $ .\" $FreeBSD$ .\" .Dd March 31, 2003 .Dt BCMFW 8 .Os .Sh NAME .Nm bcmfw .Nd firmware download utility for Broadcom BCM2033 chip based Bluetooth USB devices .Sh SYNOPSIS .Nm .Op Fl h .Fl f Ar firmware_file_name .Fl m Ar mini-driver_file_name .Fl n Ar device_name .Sh DESCRIPTION The .Nm utility downloads the specified mini-driver and firmware files to the specified device. .Pp This utility will .Em only work with Broadcom BCM2033 chip based Bluetooth USB devices. The identification is currently based on USB vendor ID/product ID pair. The vendor ID should be 0x0a5c .Pq Dv USB_VENDOR_BROADCOM and the product ID should be 0x2033. .Pp Due to copyright issues I will no longer provide mini-driver and firmware files for the device. These files can be obtained from the Linux BlueZ bluez-firmware package. .Pp Visit .Pa http://www.bluez.org/download.html for details. .Pp I am using the following files from the bluez-firmware-1.0 package: .Pp .Dl "MD5 (BCM2033-MD.hex) = 5580317158d07fc4ace90af04f8e1c73" .Dl "MD5 (BCM2033-FW.bin) = b4e142b3272cfe5a84b32fda6b4b032f" .Pp The options are as follows: .Bl -tag -width indent .It Fl f Ar firmware_file_name Specify firmware file name for download. .It Fl h Display usage message and exit. .It Fl m Ar mini-driver_file_name Specify mini-driver file name for download. .It Fl n Ar device_name Specify device name. .El .Sh FILES .Bl -tag -width ".Pa /dev/ubtbcmfw Ns Ar N Ns Pa \&. Ns Ar EE" -compact .It Pa BCM2033-MD.hex Mini-driver image. .It Pa BCM2033-FW.bin Firmware image. .It Pa /dev/ubtbcmfw Ns Ar N Ns Pa \&. Ns Ar EE Endpoint .Ar EE of device .Ar N . .El .Sh EXIT STATUS .Ex -std .Sh EXAMPLES To download the firmware into the .Pa /dev/ubtbcmfw0 device: .Pp .Dl "bcmfw -n ubtbcmfw0 -m BCM2033-MD.hex -f BCM2033-FW.bin" .Sh SEE ALSO .Xr ubtbcmfw 4 , .Xr ugen 4 .Sh AUTHORS -.An Maksim Yevmenkin Aq m_evmenkin@yahoo.com +.An Maksim Yevmenkin Aq Mt m_evmenkin@yahoo.com .Sh BUGS Most likely. Please report if found. Index: head/usr.sbin/bluetooth/bt3cfw/bt3cfw.8 =================================================================== --- head/usr.sbin/bluetooth/bt3cfw/bt3cfw.8 (revision 267667) +++ head/usr.sbin/bluetooth/bt3cfw/bt3cfw.8 (revision 267668) @@ -1,73 +1,73 @@ .\" Copyright (c) 2001-2002 Maksim Yevmenkin .\" 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. .\" .\" $Id: bt3cfw.8,v 1.4 2003/05/21 00:34:51 max Exp $ .\" $FreeBSD$ .\" .Dd November 11, 2002 .Dt BT3CFW 8 .Os .Sh NAME .Nm bt3cfw .Nd firmware download utility for 3Com Bluetooth PC card driver .Sh SYNOPSIS .Nm .Op Fl h .Fl f Ar Firmware_file_name .Fl n Ar Netgraph_node_name .Sh DESCRIPTION The .Nm utility connects to the specified Netgraph driver node of type .Dv BTCCC and downloads the specified firmware file. .Pp Due to copyright issues, I will no longer provide firmware with the card driver. The firmware can be obtained from the Windows driver package that can be downloaded from the 3COM web site at no charge. The firmware name is .Pa BT3CPCC.BIN . I am using the original firmware that came with the card on CD-ROM. .Pp .Dl "MD5 (BT3CPCC.BIN) = 36170fda56ea9fdbf1702c966f8a97f1" .Pp The options are as follows: .Bl -tag -width indent .It Fl f Ar Firmware_file_name Specify firmware file name for download. .It Fl h Display usage message and exit. .It Fl n Ar Netgraph_node_name Connect to the specified Netgraph driver node of type .Dv BTCCC . .El .Sh EXIT STATUS .Ex -std .Sh SEE ALSO .Xr ng_bt3c 4 .Sh AUTHORS -.An Maksim Yevmenkin Aq m_evmenkin@yahoo.com +.An Maksim Yevmenkin Aq Mt m_evmenkin@yahoo.com .Sh BUGS Please report if found. Index: head/usr.sbin/bluetooth/bthidcontrol/bthidcontrol.8 =================================================================== --- head/usr.sbin/bluetooth/bthidcontrol/bthidcontrol.8 (revision 267667) +++ head/usr.sbin/bluetooth/bthidcontrol/bthidcontrol.8 (revision 267668) @@ -1,102 +1,102 @@ .\" Copyright (c) 2004 Maksim Yevmenkin .\" 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. .\" .\" $Id: bthidcontrol.8,v 1.1 2004/02/13 21:44:41 max Exp $ .\" $FreeBSD$ .\" .Dd October 30, 2006 .Dt BTHIDCONTROL 8 .Os .Sh NAME .Nm bthidcontrol .Nd Bluetooth HID control utility .Sh SYNOPSIS .Nm .Fl h .Nm .Op Fl a Ar BD_ADDR .Op Fl c Ar file .Op Fl H Ar file .Op Fl v .Ar command .Sh DESCRIPTION The .Nm utility can be used to query remote Bluetooth HID devices, dump HID descriptors in human readable form and perform simple manipulations on the Bluetooth HID daemon configuration files. .Pp The .Nm utility will print results to the standard output and error messages to the standard error. .Pp The options are as follows: .Bl -tag -width indent .It Fl a Ar BD_ADDR Specify BD_ADDR for the HID device. Example: .Fl a Li 00:01:02:03:04:05 . .It Fl c Ar file Specify path to the Bluetooth HID daemon configuration file. The default path is .Pa /etc/bluetooth/bthidd.conf . .It Fl H Ar file Specify path to the Bluetooth HID daemon known HIDs file. The default path is .Pa /var/db/bthidd.hids . .It Fl h Display usage message and exit. .It Fl v Be verbose and show items that are being used for padding. .It Ar command One of the supported commands (see below). Special command .Cm help can be used to obtain the list of all supported commands. To get more information about specific command use .Cm help Ar command . .El .Sh COMMANDS The currently supported node commands in .Nm are: .Pp .Bl -tag -width "Forget" -offset indent -compact .It Cm Query .It Cm Dump .It Cm Known .It Cm Forget .El .Sh FILES .Bl -tag -width ".Pa /etc/bluetooth/bthidd.conf" -compact .It Pa /etc/bluetooth/bthidd.conf .It Pa /var/db/bthidd.hids .El .Sh EXIT STATUS .Ex -std .Sh SEE ALSO .Xr bthidd 8 .Sh AUTHORS -.An Maksim Yevmenkin Aq m_evmenkin@yahoo.com +.An Maksim Yevmenkin Aq Mt m_evmenkin@yahoo.com Index: head/usr.sbin/bluetooth/bthidd/bthidd.8 =================================================================== --- head/usr.sbin/bluetooth/bthidd/bthidd.8 (revision 267667) +++ head/usr.sbin/bluetooth/bthidd/bthidd.8 (revision 267668) @@ -1,127 +1,127 @@ .\" Copyright (c) 2006 Maksim Yevmenkin .\" 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. .\" .\" $Id: bthidd.8,v 1.1 2006/09/07 21:36:55 max Exp $ .\" $FreeBSD$ .\" .Dd September 7, 2006 .Dt BTHIDD 8 .Os .Sh NAME .Nm bthidd .Nd Bluetooth HID daemon .Sh SYNOPSIS .Nm .Fl h .Nm .Op Fl a Ar BD_ADDR .Op Fl c Ar file .Op Fl H Ar file .Op Fl p Ar file .Op Fl t Ar val .Sh DESCRIPTION The .Nm daemon handles remote Bluetooth HID devices. .Pp The options are as follows: .Bl -tag -width indent .It Fl a Ar BD_ADDR Specify the local address to listen on. By default, the server will listen on .Dv ANY address. The address can be specified as BD_ADDR or name. If a name was specified, the .Nm daemon will attempt to resolve the name via .Xr bt_gethostbyname 3 . .It Fl c Ar file Specify path to the configuration file. The default path is .Pa /etc/bluetooth/bthidd.conf . .It Fl d Do not detach from the controlling terminal, i.e., run in foreground. .It Fl H Ar file Specify path to the known HIDs file. The default path is .Pa /var/db/bthidd.hids . .It Fl h Display usage message and exit. .It Fl p Ar file Specify path to the PID file. The default path is .Pa /var/run/bthidd.pid . .It Fl t Ar val Specify client rescan interval in seconds. The .Nm daemon will periodically scan for newly configured Bluetooth HID devices or disconnected .Dq passive Bluetooth HID devices and will attempt to establish an outgoing connection. The default rescan interval is 10 seconds. .El .Sh KNOWN LIMITATIONS The .Nm daemon currently does not handle key auto repeat and double click mouse events. Those events work under .Xr X 7 just fine, but not in text console. .Pp This manual page needs more work. A manual page documenting the format of the .Pa /etc/bluetooth/bthidd.conf configuration file is needed as well. .Sh FILES .Bl -tag -width ".Pa /etc/bluetooth/bthidd.conf" -compact .It Pa /etc/bluetooth/bthidd.conf .It Pa /var/db/bthidd.hids .It Pa /var/run/bthidd.pid .El .Sh SEE ALSO .Xr kbdmux 4 , .Xr vkbd 4 , .Xr bthidcontrol 8 .Sh AUTHORS -.An Maksim Yevmenkin Aq m_evmenkin@yahoo.com +.An Maksim Yevmenkin Aq Mt m_evmenkin@yahoo.com .Sh CAVEATS Any Bluetooth HID device that has .Dv HUP_KEYBOARD or .Dv HUP_CONSUMER entries in its descriptor is considered as .Dq keyboard . For each .Dq keyboard Bluetooth HID device, the .Nm daemon will use a separate instance of the virtual keyboard interface .Xr vkbd 4 . Therefore the .Xr kbdmux 4 driver must be used to properly multiplex input from multiple keyboards. Index: head/usr.sbin/bluetooth/hccontrol/hccontrol.8 =================================================================== --- head/usr.sbin/bluetooth/hccontrol/hccontrol.8 (revision 267667) +++ head/usr.sbin/bluetooth/hccontrol/hccontrol.8 (revision 267668) @@ -1,184 +1,184 @@ .\" Copyright (c) 2001-2002 Maksim Yevmenkin .\" 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. .\" .\" $Id: hccontrol.8,v 1.6 2003/08/06 21:26:38 max Exp $ .\" $FreeBSD$ .\" .Dd June 14, 2002 .Dt HCCONTROL 8 .Os .Sh NAME .Nm hccontrol .Nd HCI configuration utility .Sh SYNOPSIS .Nm .Op Fl hN .Op Fl n Ar HCI_node_name .Ar command .Op Ar parameters ... .Sh DESCRIPTION The .Nm utility connects to the specified Netgraph node of type .Dv HCI or the first one found if none is specified and attempts to send the specified command to the HCI Netgraph node or to the associated Bluetooth device. The .Nm utility will print results to the standard output and error messages to the standard error. .Pp The options are as follows: .Bl -tag -width indent .It Fl h Display usage message and exit. .It Fl N Show Bluetooth addresses as numbers. Normally .Nm attempts to resolve Bluetooth addresses, and display them symbolically. .It Fl n Ar HCI_node_name Connect to the specified HCI Netgraph node. .It Ar command One of the supported commands (see below). The special command .Cm help can be used to obtain the list of all supported commands. To get more information about a specific command use .Cm help Ar command . .It Ar parameters One or more optional space separated command parameters. Many commands require a remote device address as one of the parameters. The remote device address can be specified as BD_ADDR or a name. If a name was specified then the .Nm utility will attempt to resolve the name via .Xr bt_gethostbyname 3 . .El .Sh COMMANDS The currently supported HCI commands in .Nm are: .Pp .Bl -tag -width 40n -offset indent -compact .It Cm Inquiry .It Cm Create_Connection .It Cm Disconnect .It Cm Add_SCO_Connection .It Cm Change_Connection_Packet_Type .It Cm Remote_Name_Request .It Cm Read_Remote_Supported_Features .It Cm Read_Remote_Version_Information .It Cm Read_Clock_Offset .It Cm Role_Discovery .It Cm Switch_Role .It Cm Read_Link_Policy_Settings .It Cm Write_Link_Policy_Settings .It Cm Reset .It Cm Read_Pin_Type .It Cm Write_Pin_Type .It Cm Read_Stored_Link_Key .It Cm Write_Stored_Link_Key .It Cm Delete_Stored_Link_Key .It Cm Change_Local_Name .It Cm Read_Local_Name .It Cm Read_Connection_Accept_Timeout .It Cm Write_Connection_Accept_Timeout .It Cm Read_Page_Timeout .It Cm Write_Page_Timeout .It Cm Read_Scan_Enable .It Cm Write_Scan_Enable .It Cm Read_Page_Scan_Activity .It Cm Write_Page_Scan_Activity .It Cm Read_Inquiry_Scan_Activity .It Cm Write_Inquiry_Scan_Activity .It Cm Read_Authentication_Enable .It Cm Write_Authentication_Enable .It Cm Read_Encryption_Mode .It Cm Write_Encryption_Mode .It Cm Read_Class_Of_Device .It Cm Write_Class_Of_Device .It Cm Read_Voice_Settings .It Cm Write_Voice_Settings .It Cm Read_Number_Broadcast_Retransmissions .It Cm Write_Number_Broadcast_Retransmissions .It Cm Read_Hold_Mode_Activity .It Cm Write_Hold_Mode_Activity .It Cm Read_SCO_Flow_Control_Enable .It Cm Write_SCO_Flow_Control_Enable .It Cm Read_Link_Supervision_Timeout .It Cm Write_Link_Supervision_Timeout .It Cm Read_Page_Scan_Period_Mode .It Cm Write_Page_Scan_Period_Mode .It Cm Read_Page_Scan_Mode .It Cm Write_Page_Scan_Mode .It Cm Read_Local_Version_Information .It Cm Read_Local_Supported_Features .It Cm Read_Buffer_Size .It Cm Read_Country_Code .It Cm Read_BD_ADDR .It Cm Read_Failed_Contact_Counter .It Cm Reset_Failed_Contact_Counter .It Cm Get_Link_Quality .It Cm Read_RSSI .El .Pp The currently supported node commands in .Nm are: .Pp .Bl -tag -width 40n -offset indent -compact .It Cm Read_Node_State .It Cm Initialize .It Cm Read_Debug_Level .It Cm Write_Debug_Level .It Cm Read_Node_Buffer_Size .It Cm Read_Node_BD_ADDR .It Cm Read_Node_Features .It Cm Read_Node_Stat .It Cm Reset_Node_Stat .It Cm Flush_Neighbor_Cache .It Cm Read_Neighbor_Cache .It Cm Read_Connection_List .It Cm Read_Node_Link_Policy_Settings_Mask .It Cm Write_Node_Link_Policy_Settings_Mask .It Cm Read_Node_Packet_Mask .It Cm Write_Node_Packet_Mask .It Cm Read_Node_Role_Switch .It Cm Write_Node_Role_Switch .It Cm Read_Node_List .El .Sh EXIT STATUS .Ex -std .Sh SEE ALSO .Xr bluetooth 3 , .Xr netgraph 3 , .Xr netgraph 4 , .Xr ng_hci 4 , .Xr hcseriald 8 .Sh AUTHORS -.An Maksim Yevmenkin Aq m_evmenkin@yahoo.com +.An Maksim Yevmenkin Aq Mt m_evmenkin@yahoo.com .Sh BUGS Most likely. Please report if found. Index: head/usr.sbin/bluetooth/hcsecd/hcsecd.8 =================================================================== --- head/usr.sbin/bluetooth/hcsecd/hcsecd.8 (revision 267667) +++ head/usr.sbin/bluetooth/hcsecd/hcsecd.8 (revision 267668) @@ -1,128 +1,128 @@ .\" Copyright (c) 2001-2002 Maksim Yevmenkin .\" 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. .\" .\" $Id: hcsecd.8,v 1.8 2003/09/08 18:54:20 max Exp $ .\" $FreeBSD$ .\" .Dd November 16, 2002 .Dt HCSECD 8 .Os .Sh NAME .Nm hcsecd .Nd control link keys and PIN codes for Bluetooth devices .Sh SYNOPSIS .Nm .Op Fl dh .Fl f Ar configfile .Sh DESCRIPTION The .Nm daemon controls link keys and PIN codes for Bluetooth devices. It opens a raw HCI socket and listens for .Dv Link_Key_Request , .Dv PIN_Code_Request and .Dv Link_Key_Notification HCI events. .Pp Once a .Dv Link_Key_Request or .Dv PIN_Code_Request HCI event is received, the daemon scans the configuration file for a matching entry. The remote device BD_ADDR is used as a key. If no matching entry was found, the default entry will be used. If no default entry was found then it is assumed that no link key and no PIN code exists. For any given entry, the link key takes precedence over the PIN code. If a link key was not specified, the device must generate the link key from the PIN code. If an entry was found and the link key (or PIN code) exists, the .Dv Link_Key_Request_Reply (or .Dv PIN_Code_Request_Reply ) command will be sent back to the device. Otherwise, the .Dv Link_Key_Request_Negative_Reply (or .Dv PIN_Code_Request_Negative_Reply ) command will be sent back to the device. .Pp The .Nm daemon also handles HCI .Dv Link_Key_Notification events and caches link keys created from the PIN codes in memory. To preserve link keys between restarts the .Nm daemon dumps link keys for all entries in the .Pa /var/db/hcsecd.keys link keys file. If it exists, the link keys file gets processed by the .Nm daemon after it processes its main configuration file. The link keys file gets written every time the .Nm daemon shuts down gracefully. It is possible to force the .Nm daemon to re-read its main configuration file and dump the link keys file by sending the .Dv HUP signal to the .Nm process. The user is expected to not modify the link keys file by hand. .Pp The command line options are as follows: .Bl -tag -width indent .It Fl d Do not detach from the controlling terminal. .It Fl f Ar configfile Specify the name of the configuration file. The default is .Pa /etc/bluetooth/hcsecd.conf . .It Fl h Display usage message and exit. .El .Sh FILES .Bl -tag -width ".Pa /etc/bluetooth/hcsecd.conf" -compact .It Pa /etc/bluetooth/hcsecd.conf .It Pa /var/db/hcsecd.keys .It Pa /var/run/hcsecd.pid .El .Sh SEE ALSO .Xr ng_btsocket 4 , .Xr ng_hci 4 , .Xr hcsecd.conf 5 , .Xr hccontrol 8 , .Xr hcseriald 8 .Sh AUTHORS -.An Maksim Yevmenkin Aq m_evmenkin@yahoo.com +.An Maksim Yevmenkin Aq Mt m_evmenkin@yahoo.com .Sh BUGS Currently there is no way to select the link key or the PIN code based on which local device received the request. Everything is based on the remote device BD_ADDR. An interface for external helpers to obtain link keys and PIN codes is missing. Index: head/usr.sbin/bluetooth/hcsecd/hcsecd.conf.5 =================================================================== --- head/usr.sbin/bluetooth/hcsecd/hcsecd.conf.5 (revision 267667) +++ head/usr.sbin/bluetooth/hcsecd/hcsecd.conf.5 (revision 267668) @@ -1,131 +1,131 @@ .\" Copyright (c) 2001-2002 Maksim Yevmenkin .\" 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. .\" .\" $Id: hcsecd.conf.5,v 1.1 2003/05/26 22:49:23 max Exp $ .\" $FreeBSD$ .\" .Dd May 26, 2003 .Dt HCSECD.CONF 5 .Os .Sh NAME .Nm hcsecd.conf .Nd .Xr hcsecd 8 configuration file .Sh DESCRIPTION The .Nm file is the configuration file for the .Xr hcsecd 8 Bluetooth link keys/PIN codes management daemon. .Pp The .Nm file is a free-form .Tn ASCII text file. It is parsed by the recursive-descent parser built into .Xr hcsecd 8 . The file may contain extra tabs and newlines for formatting purposes. Keywords in the file are case-sensitive. Comments may be placed anywhere within the file (except within quotes). Comments begin with the .Ql # character and end at the end of the line. .Sh FILE FORMAT The .Nm file consists of a list of .Cm device entries. Each .Cm device entry defines a link key or PIN code for a remote Bluetooth device. Each remote Bluetooth device is identified by its unique BD_ADDR. .Pp The .Cm device entry .Pp .Cm device { .Cm option Ar argument ; .Oo .Cm option Ar argument ; .Oc } .Pp The following section describes all supported options and arguments. .Bl -tag -width indent .It Cm bdaddr Ar BD_ADDR Specify remote device BD_ADDR for the entry. .It Cm name Ar device_name Specify user friendly name for the entry. Name is a string in straight double quotes. .It Cm key Ar link_key Specify link key for the entry. Link key is hexadecimal string up to 32 characters in length starting with .Ql 0x . .It Cm key nokey Specify no link key for the entry. .It Cm pin Ar PIN_code Specify PIN code for the entry. PIN code is a string up to 16 characters in length in straight double quotes. .It Cm pin nopin Specify no PIN code for the entry. .El .Sh EXAMPLES A sample .Nm file: .Bd -literal # Default entry is applied if no better match found # It MUST have 00:00:00:00:00:00 as bdaddr device { bdaddr 00:00:00:00:00:00; name "Default entry"; key nokey; pin nopin; } # Ericsson T68 phone device { bdaddr 00:80:37:5e:4d:d4; name "Ericsson T68 phone"; key nokey; pin "0000"; # PIN code } # Dummy device device { bdaddr 00:11:22:33:44:55; name "Dummy"; key 0x00112233445566778899aabbccddeeff; # 16 bytes key pin nopin; } .Ed .Sh SEE ALSO .Xr hcsecd 8 .Sh AUTHORS -.An Maksim Yevmenkin Aq m_evmenkin@yahoo.com +.An Maksim Yevmenkin Aq Mt m_evmenkin@yahoo.com Index: head/usr.sbin/bluetooth/hcseriald/hcseriald.8 =================================================================== --- head/usr.sbin/bluetooth/hcseriald/hcseriald.8 (revision 267667) +++ head/usr.sbin/bluetooth/hcseriald/hcseriald.8 (revision 267668) @@ -1,86 +1,86 @@ .\" Copyright (c) 2001-2002 Maksim Yevmenkin .\" 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. .\" .\" $Id: hcseriald.8,v 1.3 2003/05/21 00:47:26 max Exp $ .\" $FreeBSD$ .\" .Dd June 14, 2002 .Dt HCSERIALD 8 .Os .Sh NAME .Nm hcseriald .Nd supervise serial Bluetooth devices .Sh SYNOPSIS .Nm .Op Fl dh .Fl f Ar device .Fl n Ar node_name .Op Fl s Ar speed .Sh DESCRIPTION The .Nm utility handles serial Bluetooth devices. It does one simple thing: it opens the specified serial device, sets the device parameters, and pushes the .Dv H4 line discipline. .Pp The options are as follows: .Bl -tag -width indent .It Fl d Do not disassociate from the controlling terminal, i.e., run in foreground. .It Fl f Ar device Callout device name. Example: .Fl f Pa /dev/cuau0 . .It Fl h Display usage message and exit. .It Fl n Ar node_name Set H4 Netgraph node name. Example: .Fl n Li sio0 . .It Fl s Ar speed Set serial device speed to .Ar speed . Example: .Fl s Li 115200 . .El .Sh FILES .Bl -tag -width ".Pa /var/run/hcserial. Ns Ar * Ns Pa .pid" -compact .It Pa /var/run/hcserial. Ns Ar * Ns Pa .pid Process ID of the currently running .Nm daemon. Where .Ar * is an H4 Netgraph node name. .El .Sh SEE ALSO .Xr ng_h4 4 , .Xr ng_hci 4 , .Xr tty 4 , .Xr hccontrol 8 .Sh AUTHORS -.An Maksim Yevmenkin Aq m_evmenkin@yahoo.com +.An Maksim Yevmenkin Aq Mt m_evmenkin@yahoo.com Index: head/usr.sbin/bluetooth/l2control/l2control.8 =================================================================== --- head/usr.sbin/bluetooth/l2control/l2control.8 (revision 267667) +++ head/usr.sbin/bluetooth/l2control/l2control.8 (revision 267668) @@ -1,97 +1,97 @@ .\" Copyright (c) 2001-2002 Maksim Yevmenkin .\" 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. .\" .\" $Id: l2control.8,v 1.5 2003/05/21 00:53:00 max Exp $ .\" $FreeBSD$ .\" .Dd April 9, 2011 .Dt L2CONTROL 8 .Os .Sh NAME .Nm l2control .Nd L2CAP configuration utility .Sh SYNOPSIS .Nm .Op Fl hn .Fl a Ar local .Ar command .Op Ar parameters ... .Sh DESCRIPTION The .Nm utility connects to the local device with the specified BD_ADDR or name and attempts to send the specified command. The .Nm utility will print results to the standard output and error messages to the standard error output. .Pp The options are as follows: .Bl -tag -width indent .It Fl a Ar local Connect to the local device with the specified BD_ADDR or name. Example: .Fl a Li 00:01:02:03:04:05 or .Fl a Li bt_device . .It Fl h Display usage message and exit. .It Fl n Show Bluetooth addresses as numbers. Normally .Nm attempts to resolve Bluetooth addresses, and display them symbolically. .It Ar command One of the supported commands (see below). The special command .Cm help can be used to obtain a list of all supported commands. To get more information about a specific command use .Cm help Ar command . .It Ar parameters One or more optional space separated command parameters. .El .Sh COMMANDS The currently supported node commands in .Nm are: .Pp .Bl -tag -width "Write_Auto_Disconnect_Timeout" -offset indent -compact .It Cm Read_Node_Flags .It Cm Read_Debug_Level .It Cm Write_Debug_Level .It Cm Read_Connection_List .It Cm Read_Channel_List .It Cm Read_Auto_Disconnect_Timeout .It Cm Write_Auto_Disconnect_Timeout .El .Sh EXIT STATUS .Ex -std .Sh SEE ALSO .Xr netgraph 3 , .Xr netgraph 4 , .Xr ng_l2cap 4 , .Xr l2ping 8 .Sh AUTHORS -.An Maksim Yevmenkin Aq emax@FreeBSD.org +.An Maksim Yevmenkin Aq Mt emax@FreeBSD.org Index: head/usr.sbin/bluetooth/l2ping/l2ping.8 =================================================================== --- head/usr.sbin/bluetooth/l2ping/l2ping.8 (revision 267667) +++ head/usr.sbin/bluetooth/l2ping/l2ping.8 (revision 267668) @@ -1,114 +1,114 @@ .\" Copyright (c) 2001-2002 Maksim Yevmenkin .\" 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. .\" .\" $Id: l2ping.8,v 1.3 2003/05/21 01:00:19 max Exp $ .\" $FreeBSD$ .\" .Dd March 29, 2011 .Dt L2PING 8 .Os .Sh NAME .Nm l2ping .Nd send L2CAP ECHO_REQUEST to remote devices .Sh SYNOPSIS .Nm .Op Fl fhn .Fl a Ar remote .Op Fl c Ar count .Op Fl i Ar wait .Op Fl S Ar source .Op Fl s Ar size .Sh DESCRIPTION The .Nm utility uses L2CAP .Dv ECHO_REQUEST datagram to elicit an L2CAP .Dv ECHO_RESPONSE datagram from a remote device. .Pp The options are as follows: .Bl -tag -width indent .It Fl a Ar remote Specify the remote device to ping. The remote device can be specified by either its BD_ADDR or name. If name was specified then the .Nm utility will attempt to resolve the name via .Xr bt_gethostbyname 3 . .It Fl c Ar count Number of packets to send. If this option is not specified, .Nm will operate until interrupted. .It Fl f Do not wait between sending each packet. .It Fl h Display usage message and exit. .It Fl i Ar wait Wait .Ar wait seconds between sending each packet. The default is to wait for one second between each packet. This option is ignored if .Fl f has been specified. .It Fl n Numeric output only. No attempt will be made to look up symbolic names for host addresses. .It Fl S Ar source Specify the local device which should be used to send L2CAP .Dv ECHO_REQUEST datagrams. The local device can be specified by either its BD_ADDR or name. If name was specified then the .Nm utility will attempt to resolve the name via .Xr bt_gethostbyname 3 . .It Fl s Ar size Specify the number of payload bytes to be sent. The default size is 44 bytes. It is calculated as minimum L2CAP MTU (48 bytes) minus the size of the L2CAP signalling command header (4 bytes). The maximum size is 65531 bytes. Is is calculated as maximum L2CAP MTU (65535 bytes) minus four bytes of payload reserved for .Nm internal use. Use this option with caution. Some implementations may not like large sizes and may hang or even crash. .El .Sh EXIT STATUS .Ex -std .Sh SEE ALSO .Xr bluetooth 3 , .Xr netgraph 3 , .Xr netgraph 4 , .Xr ng_l2cap 4 , .Xr l2control 8 .Sh AUTHORS -.An Maksim Yevmenkin Aq emax@FreeBSD.org +.An Maksim Yevmenkin Aq Mt emax@FreeBSD.org .Sh BUGS Could collect more statistic. Could check for duplicated, corrupted and lost packets. Index: head/usr.sbin/bluetooth/rfcomm_pppd/rfcomm_pppd.8 =================================================================== --- head/usr.sbin/bluetooth/rfcomm_pppd/rfcomm_pppd.8 (revision 267667) +++ head/usr.sbin/bluetooth/rfcomm_pppd/rfcomm_pppd.8 (revision 267668) @@ -1,354 +1,354 @@ .\" Copyright (c) 2001-2003 Maksim Yevmenkin .\" 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. .\" .\" $Id: rfcomm_pppd.8,v 1.7 2003/09/07 18:32:11 max Exp $ .\" $FreeBSD$ .\" .Dd February 4, 2003 .Dt RFCOMM_PPPD 8 .Os .Sh NAME .Nm rfcomm_pppd .Nd RFCOMM PPP daemon .Sh SYNOPSIS .Nm .Fl c .Op Fl dh .Fl a Ar address .Fl C Ar channel .Fl l Ar label .Fl u Ar N .Nm .Fl s .Op Fl dDhS .Op Fl a Ar address .Fl C Ar channel .Fl l Ar label .Sh DESCRIPTION The .Nm daemon is a simple wrapper daemon that allows the use of .Xr ppp 8 via an RFCOMM connection. It can operate in two modes: client and server. .Pp In client mode, .Nm opens an RFCOMM connection to the specified server's .Ar BD_ADRR and .Ar channel . Once the RFCOMM connection is established, .Nm executes .Xr ppp 8 in .Fl direct mode with the specified .Ar label . Likewise, .Xr ppp 8 operates over the RFCOMM connection just like it would over a standard serial port, thus allowing a user to .Dq "dial out" and connect to the Internet. .Pp In server mode, .Nm opens an RFCOMM socket and listens for incoming connections from remote clients. Once the new incoming connection is accepted, .Nm forks and executes .Xr ppp 8 in .Fl direct mode with the specified .Ar label . Likewise, .Xr ppp 8 operates over the RFCOMM connection just like it would over a standard serial port, thus providing network connectivity to remote clients. .Pp The options are as follows: .Bl -tag -width indent .It Fl a Ar address In client mode, this required option specifies the address of the remote RFCOMM server. In server mode, this option can be used to specify the local address to listen on. By default, in server mode, the daemon will listen on .Dv ANY address. The address can be specified as BD_ADDR or name. If a name was specified, the .Nm utility will attempt to resolve the name via .Xr bt_gethostbyname 3 . .It Fl C Ar channel In both client and server mode, this required option specifies the RFCOMM channel to connect to or listen on. In server mode, the channel should be a number between 1 and 30. In client mode, the channel could either be a number between 1 and 30 or a service name. Supported service names are: .Cm DUN (Dial-Up Networking) and .Cm LAN (LAN Access Using PPP). If a service name is used instead of a numeric channel number, then .Nm will try to obtain an RFCOMM channel number via SDP (Service Discovery Protocol). .It Fl c Act as an RFCOMM client. This is the default mode. .It Fl d Do not detach from the controlling terminal, i.e., run in foreground. .It Fl D In server mode, register the .Cm DUN (Dial-Up Networking) service in addition to the .Cm LAN (LAN Access Using PPP) service. AT-command exchange can be faked with .Xr ppp 8 chat script. .It Fl h Display usage message and exit. .It Fl l Ar label In both client and server mode, this required option specifies which .Xr ppp 8 label will be used. .It Fl S In server mode, register the .Cm SP (Serial Port) service in addition to the .Cm LAN (LAN Access Using PPP) service. .Pp It appears that some cell phones are using the so-called .Dq "callback mechanism" . In this scenario, the user is trying to connect his cell phone to the Internet, while the user's host computer is acting as the gateway server. It seems that it is not possible to tell the phone to just connect and start using the .Cm LAN service. Instead, the user's host computer must .Dq "jump start" the phone by connecting to the phone's .Cm SP service. What happens next is the phone kills the existing connection and opens another connection back to the user's host computer. The phone really wants to use the .Cm LAN service, but for whatever reason it looks for the .Cm SP service on the user's host computer. This brain-damaged behavior was reported for the Nokia 6600 and the Sony/Ericsson P900. .It Fl s Act as an RFCOMM server. .It Fl u Ar N This option maps directly to the .Fl unit .Xr ppp 8 command-line option and tells .Nm to instruct .Xr ppp 8 to only attempt to open .Pa /dev/tun Ns Ar N . This option only works in client mode. .El .Sh PPP CONFIGURATION .Ss Important Notes on PPP Configuration Special attention is required when adding new RFCOMM configurations to the existing PPP configuration. Please keep in mind that PPP will .Em always execute commands in the .Dq Li default label of your .Pa /etc/ppp/ppp.conf file. Please make sure that the .Dq Li default label .Em only contains commands that apply to .Em every other label. If you need to use PPP for both dialing out and accepting incoming RFCOMM connections, please make sure you have moved all commands related to dialing out from the .Dq Li default section into an appropriate outgoing label. .Ss RFCOMM Server One of the typical examples is the LAN access. In this example, an RFCOMM connection is used as a null-modem connection between a client and a server. Both client and server will start talking PPP right after the RFCOMM connection has been established. .Bd -literal -offset indent rfcomm-server: set timeout 0 set lqrperiod 10 set ifaddr 10.0.0.1 10.0.0.2 255.255.255.0 enable lqr accept lqr accept dns # Do not use PPP authentication. Assume that # Bluetooth connection was authenticated already disable pap deny pap disable chap deny chap .Ed .Ss RFCOMM Client The .Nm utility supports both .Cm LAN (LAN Access Using PPP) and .Cm DUN (Dial-Up Networking) access. The client's configuration for .Cm LAN access is very similar to the server's and might look like this: .Bd -literal -offset indent rfcomm-client: enable lqr accept lqr set dial set timeout 0 disable iface-alias set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.0 0.0.0.0 # Do not use PPP authentication. Assume that # Bluetooth connection was authenticated already deny pap disable pap deny chap disable chap .Ed .Pp The client's configuration for .Cm DUN access is different. In this scenario, the client gets connected to the virtual serial port on the server. To open a PPP session, the client must dial a number. Note that by default .Xr ppp 8 will not execute any configured chat scripts. The .Ic force-scripts option can be used to override this behavior. An example configuration is shown below: .Bd -literal -offset indent rfcomm-dialup: # This is IMPORTANT option enable force-scripts # You might want to change these set authname set authkey set phone "*99***1#" # You might want to adjust dial string as well set dial "ABORT BUSY ABORT NO\\\\sCARRIER TIMEOUT 5 \\ \\"\\" AT OK-AT-OK ATE1Q0 OK \\\\dATDT\\\\T TIMEOUT 40 CONNECT" set login set timeout 30 enable dns resolv rewrite set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.0 0.0.0.0 add default HISADDR .Ed .Pp Note that by adjusting the initialization string, one can make a CSD (Circuit Switched Data), HSCSD (High Speed Circuit Switched Data) or GPRS (General Packet Radio Service) connection. The availability of the particular connection type depends on the phone model and service plan activated on the phone. .Sh EXIT STATUS .Ex -std .Sh EXAMPLES .Dl "rfcomm_pppd -s -a 00:01:02:03:04:05 -C 1 -l rfcomm-server" .Pp This command will start .Nm in the server mode. The RFCOMM server will listen on local address .Li 00:01:02:03:04:05 and channel .Li 1 . Once the incoming connection has been accepted, .Nm will execute .Xr ppp 8 in .Fl direct mode with the .Dq Li rfcomm-server label. .Pp .Dl "rfcomm_pppd -c -a 00:01:02:03:04:05 -C 1 -l rfcomm-client" .Pp This command will start .Nm in the client mode. .Nm will try to connect to the RFCOMM server at .Li 00:01:02:03:04:05 address and channel .Li 1 . Once connected, .Nm will execute .Xr ppp 8 in .Fl direct mode with the .Dq Li rfcomm-client label. .Sh SEE ALSO .Xr rfcomm_sppd 1 , .Xr bluetooth 3 , .Xr ng_btsocket 4 , .Xr ppp 8 , .Xr sdpcontrol 8 , .Xr sdpd 8 .Sh AUTHORS -.An Maksim Yevmenkin Aq m_evmenkin@yahoo.com +.An Maksim Yevmenkin Aq Mt m_evmenkin@yahoo.com .Sh CAVEATS The .Nm utility in server mode will try to register the Bluetooth LAN Access Over PPP service with the local SPD daemon. If the local SDP daemon is not running, .Nm will exit with an error. Index: head/usr.sbin/bluetooth/sdpcontrol/sdpcontrol.8 =================================================================== --- head/usr.sbin/bluetooth/sdpcontrol/sdpcontrol.8 (revision 267667) +++ head/usr.sbin/bluetooth/sdpcontrol/sdpcontrol.8 (revision 267668) @@ -1,118 +1,118 @@ .\" Copyright (c) 2003 Maksim Yevmenkin .\" 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. .\" .\" $Id: sdpcontrol.8,v 1.1 2003/09/08 02:27:27 max Exp $ .\" $FreeBSD$ .\" .Dd September 7, 2003 .Dt SDPCONTROL 8 .Os .Sh NAME .Nm sdpcontrol .Nd SDP query utility .Sh SYNOPSIS .Nm .Fl h .Nm .Fl a Ar address .Ar command .Op Ar parameters ... .Nm .Fl l .Op Fl c Ar path .Ar command .Op Ar parameters ... .Sh DESCRIPTION The .Nm utility attempts to query the specified Service Discovery Protocol (SDP) server. Remote SDP servers are identified by their address. Connection to the local SDP server is made via the control socket. The .Nm utility uses Service Search Attribute Requests and prints results to standard output and error messages to standard error. .Pp The options are as follows: .Bl -tag -width indent .It Fl a Ar address Connect to the remote device with the specified address. The address can be specified as BD_ADDR or a name. If a name was specified, the .Nm utility attempts to resolve the name via .Xr bt_gethostbyname 3 . .It Fl c Ar path Specify path to the control socket. The default path is .Pa /var/run/sdp . .It Fl h Display usage message and exit. .It Fl l Query the local SDP server via the control socket. .It Ar command One of the supported commands (see below). The special command .Cm help can be used to obtain a list of all supported commands. To get more information about a specific command, use .Cm help Ar command . .It Ar parameters One or more optional space separated command parameters. .El .Sh COMMANDS The currently supported node commands in .Nm are: .Pp .Bl -tag -width "Browse" -offset indent -compact .It Cm Browse .It Cm Search .El .Sh EXIT STATUS .Ex -std .Sh SEE ALSO .Xr bluetooth 3 , .Xr sdp 3 .Sh AUTHORS -.An Maksim Yevmenkin Aq m_evmenkin@yahoo.com +.An Maksim Yevmenkin Aq Mt m_evmenkin@yahoo.com .Sh CAVEATS The .Nm utility only implements client side functionality. .Pp The .Nm utility only requests the following attributes from the SDP server: .Pp .Bl -enum -offset indent -compact .It Service Record Handle .It Service Class ID List .It Protocol Descriptor List .It Bluetooth Profile Descriptor List .El Index: head/usr.sbin/bluetooth/sdpd/sdpd.8 =================================================================== --- head/usr.sbin/bluetooth/sdpd/sdpd.8 (revision 267667) +++ head/usr.sbin/bluetooth/sdpd/sdpd.8 (revision 267668) @@ -1,140 +1,140 @@ .\" Copyright (c) 2004 Maksim Yevmenkin .\" 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. .\" .\" $Id: sdpd.8,v 1.1 2004/01/13 19:31:54 max Exp $ .\" $FreeBSD$ .\" .Dd January 13, 2004 .Dt SDPD 8 .Os .Sh NAME .Nm sdpd .Nd Bluetooth Service Discovery Protocol daemon .Sh SYNOPSIS .Nm .Op Fl dh .Op Fl c Ar path .Op Fl g Ar group .Op Fl u Ar user .Sh DESCRIPTION The .Nm daemon keeps track of the Bluetooth services registered on the host and responds to Service Discovery inquiries from the remote Bluetooth devices. .Pp In order to use any service remote Bluetooth device need to send Service Search and Service Attribute or Service Search Attribute request over Bluetooth L2CAP connection on SDP PSM (0x0001). The .Nm daemon will try to find matching Service Record in its Service Database and will send appropriate response back. The remote device then will process the response, extract all required information and will make a separate connection in order to use the service. .Pp Bluetooth applications, running on the host, register services with the local .Nm daemon. Operation like service registration, service removal and service change are performed over the control socket. It is possible to query entire content of the .Nm Service Database with .Xr sdpcontrol 8 by issuing .Cm browse command on the control socket. .Pp The command line options are as follows: .Bl -tag -width indent .It Fl d Do not detach from the controlling terminal. .It Fl c Ar path Specify path to the control socket. The default path is .Pa /var/run/sdp . .It Fl g Ar group Specifies the group the .Nm should run as after it initializes. The value specified may be either a group name or a numeric group ID. This only works if .Nm was started as root. The default group name is .Dq Li nobody . .It Fl h Display usage message and exit. .It Fl u Ar user Specifies the user the .Nm should run as after it initializes. The value specified may be either a user name or a numeric user ID. This only works if .Nm was started as root. The default user name is .Dq Li nobody . .El .Sh CAVEAT The .Nm daemon will listen for incoming L2CAP connections on a wildcard BD_ADDR. .Pp In case of multiple Bluetooth devices connected to the same host it is possible to specify which services should be .Dq bound to which Bluetooth device. Such assignment should be done at service registration time. .Pp Requests to register, remove or change service can only be made via the control socket. The .Nm daemon will check peer's credentials and will only accept the request if the application has the same effective user ID as the .Dq Li root user ID. .Pp The .Nm daemon does not check for duplicated Service Records. It only performs minimal checking on the service data sent in the Service Register request. It is assumed that application must obtain all required resources such as RFCOMM channels etc., before registering the service. .Sh FILES .Bl -tag -width ".Pa /var/run/sdp" -compact .It Pa /var/run/sdp .El .Sh SEE ALSO .Xr sdp 3 , .Xr sdpcontrol 8 .Sh AUTHORS -.An Maksim Yevmenkin Aq m_evmenkin@yahoo.com +.An Maksim Yevmenkin Aq Mt m_evmenkin@yahoo.com .Sh BUGS Most likely. Please report if found. Index: head/usr.sbin/boot0cfg/boot0cfg.8 =================================================================== --- head/usr.sbin/boot0cfg/boot0cfg.8 (revision 267667) +++ head/usr.sbin/boot0cfg/boot0cfg.8 (revision 267668) @@ -1,205 +1,205 @@ .\" Copyright (c) 1999 Robert Nordier .\" 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 October 1, 2013 .Dt BOOT0CFG 8 .Os .Sh NAME .Nm boot0cfg .Nd boot manager installation/configuration utility .Sh SYNOPSIS .Nm .Op Fl Bv .Op Fl b Ar boot0 .Op Fl d Ar drive .Op Fl e Ar bell character .Op Fl f Ar file .Op Fl i Ar volume-id .Op Fl m Ar mask .Op Fl o Ar options .Op Fl s Ar slice .Op Fl t Ar ticks .Ar disk .Sh DESCRIPTION The .Fx .Sq boot0 boot manager permits the operator to select from which disk and slice an i386 machine (PC) is booted. .Pp Note that what are referred to here as .Dq slices are typically called .Dq partitions in .No non- Ns Bx documentation relating to the PC. Typically, only non-removable disks are sliced. .Pp The .Nm utility optionally installs the .Sq boot0 boot manager on the specified .Ar disk ; and allows various operational parameters to be configured. .Pp On PCs, a boot manager typically occupies sector 0 of a disk, which is known as the Master Boot Record (MBR). The MBR contains both code (to which control is passed by the PC BIOS) and data (an embedded table of defined slices). .Pp The options are: .Bl -tag -width indent .It Fl B Install the .Sq boot0 boot manager. This option causes MBR code to be replaced, without affecting the embedded slice table. .It Fl b Ar boot0 Specify which .Sq boot0 image to use. The default is .Pa /boot/boot0 which will use the video card as output, alternatively .Pa /boot/boot0sio can be used for output to the COM1 port. (Be aware that nothing will be output to the COM1 port unless the modem signals DSR and CTS are active.) .It Fl d Ar drive Specify the drive number used by the PC BIOS in referencing the drive which contains the specified .Ar disk . Typically this will be 0x80 for the first hard drive, 0x81 for the second hard drive, and so on; however any integer between 0 and 0xff is acceptable here. .It Fl e Ar bell character Set the character to be printed in case of input error. .It Fl f Ar file Specify that a backup copy of the preexisting MBR should be written to .Ar file . This file is created if it does not exist, and replaced if it does. .It Fl i Ar volume-id Specifies a volume-id (in the form XXXX-XXXX) to be saved at location 0x1b8 in the MBR. This information is sometimes used by NT, XP and Vista to identify the disk drive. The option is only compatible with version 2.00 of the 512-byte boot block. .It Fl m Ar mask Specify slices to be enabled/disabled, where .Ar mask is an integer between 0 (no slices enabled) and 0xf (all four slices enabled). Each mask bit enables corresponding slice if set to 1. The least significant bit of the mask corresponds to slice 1, the most significant bit of the mask corresponds to slice 4. .It Fl o Ar options A comma-separated string of any of the following options may be specified (with .Dq no prepended as necessary): .Bl -tag -width indent .It packet Use the disk packet (BIOS INT 0x13 extensions) interface, as opposed to the legacy (CHS) interface, when doing disk I/O. This allows booting above cylinder 1023, but requires specific BIOS support. The default is .Sq packet . .It setdrv Forces the drive containing the disk to be referenced using drive number definable by means of the -d option. The default is .Sq nosetdrv . .It update Allow the MBR to be updated by the boot manager. (The MBR may be updated to flag slices as .Sq active , and to save slice selection information.) This is the default; a .Sq noupdate option causes the MBR to be treated as read-only. .El .It Fl s Ar slice Set the default boot selection to .Ar slice . Values between 1 and 4 refer to slices; a value of 5 refers to the option of booting from a second disk. The special string .Dq PXE or a value of 6 can be used to boot via PXE. .It Fl t Ar ticks Set the timeout value to .Ar ticks . (There are approximately 18.2 ticks per second.) .It Fl v Verbose: display information about the slices defined, etc. .El .Sh FILES .Bl -tag -width /boot/boot0sio -compact .It Pa /boot/boot0 The default .Sq boot0 image .It Pa /boot/boot0sio Image for serial consoles (COM1,9600,8,N,1,MODEM) .El .Sh EXIT STATUS .Ex -std .Sh EXAMPLES To boot slice 2 on the next boot: .Pp .Dl "boot0cfg -s 2 ada0" .Pp To enable just slices 1 and 3 in the menu: .Pp .Dl "boot0cfg -m 0x5 ada0" .Pp To go back to non-interactive booting, use .Xr fdisk 8 to install the default MBR: .Pp .Dl "fdisk -B ada0" .Sh SEE ALSO .Xr geom 4 , .Xr boot 8 , .Xr fdisk 8 , .Xr gpart 8 .Sh AUTHORS -.An Robert Nordier Aq rnordier@FreeBSD.org . +.An Robert Nordier Aq Mt rnordier@FreeBSD.org .Sh BUGS Use of the .Sq packet option may cause .Sq boot0 to fail, depending on the nature of BIOS support. .Pp Use of the .Sq setdrv option with an incorrect -d operand may cause the boot0 code to write the MBR to the wrong disk, thus trashing its previous content. Be careful. Index: head/usr.sbin/bootparamd/bootparamd/bootparamd.8 =================================================================== --- head/usr.sbin/bootparamd/bootparamd/bootparamd.8 (revision 267667) +++ head/usr.sbin/bootparamd/bootparamd/bootparamd.8 (revision 267668) @@ -1,76 +1,76 @@ .\" @(#)bootparamd.8 .\" $FreeBSD$ .Dd December 14, 2000 .Dt BOOTPARAMD 8 .Os .Sh NAME .Nm bootparamd .Nd boot parameter server .Sh SYNOPSIS .Nm .Op Fl ds .Op Fl r Ar router .Op Fl f Ar file .Sh DESCRIPTION The .Nm utility is a server process that provides information to .Xr diskless 8 clients necessary for booting. It consults the .Pa /etc/bootparams file. .Pp This version will allow the use of aliases on the hostname in the .Pa /etc/bootparams file. The returned hostname to the .Em whoami request done by the booting client will be the name that appears in .Pa /etc/bootparams and not the canonical name. In this way you can keep the answer short enough so that machines that cannot handle long hostnames will not fail during boot. .Sh OPTIONS .Bl -tag -width Fl .It Fl d Display the debugging information. .It Fl s Log the debugging information with .Xr syslog 3 . .It Fl r Ar router The default router (a machine or an IP-address). This defaults to the machine running the server. .It Fl f Ar file The file to use as boot parameter file instead of .Pa /etc/bootparams . .El .Sh FILES .Bl -tag -width /etc/bootparams -compact .It Pa /etc/bootparams default boot parameter file .El .Sh EXAMPLES When netbooting diskless SunOS/Xkernel SPARCstations the booted SunOS kernel also broadcasts to the all-0 address. The SunOS kernel hangs until it receives a reply. To accommodate this behaviour add an alias address that responds to an all-0 broadcast. So, add something like .Ql "ifconfig xl0 192.168.200.254 netmask 255.255.255.255 broadcast 192.168.200.0 alias" on the relevant network interface on your .Nm server. The alias address must of course be free for use. .Sh SEE ALSO .Xr syslog 3 , .Xr bootparams 5 , .Xr diskless 8 .Sh AUTHORS Written by -.An Klas Heggemann Aq klas@nada.kth.se . +.An Klas Heggemann Aq Mt klas@nada.kth.se . .Sh BUGS You may find the .Xr syslog 3 loggings to be verbose. Index: head/usr.sbin/bsdconfig/bsdconfig.8 =================================================================== --- head/usr.sbin/bsdconfig/bsdconfig.8 (revision 267667) +++ head/usr.sbin/bsdconfig/bsdconfig.8 (revision 267668) @@ -1,243 +1,243 @@ .\" Copyright (c) 2012 Ron McDowell .\" Copyright (c) 2012-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 ``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 Jun 5, 2013 .Dt BSDCONFIG 8 .Os .Sh NAME .Nm bsdconfig .Nd system configuration utility .Sh SYNOPSIS .Nm .Op Fl h .Nm .Ar command .Op Fl h .Nm .Op OPTIONS .Op command Op OPTIONS .Sh DESCRIPTION .Nm is used to set up many system configuration settings, both for new systems, as well as changing configuration settings of existing systems. .Pp .Nm optionally takes a command as an argument. If invoked with no arguments, it will bring up an interactive menu listing the available modules. .Pp The following options are available: .Bl -tag -width indent+ .It Fl d Provide lots of debugging info on standard-out when running. .It Fl D Ar file Send debugging info to file. If file begins with a plus-sign debug info is sent to both standard-out and file (minus the leading plus). .It Fl f Ar file Load .Ar file as script and then exit. If multiple occurrences, program will only exit after last occurrence. If .Ar file is a single dash .Pq Sq Fl , .Nm reads from standard input. .It Fl h Print usage statement and exit. .It Fl S Secure X11 mode .Pq implies Fl X . As root, always prompt-for and validate .Xr sudo 8 username/password before starting. .It Fl X Use .Xr Xdialog 1 in place of .Xr dialog 1 . .El .Sh COMMANDS The following commands .Pq sorted alphabetically are currently included in the base .Nm program, with more to be added soon. Other commands can be added, as detailed below in the .Cm ADDING COMMANDS section, and once added, will appear in the master menu as well as in the .Cm -h listing. .Bl -tag -width ".Cm syscons_screenmap" .It Cm console Utilities to customize the behavior of the system console. .It Cm defaultrouter Shortcut to the Default Router/Gateway menu under networking. .It Cm diskmgmt Manage disk partitions and/or labels. Executes .Xr sade 8 . .It Cm docsinstall Executes the .Cm bsdinstall docsinstall sub-utility to allow installation/re-installation of the FreeBSD Documentation set(s). .It Cm dot Generate a graphviz .Xr dot 1 language file .Pq printed on stdout visualizing the .Nm menu, include, and shortcut structure relationships. See .Dq bsdconfig dot -h for more details. .It Cm groupadd Shortcut to the Add Groups menu under groupmgmt. .It Cm groupdel Shortcut to the Delete Groups menu under groupmgmt. .It Cm groupedit Shortcut to the Edit/View Groups menu under groupmgmt. .It Cm groupmgmt Utilities to Add/Change/View/Delete Group Accounts. .It Cm hostname Shortcut to the Hostname/Domain menu under networking. .It Cm kern_securelevel Shortcut to the kern.securelevel menu under security. .It Cm mouse Utilities for configuring, exploring, and enabling console mouse support. .It Cm mouse_disable Shortcut to the Disable menu under mouse. .It Cm mouse_enable Shortcut to the Enable menu under mouse. .It Cm mouse_flags Shortcut to the Flags menu under mouse. .It Cm mouse_port Shortcut to the Port menu under mouse. .It Cm mouse_type Shortcut to the Type menu under mouse. .It Cm nameservers Shortcut to the DNS Nameservers menu under networking. .It Cm netdev Shortcut to the Network Interfaces menu under networking. .It Cm networking Utilities to set/change Hostname/Domain, Network Interfaces, Default Router/Gateway, and DNS Nameservers. .It Cm packages Browse, install, uninstall, or re-install packaged software. .It Cm password Set the system administrator .Pq root password. .It Cm security Configure various system security settings. .It Cm startup Configure various aspects of system startup. .It Cm startup_misc Shortcut to the Miscellaneous Startup Services menu under startup. .It Cm startup_rcadd Shortcut to the Add New menu under the View/Edit Startup Configuration menu (startup_rcconf) of startup. .It Cm startup_rcconf Shortcut to the View/Edit Startup Configuration menu under startup. .It Cm startup_rcdelete Shortcut to the Delete menu under the View/Edit Startup Configuration menu (startup_rcconf) of startup. .It Cm startup_rcvar Shortcut to the Toggle Startup Services menu under startup. .It Cm syscons_font Shortcut to the Font menu under console. .It Cm syscons_keymap Shortcut to the Keymap menu under console. .It Cm syscons_repeat Shortcut to the Repeat menu under console. .It Cm syscons_saver Shortcut to the Saver menu under console. .It Cm syscons_screenmap Shortcut to the Screenmap menu under console. .It Cm syscons_ttys Shortcut to the Ttys menu under console. .It Cm timezone Set the regional timezone of the local machine. .It Cm ttys Edit the .Xr ttys 5 database with your favorite editor. .It Cm useradd Shortcut to the Add Users menu under usermgmt. .It Cm userdel Shortcut to the Delete Users menu under usermgmt. .It Cm useredit Shortcut to the Edit/View Users menu under usermgmt. .It Cm usermgmt Utilities to Add/Edit/View/Delete User Accounts. .El .Sh INTERNATIONALIZATION i18n features are built into .Nm and language-specific translation files will be added as they become available. In the absence of language-specific translation files, the default .Pq en_US.ISO8859-1 files will be used. .Sh ADDING COMMANDS To be documented later. Document menu_selection="command|*" syntax of INDEX files. .Sh ENVIRONMENT VARIABLES The following environment variables affect the execution of .Nm : .Bl -tag -width ".Ev LC_ALL" .It Ev LANG If LANG is set, messages and index information will be read from files named messages.$LANG and INDEX.$LANG and fall back to files named messages and INDEX if messages.$LANG and INDEX.$LANG do not exist. LANG takes precedence over LC_ALL. .It Ev LC_ALL If LC_ALL is set, messages and index information will be read from files named messages.$LC_ALL and INDEX.$LC_ALL and fall back to files named messages and INDEX if messages.$LC_ALL and INDEX.$LC_ALL do not exist. .El .Sh FILES /usr/share/examples/bsdconfig/bsdconfigrc can be copied to $HOME/.bsdconfigrc and customized as needed. .Sh EXIT STATUS .Ex -std .Sh SEE ALSO .Xr bsdinstall 8 .Sh HISTORY .Nm first appeared in .Fx 9.2 . .Sh AUTHORS .An Ron McDowell -.An Devin Teske Aq dteske@FreeBSD.org +.An Devin Teske Aq Mt dteske@FreeBSD.org .Sh BUGS The docsinstall and diskmgmt modules call bsdinstall. Bugs found in these modules should be considered those of bsdinstall, not .Nm . Index: head/usr.sbin/bsdinstall/bsdinstall.8 =================================================================== --- head/usr.sbin/bsdinstall/bsdinstall.8 (revision 267667) +++ head/usr.sbin/bsdinstall/bsdinstall.8 (revision 267668) @@ -1,371 +1,370 @@ .\"- .\" Copyright (c) 2011-2013 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 October 15, 2013 .Dt BSDINSTALL 8 .Os .Sh NAME .Nm bsdinstall .Nd system installer .Sh SYNOPSIS .Nm .Op Ar options .Op Ar target .Op Ar ... .Sh DESCRIPTION .Nm is used for installation of new systems, both for system setup from installation media (e.g. CD-ROMs) and for use on live systems to prepare VM images and jails. .Pp Much like .Xr make 1 , Nm takes a target and possible parameters of the target as arguments. If invoked with no arguments, it will invoke the .Cm auto target, which provides a standard interactive installation, invoking the others in sequence. To perform a scripted installation, these subtargets can be invoked separately by an installation script. .Sh OPTIONS .Nm supports the following options, global to all targets: .Bl -tag -width indent+ .It Fl D Ar file Provide a path for the installation log file .Pq overrides Ev BSDINSTALL_LOG . See .Sx ENVIRONMENT VARIABLES for more information on .Ev BSDINSTALL_LOG . .El .Sh TARGETS Most of the following targets are only useful for scripting the installer. For interactive use, most users will be interested only in the .Cm auto , .Cm jail , and .Cm script targets. .Bl -tag -width ".Cm jail Ar destination" .It Cm auto Run the standard interactive installation, including disk partitioning. .It Cm entropy Reads a small amount of data from .Pa /dev/random and stores it in a file in the new system's root directory. .It Cm jail Ar destination Sets up a new chroot system at .Pa destination , suitable for use with .Xr jail 8 . Behavior is generally similar to .Cm auto , except that disk partitioning and network setup are skipped and a kernel is not installed into the new system. .It Cm script Ar script Runs the installation script at .Pa script . See .Sx SCRIPTING for more information on this target. .It Cm keymap If the current controlling TTY is a .Xr syscons 4 console, asks the user to set the current keymap, and saves the result to the new system's .Pa rc.conf . .It Cm hostname Prompts the user for a host name for the new system and saves the result to the new system's .Pa rc.conf . If .Ev BSDINSTALL_CONFIGCURRENT is set, also sets the host name of the current system. .It Cm netconfig Interactively configures network interfaces (first invoking .Cm wlanconfig on wireless interfaces), saving the result to the new system's .Pa rc.conf and .Pa resolv.conf . If .Ev BSDINSTALL_CONFIGCURRENT is set, also configures the network interfaces of the current system to match. .It Cm autopart Provides the installer's interactive guided disk partitioner for single-disk installations. Partitions disks, runs .Xr newfs 8 , and writes the new system's .Pa fstab . .It Cm zfsboot Provides the installer's .Pq experimental interactive/scriptable ZFS partitioner for multi-disk installations. Creates a single .Ic zpool with datasets and writes to the new system's .Pa rc.conf , .Pa loader.conf , and .Pa fstab . Supports .Xr geli 8 , .Xr gnop 8 , and many other features. .It Cm partedit Provides the installer's interactive manual disk partitioner, with support for multi disk setups, non-UFS file systems, and manual selection of partition schemes. Partitions disks, runs .Xr newfs 8 , and writes the new system's .Pa fstab . .It Cm scriptedpart Ar parameters Sets up disks like .Cm autopart and .Cm partedit , but non-interactively according to the disk setup specified in .Ar parameters . Each disk setup is specified by a three-part argument: .Pp .Ar disk .Op Ar scheme .Op Ar {partitions} .Pp Multiple disk setups are separated by semicolons. The .Ar disk argument specifies the disk on which to operate (which will be erased), while the .Ar scheme argument specifies the .Xr gpart 8 partition scheme to apply to the disk. If .Ar scheme is unspecified, .Cm scriptedpart will apply the default bootable scheme on your platform. The .Ar partitions argument is also optional and specifies how to partition .Ar disk . It consists of a comma-separated list of partitions to create enclosed in curly braces. Each partition declaration takes the form .Pp .Ar size .Ar type .Op Ar mount point .Pp .Ar size specifies the partition size to create in bytes (K, M, and G suffixes can be appended to specify kilobytes, megabytes, and gigabytes respectively), while the .Em auto keyword causes the partition to take all the remaining space on the disk. The .Ar type option chooses the .Xr gpart 8 filesystem type (e.g. freebsd-ufs or freebsd-swap). The optional .Ar mount point argument sets where the created partition is to be mounted in the installed system. As an example, a typical invocation looks like: .Pp bsdinstall scriptedpart ada0 { 20G freebsd-ufs /, 4G freebsd-swap, 20G freebsd-ufs /var, auto freebsd-ufs /usr } .It Cm mount Mounts the file systems previously configured by .Cm autopart , .Cm partedit , or .Cm scriptedpart under .Ev BSDINSTALL_CHROOT . .It Cm distfetch Fetches the distributions in .Ev DISTRIBUTIONS to .Ev BSDINSTALL_DISTDIR from .Ev BSDINSTALL_DISTSITE . .It Cm checksum Verifies the checksums of the distributions listed in .Ev DISTRIBUTIONS against the distribution manifest. .It Cm distextract Extracts the distributions listed in .Ev DISTRIBUTIONS into .Ev BSDINSTALL_CHROOT . .It Cm rootpass Interactively invokes .Xr passwd 1 in the new system to set the root user's password. .It Cm adduser Interactively invokes .Xr adduser 8 in the new system. .It Cm time Interactively sets the time, date, and time zone of the new system. .It Cm services Queries the user for the system daemons to begin at system startup, writing the result into the new system's .Pa rc.conf . .It Cm config Installs the configuration files destined for the new system (e.g. rc.conf fragments generated by .Cm netconfig , etc.) onto the new system. .El .Sh ENVIRONMENT VARIABLES The following environment variables control various aspects of the installation process. Many are used internally during installation and have reasonable default values for most installation scenarios. Others are set by various interactive user prompts, and can be usefully overridden when making scripted or customized installers. .Bl -tag -width ".Ev BSDINSTALL_DISTSITE" .It Ev DISTRIBUTIONS The set of distributions to install (e.g. "base kernel ports"). Default: none .It Ev BSDINSTALL_DISTDIR The directory in which the distribution files can be found (or to which they should be downloaded). Default: .Pa /usr/freebsd-dist .It Ev BSDINSTALL_DISTSITE URL from which the distribution files should be downloaded if they are not already present in the directory defined by .Ev BSDINSTALL_DISTDIR . This should be a full path to the files, including architecture and release names. Most targets (e.g. .Cm auto and .Cm jail ) that prompt for a .Fx mirror will skip that step if this variable is already defined in the environment. Example: .Pa ftp://ftp.freebsd.org/pub/FreeBSD/releases/powerpc/powerpc64/9.1-RELEASE .It Ev BSDINSTALL_CHROOT The directory into which the distribution files should be unpacked and the directory at which the root file system of the new system should be mounted. Default: .Pa /mnt .It Ev BSDINSTALL_LOG Path to a log file for the installation. Default: .Pa /tmp/bsdinstall_log .It Ev BSDINSTALL_TMPETC Directory where files destined for the new system's .Pa /etc will be stored until the .Cm config target is executed. If this directory does not already exist, it will be created. Default: .Pa /tmp/bsdinstall_etc .It Ev BSDINSTALL_TMPBOOT Directory where files destined for the new system's .Pa /boot will be stored until the .Cm config target is executed. If this directory does not already exist, it will be created. Default: .Pa /tmp/bsdinstall_boot .El .Sh SCRIPTING .Nm scripts consist of two parts: a .Em preamble and a .Em setup script . The preamble sets up the options for the installation (how to partition the disk[s], which distributions to install, etc.) and the optional second part is a shell script run under .Xr chroot 8 in the newly installed system before .Nm exits. The two parts are separated by the usual script header (#!), which also sets the interpreter for the setup script. .Pp A typical bsdinstall script looks like this: .Bd -literal -offset indent PARTITIONS=ada0 DISTRIBUTIONS="kernel.txz base.txz" #!/bin/sh echo "ifconfig_em0=DHCP" >> /etc/rc.conf echo "sshd_enable=YES" >> /etc/rc.conf pkg install puppet .Ed .Pp On .Fx release media, such a script placed at .Pa /etc/installerconfig will be run at boot time and the system will be rebooted automatically after the installation has completed. This can be used for unattended network installation of new systems; see .Xr diskless 8 for details. .Ss PREAMBLE The preamble consists of installer settings. These control global installation parameters (see .Sx ENVIRONMENT VARIABLES ) as well as disk partitioning. The preamble is interpreted as a .Xr sh 1 script run at the very beginning of the install. If more complicated behavior than setting these variables is desired, arbitrary commands can be run here to extend the installer. In addition to the variables in .Sx ENVIRONMENT VARIABLES , in particular .Ev DISTRIBUTIONS , the preamble can contain a variable .Ev PARTITIONS which is passed to the .Cm scriptedpart target to control disk setup. Alternatively, instead of .Ev PARTITIONS , the preamble can contain the variable .Ev ZFSBOOT_DATASETS which is parsed by the .Pq experimental .Cm zfsboot target to control ZFS datasets/options of the boot pool setup. .Ss SETUP SCRIPT Following the preamble is an optional shell script, beginning with a #! declaration. This script will be run at the end of the installation process inside a .Xr chroot 8 environment in the newly installed system and can be used to set up configuration files, install packages, etc. Note that newly configured system services (e.g. networking) have not been started in the installed system at this time and only installation host services are available. .Sh HISTORY This version of .Nm first appeared in .Fx 9.0 . .Sh AUTHORS -.An -nosplit -.An Nathan Whitehorn Aq nwhitehorn@FreeBSD.org +.An Nathan Whitehorn Aq Mt nwhitehorn@FreeBSD.org Index: head/usr.sbin/bsdinstall/partedit/sade.8 =================================================================== --- head/usr.sbin/bsdinstall/partedit/sade.8 (revision 267667) +++ head/usr.sbin/bsdinstall/partedit/sade.8 (revision 267668) @@ -1,75 +1,74 @@ .\" Copyright (c) 1997 .\" Jordan Hubbard . 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 Jordan Hubbard 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 Jordan Hubbard 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 30, 2012 .Dt SADE 8 .Os .Sh NAME .Nm sade .Nd sysadmins disk editor .Sh SYNOPSIS .Nm .Sh DESCRIPTION The .Nm utility is used for various disk administration tasks on .Fx systems. .Pp It is generally invoked without arguments for the default behavior, where the main menu is presented. .Sh NOTES The .Nm utility aims to provide a handy tool for disk management tasks on an already installed system. The goal is to provide the same text interface for disk management in .Xr bsdinstall 8 in the post-installation environment. .Sh SEE ALSO .Xr bsdinstall 8 , .Xr gpart 8 .Sh HISTORY A program called .Nm first appeared in .Fx 6.3 as a utility encapsulating features from the .Xr sysinstall 8 installer. It was replaced in .Fx 10.0 with the equivalent part of .Xr bsdinstall 8 . .Sh AUTHORS -.An Nathan Whitehorn Aq nwhitehorn@FreeBSD.org +.An Nathan Whitehorn Aq Mt nwhitehorn@FreeBSD.org .Sh BUGS The utility misses a lot of nice features, such as tools for manipulating .Xr gmirror 8 or -.Xr zfs 8 -. +.Xr zfs 8 . These will be added later. Index: head/usr.sbin/bsnmpd/modules/snmp_bridge/snmp_bridge.3 =================================================================== --- head/usr.sbin/bsnmpd/modules/snmp_bridge/snmp_bridge.3 (revision 267667) +++ head/usr.sbin/bsnmpd/modules/snmp_bridge/snmp_bridge.3 (revision 267668) @@ -1,119 +1,119 @@ .\"- .\" Copyright (C) 2006 Shteryana Shopova .\" 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 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 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, 2007 .Dt SNMP_BRIDGE 3 .Os .Sh NAME .Nm snmp_bridge .Nd "bridge module for snmpd" .Sh LIBRARY .Pq begemotSnmpdModulePath."bridge" = "/usr/lib/snmp_bridge.so" .Sh DESCRIPTION The .Nm snmp_bridge module implements the BRIDGE-MIB as standardized in RFC 4188, the RSTP-MIB standardized in RFC4318 and a private BEGEMOT-BRIDGE-MIB, which allows management of multiple bridge interfaces. Most of the objects defined in the private BEGEMOT-BRIDGE-MIB are duplicates of the original objects defined by the standard BRIDGE-MIB, but the private MIB also defines additional objects which make the functionality of .Nm similar to .Xr ifconfig 8 for configuring bridge interfaces. Therefore one should consider adding write communities or loading the .Nm module on systems where security is crucial. .Sh IMPLEMENTATION NOTES The additional objects to configure a bridge are: .Bl -tag -width "XXXXXXXXX" .It Va begemotBridgeBaseStatus Bridge interfaces can be created and destroyed via this object. SNMP SET operations with the following values are allowed: .Bl -tag -width ".It Va createAndWait" .It Va createAndWait will attempt to create a bridge interface with the name given by the table index. .It Va createAndGo will attempt to create a bridge interface with the name given by the table index and set the status of the interface to "active/up". .It Va destroy will attempt to destroy the bridge interface. .El .It Va begemotBridgeBaseSpanEnabled A SNMP SET operation on this object is only successful if the corresponding port has not been added as member of the bridge interface on the system. .It Va begemotBridgeBasePortStatus SNMP SET operations with the following values are allowed: .Bl -tag -width ".It Va createAndWait" .It Va createAndWait will create a new row for the bridge member in the SNMP .Va begemotBridgeBasePortTable but will not try to commit the information to the system. .It Va active will attempt to commit the information to the system and will be successful only if a value for .Va begemotBridgeBaseSpanEnabled has been SET already. .It Va destroy will attempt to remove the interface from the system bridge interface. .El .It Va begemotBridgeBasePortPrivate This object controls a bridge interface flag called PRIVATE where any private port can not communicate with another private port. .El .Sh RESTRICTIONS Not all information in the MIBs is currently available in FreeBSD. The following variables carry no information: .Bl -tag -width "XXXXXXXXX" .It Va dot1dBasePortCircuit .It Va dot1dBasePortDelayExceededDiscards .It Va dot1dBasePortMtuExceededDiscards .It Va begemotBridgeBasePortDelayExceededDiscards .It Va begemotBridgeBasePortMtuExceededDiscards .El .Sh FILES .Bl -tag -width "XXXXXXXXX" .It Pa /usr/share/snmp/defs/bridge_tree.def The description of the MIB tree implemented by .Nm . .It Pa /usr/share/snmp/mibs/BRIDGE-MIB.txt This is the BRIDGE-MIB that is implemented by this module. .It Pa /usr/share/snmp/mibs/RSTP-MIB.txt This is the RSTP-MIB implemented by this module. .It Pa /usr/share/snmp/mibs/BEGEMOT-BRIDGE-MIB.txt This is the private BEGEMOT-BRIDGE-MIB that is implemented by this module. .El .Sh SEE ALSO .Xr bsnmpd 1 , .Xr gensnmptree 1 , .Xr if_bridge 4 , .Xr ifconfig 8 , .Xr snmpmod 3 .Sh AUTHORS -.An Shteryana Shopova Aq syrinx@FreeBSD.org +.An Shteryana Shopova Aq Mt syrinx@FreeBSD.org Index: head/usr.sbin/bsnmpd/modules/snmp_hast/snmp_hast.3 =================================================================== --- head/usr.sbin/bsnmpd/modules/snmp_hast/snmp_hast.3 (revision 267667) +++ head/usr.sbin/bsnmpd/modules/snmp_hast/snmp_hast.3 (revision 267668) @@ -1,70 +1,70 @@ .\"- .\" Copyright (c) 2013 Mikolaj Golub .\" 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 31, 2014 .Dt SNMP_HAST 3 .Os .Sh NAME .Nm snmp_hast .Nd "HAST module for" .Xr bsnmpd 1 .Sh LIBRARY .Pq begemotSnmpdModulePath."hast" = "/usr/lib/snmp_hast.so" .Sh DESCRIPTION The .Nm snmp_hast module implements a private BEGEMOT-HAST-MIB, which allows management of HAST resources. .Pp The module uses the .Xr hastd 8 control socket to communicate with the daemon. The .Va hastConfigFile variable can be used to specify the location of the .Xr hast.conf 5 file to find the address of the control connection. .Sh FILES .Bl -tag -width "XXXXXXXXX" .It Pa /usr/share/snmp/defs/hast_tree.def The description of the MIB tree implemented by .Nm . .It Pa /usr/share/snmp/mibs/BEGEMOT-HAST-MIB.txt The private BEGEMOT-HAST-MIB that is implemented by this module. .It Pa /etc/hast.conf The default .Xr hastd 8 configuration file. .El .Sh SEE ALSO .Xr bsnmpd 1 , .Xr gensnmptree 1 , .Xr snmpmod 3 , .Xr hastctl 8 , .Xr hastd 8 .Sh AUTHORS -.An Mikolaj Golub Aq trociny@FreeBSD.org +.An Mikolaj Golub Aq Mt trociny@FreeBSD.org Index: head/usr.sbin/bsnmpd/modules/snmp_hostres/snmp_hostres.3 =================================================================== --- head/usr.sbin/bsnmpd/modules/snmp_hostres/snmp_hostres.3 (revision 267667) +++ head/usr.sbin/bsnmpd/modules/snmp_hostres/snmp_hostres.3 (revision 267668) @@ -1,88 +1,88 @@ .\" .\" Copyright (C) 2005-2006 .\" The FreeBSD Project. .\" All rights reserved. .\" .\" Author: Harti Brandt .\" .\" 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 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 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 January 3, 2006 .Dt SNMP_HOSTRES 3 .Os .Sh NAME .Nm snmp_hostres .Nd host resources module for .Xr bsnmpd 8 .Sh LIBRARY .Pq begemotSnmpdModulePath."hostres" = "/usr/lib/snmp_hostres.so" .Sh DESCRIPTION The .Nm module implements the HOST-RESOURCES-MIB as standardized in RFC 2790. .Sh RESTRICTIONS Not all information in the MIB is meaningful in FreeBSD or is available. The following variables are not implemented or carry no information: .Bl -tag -width indent .It Va hrFSType There are several types of file systems for which no appropriate OID exists yet which are supported by .Fx . For smbfs, procfs and devfs , .Va hrFSOther is returned. In all other cases, .Va hrFSUnknown . .It Va hrFSBootable It is questionable what bootable means here. Does it mean that the BIOS is available to start a boot on that file system or does it mean that there is something bootable? In either case this information is not available so this variable returns True for the root file system (which is not necessarily correct) and False for all others. .It Va hrFSLastFullBackupDate , hrFSLastPartialBackupDate This is not available and always returns an empty string. Theoretically, this could be retrieved from .Pa /etc/dumpdates , which would hardly be correct given the different ways of doing backups. .It Va hrDiskStorageTable Floppy devices are currently not reported. Also the names of the disks are hard-coded in the module. .El .Sh FILES .Bl -tag -width indent .It Pa /usr/share/snmp/defs/hostres_tree.def The description of the MIB tree implemented by .Nm . .It Pa /usr/share/snmp/mibs/HOST-RESOURCES-TYPES.txt .It Pa /usr/share/snmp/mibs/HOST-RESOURCES-MIB.txt .It Pa /usr/share/snmp/mibs/BEGEMOT-HOSTRES-MIB.txt This is the MIB that is implemented by this module. .El .Sh SEE ALSO .Xr gensnmptree 1 , .Xr snmpmod 3 .Sh AUTHORS -.An Victor Cruceru Aq soc-victor@FreeBSD.org +.An Victor Cruceru Aq Mt soc-victor@FreeBSD.org Index: head/usr.sbin/bsnmpd/modules/snmp_lm75/snmp_lm75.3 =================================================================== --- head/usr.sbin/bsnmpd/modules/snmp_lm75/snmp_lm75.3 (revision 267667) +++ head/usr.sbin/bsnmpd/modules/snmp_lm75/snmp_lm75.3 (revision 267668) @@ -1,60 +1,60 @@ .\"- .\" Copyright (c) 2014 Luiz Otavio O Souza .\" 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 June 2, 2014 .Dt SNMP_LM75 3 .Os .Sh NAME .Nm snmp_lm75 .Nd "LM75 Sensor module for" .Xr bsnmpd 1 .Sh LIBRARY .Pq begemotSnmpdModulePath."lm75" = "/usr/lib/snmp_lm75.so" .Sh DESCRIPTION The .Nm snmp_lm75 module implements a private BEGEMOT-LM75-MIB, which allows reading the temperature of the LM75 sensors on the system. .Pp The module reads the sensor(s) temperature using the .Xr sysctl 8 API. .Sh FILES .Bl -tag -width "XXXXXXXXX" .It Pa /usr/share/snmp/defs/lm75_tree.def The description of the MIB tree implemented by .Nm . .It Pa /usr/share/snmp/mibs/BEGEMOT-LM75-MIB.txt The private BEGEMOT-LM75-MIB that is implemented by this module. .El .Sh SEE ALSO .Xr bsnmpd 1 , .Xr gensnmptree 1 , .Xr snmpmod 3 , .Xr lm75 4 .Sh AUTHORS -.An Luiz Otavio O Souza Aq loos@FreeBSD.org . +.An Luiz Otavio O Souza Aq Mt loos@FreeBSD.org Index: head/usr.sbin/bsnmpd/modules/snmp_netgraph/snmp_netgraph.3 =================================================================== --- head/usr.sbin/bsnmpd/modules/snmp_netgraph/snmp_netgraph.3 (revision 267667) +++ head/usr.sbin/bsnmpd/modules/snmp_netgraph/snmp_netgraph.3 (revision 267668) @@ -1,436 +1,436 @@ .\" .\" Copyright (c) 2001-2003 .\" Fraunhofer Institute for Open Communication Systems (FhG Fokus). .\" All rights reserved. .\" .\" Author: Harti Brandt .\" .\" Redistribution of this software and documentation 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 or documentation 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 AND DOCUMENTATION IS PROVIDED BY FRAUNHOFER FOKUS .\" AND ITS 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 .\" FRAUNHOFER FOKUS OR ITS 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 14, 2003 .Dt SNMP_NETGRAPH 3 .Os .Sh NAME .Nm snmp_netgraph , .Nm snmp_node , .Nm snmp_nodename , .Nm ng_cookie_f , .Nm ng_hook_f , .Nm ng_register_cookie , .Nm ng_unregister_cookie , .Nm ng_register_hook , .Nm ng_unregister_hook , .Nm ng_unregister_module , .Nm ng_output , .Nm ng_output_node , .Nm ng_output_id , .Nm ng_dialog , .Nm ng_dialog_node , .Nm ng_dialog_id , .Nm ng_send_data , .Nm ng_mkpeer_id , .Nm ng_connect_node , .Nm ng_connect_id , .Nm ng_connect2_id , .Nm ng_connect2_tee_id , .Nm ng_rmhook , .Nm ng_rmhook_id , .Nm ng_rmhook_tee_id , .Nm ng_shutdown_id , .Nm ng_next_node_id , .Nm ng_node_id , .Nm ng_node_id_node , .Nm ng_node_name , .Nm ng_node_type , .Nm ng_peer_hook_id .Nd "netgraph module for snmpd" .Sh LIBRARY .Pq begemotSnmpdModulePath."netgraph" = "/usr/lib/snmp_netgraph.so" .Sh SYNOPSIS .In bsnmp/snmpmod.h .In bsnmp/snmp_netgraph.h .Vt extern ng_ID_t snmp_node ; .Vt extern u_char *snmp_nodename ; .Ft typedef void .Fn ng_cookie_f "const struct ng_mesg *mesg" "const char *path" "ng_ID_t id" "void *uarg" .Ft typedef void .Fn ng_hook_f "const char *hook" "const u_char *mesg" "size_t len" "void *uarg" .Ft void * .Fn ng_register_cookie "const struct lmodule *mod" "uint32_t cookie" "ng_ID_t id" "ng_cookie_f *func" "void *uarg" .Ft void .Fn ng_unregister_cookie "void *reg" .Ft void * .Fn ng_register_hook "const struct lmodule *mod" "const char *hook" "ng_hook_f *func" "void *uarg" .Ft void .Fn ng_unregister_hook "void *reg" .Ft void .Fn ng_unregister_module "const struct lmodule *mod" .Ft int .Fn ng_output "const char *path" "u_int cookie" "u_int opcode" "const void *arg" "size_t arglen" .Ft int .Fn ng_output_node "const char *node" "u_int cookie" "u_int opcode" "const void *arg" "size_t arglen" .Ft int .Fn ng_output_id "ng_ID_t node" "u_int cookie" "u_int opcode" "const void *arg" "size_t arglen" .Ft struct ng_mesg * .Fn ng_dialog "const char *path" "u_int cookie" "u_int opcode" "const void *arg" "size_t arglen" .Ft struct ng_mesg * .Fn ng_dialog_node "const char *node" "u_int cookie" "u_int opcode" "const void *arg" "size_t arglen" .Ft struct ng_mesg * .Fn ng_dialog_id "ng_ID_t id" "u_int cookie" "u_int opcode" "const void *arg" "size_t arglen" .Ft int .Fn ng_send_data "const char *hook" "const void *sndbuf" "size_t sndlen" .Ft ng_ID_t .Fn ng_mkpeer_id "ng_ID_t id" "const char *name" "const char *type" "const char *hook" "const char *peerhook" .Ft int .Fn ng_connect_node "const char *node" "const char *ourhook" "const char *peerhook" .Ft int .Fn ng_connect_id "ng_ID_t id" "const char *ourhook" "const char *peerhook" .Ft int .Fn ng_connect2_id "ng_ID_t id" "ng_ID_t peer" "const char *ourhook" "const char *peerhook" .Ft int .Fn ng_connect2_tee_id "ng_ID_t id" "ng_ID_t peer" "const char *ourhook" "const char *peerhook" .Ft int .Fn ng_rmhook "const char *ourhook" .Ft int .Fn ng_rmhook_id "ng_ID_t id" "const char *hook" .Ft int .Fn ng_rmhook_tee_id "ng_ID_t id" "const char *hook" .Ft int .Fn ng_shutdown_id "ng_ID_t id" .Ft ng_ID_t .Fn ng_next_node_id "ng_ID_t node" "const char *type" "const char *hook" .Ft ng_ID_t .Fn ng_node_id "const char *path" .Ft ng_ID_t .Fn ng_node_id_node "const char *node" .Ft ng_ID_t .Fn ng_node_name "ng_ID_t id" "char *name" .Ft ng_ID_t .Fn ng_node_type "ng_ID_t id" "char *type" .Ft int .Fn ng_peer_hook_id "ng_ID_t id" "const char *hook" "char *peerhook" .Sh DESCRIPTION The .Nm snmp_netgraph module implements a number of tables and scalars that enable remote access to the netgraph subsystem. It also exports a number of global variables and functions, that allow other modules to easily use the netgraph system. .Pp If upon start up of the module the variable .Va begemotNgControlNodeName is not empty the module opens a netgraph socket and names that socket node. If the variable is empty, the socket is created, as soon as the variable is written with a non-empty name. The socket can be closed by writing an empty string to the variable. The socket itself and its name are available in .Va snmp_node and .Va snmp_nodename . .Ss SENDING AND RECEIVING MESSAGES AND DATA There are three functions for sending control message: .Bl -tag -width ".It Fn ng_output_node" .It Fn ng_output sends a control message along the given .Fa path . .It Fn ng_output_node sends a control message to the node with name .Fa node and .It Fn ng_output_id sends a control message to the node with node id .Fa id . .El .Pp Each of these functions takes the following arguments: .Bl -tag -width ".It Fa cookie" .It Fa cookie is the node specific command cookie, .It Fa opcode is the node specific code for the operation to perform, .It Fa arg is a pointer to the message itself. This message must start with a .Vt struct ng_mesg . .It Fa arglen is the overall length of the message (header plus arguments). .El The functions return the message id that can be used to match incoming responses or -1 if an error occurs. .Pp Another class of functions is used to send a control message and to wait for a matching response. Note, that this operation blocks the daemon, so use it only if you are sure that the response will happen. There is a maximum timeout that is configurable in the MIB variable .Va begemotNgTimeout . Other messages arriving while the functions are waiting for the response are queued and delivered on the next call to the module's idle function. .Bl -tag -width ".It Fn ng_output_node" .It Fn ng_dialog sends a control message along the given .Fa path and waits for a matching response. .It Fn ng_dialog_node sends a control message to the node with name .Fa node and waits for a matching response. .It Fn ng_dialog_id sends a control message to the node with id .Fa id and waits for a matching response. .El .Pp All three functions take the same arguments as the .Fn ng_output* functions. The functions return the response message in a buffer allocated by .Xr malloc 3 or NULL in case of an error. The maximum size of the response buffer can be configured in the variable .Va begemotNgResBufSiz . .Pp A data message can be send with the function .Fn ng_send_data . This function takes the name of the .Va snmp_node Ns 's hook through which to send the data, a pointer to the message buffer and the size of the message. It returns -1 if an error happens. .Ss ASYNCHRONOUS CONTROL AND DATA MESSAGES A module can register functions to asynchronously receive control and data message. .Pp The function .Fn ng_register_cookie registers a control message receive function. If a control message is received, that is not consumed by the dialog functions, the list of registered control message receive functions is scanned. If the cookie in the received message is the same as the .Fa cookie argument to the .Fn ng_register_cookie call and the .Fa id argument to the .Fn ng_register_cookie call was either 0 or equals the node id which sent the control message, the handler function .Fa func is called with a pointer to the received message, the hook on which the message was received (or NULL if it was received not on a hook), the id of the sender's node and the .Fa uarg argument of the registration call. The handler function should not modify the contents of the message, because more than one function may be registered to the same cookie and node id. .Pp A control message registration can be undone by calling .Fn ng_unregister_cookie with the return value of the registration call. If an error occurs while registering, .Fn ng_register_cookie returns NULL. .Pp A module can call .Fn ng_register_hook to register a callback for data messages on one of the .Va snmp_node Ns 's hooks. If a data message is received on that hook, the callback function .Fa func is called with the hook name, a pointer to the data message, the size of the message and the argument .Fa uarg to the registration function. The message should be treated as read-only. A data message registration can be undone by calling .Fn ng_unregister_hook with the return value of the registration call. If an error occurs while registering, .Fn ng_register_hook returns NULL. .Pp The function .Fn ng_unregister_module removes all control and data registrations for that module. .Ss FINDING NODES AND NODE CHARACTERISTICS The function .Fn ng_node_id returns the id of the node addressed by .Fa path or 0 if the node does not exists. .Pp The function .Fn ng_node_id_node returns the id of the node with name .Fa node or 0 if the node does not exist. .Pp The function .Fn ng_node_node retrieves the name of the node with id .Fa id and writes it to the buffer pointed to by .Fa name . This buffer should be at least .Li NG_NODESIZ bytes long. The function returns the node id or 0 if the node is not found. .Pp The function .Fn ng_node_type retrieves the name of the node with id .Fa id and writes it to the buffer pointed to by .Fa type . This buffer should be at least .Li NG_TYPESIZ bytes long. The function returns the node id or 0 if the node is not found. .Pp The function .Fn ng_peer_hook_id writes the name of the peer hook of the hook .Fa hook on the node with .Fa id to the buffer pointed to by .Fa peer_hook . The buffer should be at least .Li NG_HOOKSIZ bytes long. The function returns 0 if the node and the hook is found, -1 otherwise. The function skips intermediate tee nodes (see .Xr ng_tee 4 ) . .Pp The function .Fn ng_next_node_id returns the node id of the peer node that is on the other side of hook .Fa hook of node .Fa id . If .Fa type is not NULL, the function checks, that the peer node's type is .Fa type . The function skips intermediate tee nodes (see .Xr ng_tee 4 ) . It returns the node id of the peer node or 0 if an error occurs or the types do not match. .Ss CHANGING THE GRAPH A number of functions can be used to create or destroy nodes and hooks. .Pp The function .Fn ng_mkpeer_id creates a new node of type .Fa type whose hook .Fa peerhook will be connected to .Fa hook of node .Fa id . If .Fa name is not NULL the new node is named with this name. The function returns The node id of the new node or 0 if an error happens. .Pp The functions .Fn ng_connect_node and .Fn ng_connect_id make a new hook connecting .Fa ourhook of the modules socket node .Va snmp_node to .Fa peerhook of the node identified by id .Fa id or name .Fa node . The functions return 0 on success or -1 otherwise. .Pp The function .Fn ng_connect2_id connects hook .Fa ourhook of the node with id .Fa id to hook .Fa peerhook of the node with id .Fa peer . The functions return 0 on success or -1 otherwise. The function .Fn ng_connect2_tee_id does the same as .Fn ng_connect2_id except, that it puts an unnamed tee node between the two nodes. .Pp The function .Fn ng_rmhook removes hook .Fa hook on the module's .Va snmp_node . The function .Fn ng_rmhook_id removes hook .Fa hook on the node with id .Fa id . The function .Fn ng_rmhook_tee_id additionally shuts down all tee nodes between the node and the first non-tee peer. .Pp The function .Fn ng_shutdown_id destroys the given node. .Sh FILES .Bl -tag -width "XXXXXXXXX" .It Pa /usr/share/bsnmp/defs/netgraph_tree.def The description of the MIB tree implemented by .Nm . .It Pa /usr/share/bsnmp/mibs/BEGEMOT-NETGRAPH.txt This is the MIB that is implemented by this module. .El .Sh SEE ALSO .Xr gensnmptree 1 , .Xr snmpmod 3 .Sh AUTHORS -.An Hartmut Brandt Aq harti@FreeBSD.org +.An Hartmut Brandt Aq Mt harti@FreeBSD.org Index: head/usr.sbin/bsnmpd/modules/snmp_wlan/snmp_wlan.3 =================================================================== --- head/usr.sbin/bsnmpd/modules/snmp_wlan/snmp_wlan.3 (revision 267667) +++ head/usr.sbin/bsnmpd/modules/snmp_wlan/snmp_wlan.3 (revision 267668) @@ -1,160 +1,160 @@ .\"- .\" Copyright (C) 2010 The FreeBSD Foundation .\" All rights reserved. .\" .\" This documentation was written by Shteryana Sotirova Shopova under .\" sponsorship from the FreeBSD Foundation. .\" .\" 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 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 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 June 28, 2010 .Dt SNMP_WLAN 3 .Os .Sh NAME .Nm snmp_wlan .Nd "wireless networking module for" .Xr bsnmpd 1 .Sh LIBRARY .Pq begemotSnmpdModulePath."wlan" = "/usr/lib/snmp_wlan.so" .Sh DESCRIPTION The .Nm snmp_wlan module implements a private BEGEMOT-WIRELESS-MIB, which allows management of virtual wireless interfaces. The MIB defines objects similar to the state data and configuration capabilities of .Xr ifconfig 8 for configuring virtual wireless interfaces. Therefore one should consider adding write communities or loading the .Nm module on systems where security is crucial. .Sh IMPLEMENTATION NOTES A short description of the Tables and interesting objects in the MIB follows. .Bl -tag -width "XXXXXXXXX" .It Va wlanInterfaceTable The table is used for creation and deletion of virtual wireless interfaces. To add a new interface, a SET should be executed on the .Va wlanIfaceName column with value the desired name of the interface. Next the parent interface must be set via .Va wlanParentIfName column. Any optional parameters may be set via the .Va wlanIfaceOperatingMode , .Va wlanIfaceFlags , .Va wlanIfaceBssid and .Va wlanIfaceLocalAddress columns. To finally create the interface in the system, a SET with value of active(1) to .Va wlanIfaceStatus column should be executed. To destroy a wireless interface a SET with value of destroy(6) to the relevant .Va wlanIfaceStatus column should be executed. .It Va wlanIfParentTable The table contains information about the hardware capabilities of the parent of a wireless interface. .It Va wlanIfaceConfigTable The table is used to get or set various configuration parameters for a virtual wireless interface. Depending on the operating mode of the interface and the hardware capabilities of the underlying hardware interface, not all parameters and values may be supported. .It Va wlanIfacePeerTable The table contains information about the associated stations for interfaces operating as access points, or the stations identified as neighbors in the IBSS for interfaces operating in adhoc mode. .It Va wlanIfaceChannelTable Information about the active channels for the wireless interfaces in the system. .It Va wlanIfRoamParamsTable The parameters that govern the roaming operation on the wireless interfaces. .It Va wlanIfTxParamsTable The parameters that govern the transmit operation on the wireless interfaces. .It Va wlanScanConfigTable The table that contains a configuration for channel scanning initiated via SNMP. .It Va wlanScanResultsTable The table contains the scan results from the last scan for each wireless interface on the system. .It Va wlanIfaceStatisticsTable Summary statistics for each wireless interface on the system. .It Va wlanWepInterfaceTable WEP configuration for the wireless interfaces on the system. .It Va wlanMACAccessControlTable Access Control configuration for wireless interfaces operating as access points. .It Va wlanMACAccessControlMACTable The table with Access Control MAC entries for which the configured Access Control Policy on wireless interfaces operating in Host AP mode is applied. .Va wlanMACAccessControlMACStatus column is used to add or delete MAC ACL entries. A set with value createAndGo(4) will add new entry, while with value destroy(6) will delete an existing one. .It Va wlanMeshRoutingConfig The subtree contains system configuration related to Wireless Mesh Routing. .It Va wlanMeshInterfaceTable The table contains information for wireless interfaces operating as wireless mesh points. .It Va wlanMeshNeighborTable The table contains information for the neighbors of wireless interfaces operating in mesh mode. .It Va wlanMeshRouteTable The mesh routing table for interfaces operating as mesh points, used for forwarding packets on a mesh network. .Va wlanMeshRouteStatus column is used to add or delete entries in the mesh routing table for an interface. A set with value createAndGo(4) will add new entry, while with value destroy(6) will delete an existing one. .It Va wlanMeshStatsTable Summary statistics for each virtual wireless interface operating as mesh point. .It Va wlanMeshHWMPConfig The subtree contains system configuration related to Hybrid Wireless Mesh Protocol. .It Va wlanHWMPInterfaceTable The table contains HWMP information for wireless interfaces operating in mesh mode. .It Va wlanMeshHWMPStatsTable Summary statistics for HWMP operation on interfaces operating as mesh points. .El .Sh RESTRICTIONS Not all information or configuration in the MIBs is currently available in FreeBSD. The values of the following variables carry no information: .Bl -tag -width "XXXXXXXXX" .It Va wlanStatsReset .El .Sh FILES .Bl -tag -width "XXXXXXXXX" .It Pa /usr/share/snmp/defs/wlan_tree.def The description of the MIB tree implemented by .Nm . .It Pa /usr/share/snmp/mibs/BEGEMOT-WIRELESS-MIB.txt The private BEGEMOT-WIRELESS-MIB that is implemented by this module. .El .Sh SEE ALSO .Xr bsnmpd 1 , .Xr gensnmptree 1 , .Xr wlan 4 , .Xr wlan_acl 4 , .Xr wlan_wep 4 , .Xr ifconfig 8 , .Xr snmpmod 3 .Sh AUTHORS -.An Shteryana Shopova Aq syrinx@FreeBSD.org +.An Shteryana Shopova Aq Mt syrinx@FreeBSD.org Index: head/usr.sbin/bsnmpd/tools/bsnmptools/bsnmpget.1 =================================================================== --- head/usr.sbin/bsnmpd/tools/bsnmptools/bsnmpget.1 (revision 267667) +++ head/usr.sbin/bsnmpd/tools/bsnmptools/bsnmpget.1 (revision 267668) @@ -1,433 +1,433 @@ .\" .\" Copyright (c) 2010 The FreeBSD Foundation .\" All rights reserved. .\" .\" Portions of this documentation were written by Shteryana Sotirova Shopova .\" under sponsorship from the FreeBSD Foundation. .\" .\" Copyright (c) 2005-2007 The FreeBSD Project. .\" All rights reserved. .\" .\" Author: Shteryana Shopova .\" .\" 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 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 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 January 10, 2012 .Dt BSNMPGET 1 .Os .Sh NAME .Nm bsnmpget , .Nm bsnmpwalk , .Nm bsnmpset .Nd "simple tools for querying SNMP agents" .Sh SYNOPSIS .Nm .Op Fl aDdehnK .Op Fl A Ar options .Op Fl b Ar buffersize .Op Fl C Ar options .Op Fl I Ar options .Op Fl i Ar filelist .Op Fl l Ar filename .Op Fl M Ar max-repetitions .Op Fl N Ar non-repeaters .Op Fl o Ar output .Op Fl P Ar options .Op Fl p Ar pdu .Op Fl r Ar retries .Op Fl s Ar [trans::][community@][server][:port] .Op Fl t Ar timeout .Op Fl U Ar options .Op Fl v Ar version .Op Ar OID ... .Pp .Nm bsnmpwalk .Op Fl dhnK .Op Fl A Ar options .Op Fl b Ar buffersize .Op Fl C Ar options .Op Fl I Ar options .Op Fl i Ar filelist .Op Fl l Ar filename .Op Fl o Ar output .Op Fl P Ar options .Op Fl r Ar retries .Op Fl s Ar [trans::][community@][server][:port] .Op Fl t Ar timeout .Op Fl U Ar options .Op Fl v Ar version .Op Ar OID ... .Pp .Nm bsnmpset .Op Fl adehnK .Op Fl A Ar options .Op Fl b Ar buffersize .Op Fl C Ar options .Op Fl I Ar options .Op Fl i Ar filelist .Op Fl l Ar filename .Op Fl o Ar output .Op Fl P Ar options .Op Fl r Ar retries .Op Fl s Ar [trans::][community@][server][:port] .Op Fl t Ar timeout .Op Fl U Ar options .Op Fl v Ar version .Ar OID Ns = Ar syntax Ns : Ns Ar value .Op Ar OID Ns = Ar syntax Ns : Ns Ar value ... .Sh DESCRIPTION .Nm , .Nm bsnmpwalk and .Nm bsnmpset are simple tools for retrieving management information from and setting management information to a Simple Network Management Protocol (SNMP) agent. .Pp Depending on the options .Nm bsnmpget constructs either a SNMP GetRequest, GetNextRequest or a GetBulkRequest packet, fills in the object identifiers (OIDs) of the objects whose values will be retrieved, waits for a response and prints it if received successfully. .Pp .Nm Bsnmpwalk queries an agent with ether SNMP GetNextRequest or GetBulkRequest packets, asking for values of OID instances that are a part of the object subtree rooted at the provided OIDs. .Pp .Nm Bsnmpset constructs a SNMP SetRequest packet, fills in the OIDs (object identifiers), syntaxes and values of the objects whose values are to be set and waits for a response from server. .Sh OPTIONS The options are as follows (not all apply to all three programs): .Bl -tag -width ".It Fl D Ar options" .It Fl A Ar options Authentication options to use with SNMPv3 PDUs .Bl -tag -width \& .It Cm proto=[md5|sha] The protocol to use when calculating the PDU message digest. .It Cm key=authkey A binary localized authentication key to use when calculating the PDU message digest. .El .Pp By default SNMPv3 PDUs are sent unauthenticated. .It Fl a Skip any sanity checks when adding OIDs to a Protocol Data Unit (PDU): ingore syntax/access type, allow adding of non-leaf objects for GetPdu and read-only objects to a SetPDU. .It Fl b Ar buffersize Tune the size of buffers used to send and receive packets. The default size is 10000 bytes which should be enough unless an agent sends a really large octetstring. The maximum allowed length is 65535 according to the Structure of Management Information (SMIv2). .It Fl C Ar options The context to query with SNMPv3 PDUs. .Bl -tag -width \& .It Cm context=name The context name. Default is "" (empty). .It Cm context-engine=engine-id The SNMP Engine ID of the context to query with SNMPv3 PDUs, represented as binary octet string. By default, this is set to the Engine ID of the SNMP agent. .El .It Fl D Perform SNMP USM Engine Discovery, rather than sending a request for the value of a specific object. .It Fl d Turn on debugging. This option will cause the packets sent and received to be dumped to the terminal. .It Fl e Retry on error. If an error is returned in the response PDU, resend the request removing the variable that caused the error until a valid response is received. This is only useful for a GetRequest- and a GetNextRequest-PDU. .It Fl h Print a short help text with default values for various options. .It Fl I Ar options Load each MIB description file from the given list to translate symbolic object names to their numerical representation and vice versa. Use the other options to obtain a non-default behaviour: .Bl -tag -width \& .It Cm cut=OID Specifies the initial OID that was cut by .Xr gensnmpdef 1 when producing the MIB description file. The default value is .iso(1).org(3).dod(6) which is what should have been used for all the files installed under .Pa /usr/share/snmp/defs . Use this only if you generated your own files, providing a .Fl c option to .Xr gensnmpdef 1 . .It Cm path=filedir The directory where files in the list will be searched. The default is .Pa /usr/share/snmp/defs Ns . .It Cm file=filelist A comma separated list of files to which the two options above will apply. .El .Pp The file suboption has to come after the other suboptions so that their non-default values will be applied to the list of files. The order of the other suboptions before each file suboption can be random. Suboptions may be separated either by commas or by spaces. If using spaces make sure the entire option string is one argument, for example using quotes. .It Fl i Ar filelist List of MIB description files produced by .Xr gensnmpdef 1 which .Nm bsnmpget , .Nm bsnmpwalk or .Nm bsnmpset will search to translate numerical OIDs to their symbolic object names. Multiple files can be provided either giving this option multiple times or a comma separated list of file names. If a filename begins with a letter the default directory, .Pa /usr/share/snmp/defs , will be searched. .It Fl K Calculate and display the localized authentication and privacy keys corresponding to a plain text password. The password is obtained via the environment. Additionally, if one or more OIDs are specified, the calculated keys are used when processing the SNMPv3 requests. .It Fl l Ar filename The path of the posix local (unix domain) socket if local transport is used. .It Fl M Ar max-repetitions The value for the max-repetitions field in a GetBulk PDU. Default is 10. .It Fl N Ar non-repeaters The value for the non-repeaters field in a GetBulk PDU. Default is 0. .It Fl n Only use numerical representations for input and output OIDs and do not try to resolve symbolic object names. Note that .Nm bsnmpget , .Nm bsnmpwalk and .Nm bsnmpset will print numerical OIDs anyway if the corresponding string representation is not found in the MIB description files. .It Fl o Ar [quiet|short|verbose] The format used to print the received response. Quiet only prints values, short (default) prints an abbreviated OID representation and the value. In addition to the short output verbose prints the type before the value. .It Fl P Ar options Privacy options to use with SNMPv3 PDUs .Bl -tag -width \& .It Cm proto=[aes|des] The protocol to use when encrypting/decrypting SNMPv3 PDU data. .It Cm key=privkey A binary localized privacy key to use when encrypting/decrypting SNMPv3 PDU data. .El .Pp By default plain text SNMPv3 PDUs are sent. .It Fl p Ar [get|getnext|getbulk] The PDU type to send by .Nm bsmpget and .Nm bsnmpwalk . Default is get for .Nm bsmpget and getnext for .Nm bsnmpwalk . Getbulk allows executing the so called SNMP "bulkwalks" allowing the values of multiple columns to be retrieved in a single PDU by .Nm bsnmpwalk . .It Fl r Ar retries Number of resends of request packets before giving up if the agent does not respond after the first try. Default is 3. .It Fl s Ar [trans::] Ns Ar [community@] Ns Ar [server] Ns Ar [:port] Each of the server specification components is optional but at least one has to be provided if the .Ar s option is used. The server specification is constructed in the following manner: .Bl -tag -width \& .It Cm trans:: Transport type may be one of udp, stream or dgram. If this option is not provided an UDP inet/inet6 socket will be used, which is the most common. Stream stands for a posix local stream socket and a posix local datagram socket will be used if dgram is specified. .It Cm community@ Specify an SNMP community string to be used when sending packets. If the option is skipped the default "public" will be used for .Nm and .Nm bsnmpwalk and the default "private" community string will be used for .Nm bsnmpset . .It Cm server This might be either the IP address or the hostname where the agent is listening. The default is .Qq localhost . .It Cm port The destination port to send the requests to. This is useful if the SNMP agent listens on a non-default port. Default is given by the .Qq snmp entry in .Pa /etc/services , port 161. .El .It Fl t Ar timeout Number of seconds before resending a request packet if the agent does not respond. The default value is 3 seconds. .It Fl U Ar options User credentials when sending SNMPv3 PDUs. .Bl -tag -width \& .It Cm engine=id The Engine ID of the SNMP agent represented as a binary octet string. .It Cm engine-boots=value The value of the snmpEngineBoots of the SNMP agent. .It Cm engine-time=value The value of the snmpEngineTime of the SNMP agent. .Pp If any of the above is not specified, SNMP USM Engine Discovery is attempted. This is also the default behavior. .It Cm name=username The USM user name to include in the SNMPv3 PDUs. By default, the user name is obtained via the environment. .El .It Fl v Ar version The SNMP protocol version to use when sending requests. SNMP versions 1, 2 and 3 are supported. If no version option is provided .Nm bsnmpget , .Nm bsnmpwalk and .Nm bsnmpset will use version 2. Note that GetBulkRequest-PDUs were introduced in SNMPv2 thus setting the version to 1 is incompatible with sending a GetBulk PDU. .It OID The object identifier whose value to retrieve. At least one OID should be provided for .Nm bsnmpget to be able to send a request. .Pp For .Nm bsnmpwalk this is the root object identifier of the subtree whose values are to be retrieved. If no OID is provided .Nm bsnmpwalk will walk the mib2 subtree rooted at .iso(1).org(3).dod(6).internet(1).mgmt(2).mib2(1) . .Pp Any of the formats used to print a single variable is valid as input OID: .Bl -tag -width \& .It 1.3.6.1.2.1.25.1.1.0 .It sysDescr .It ifPhysAddress.1 .It ifRcvAddressStatus.2.6.255.255.255.255.255.255 .It ifRcvAddressType[2,ff:ff:ff:ff:ff:ff] .It ifRcvAddressStatus[Integer:1,OctetString:ff:ff:ff:ff:ff:ff] (requires the .Fl o Ar verbose option) .El .Pp Square brackets are used to denote an entry's indexes. When used in an input OID, the square brackets may have to be escaped or the OID has to be quoted to protect it from the shell. Note there is no difference between ifName.1 and "ifName[1]". .It OID Ns = Ns Ar [syntax Ns :] Ns Ar value The object identifier with its syntax type and value that is to be set. At least one such string OID=[syntax:]value should be provided to .Nm bsnmpset to be able to send a request. .Bl -tag -width \& .It Cm OID OID may be input as a string, a string followed by a random number of integers (suboids) separated by dots, a sequence of integers separated by dots - that is if the .Ar n option is used - and in such case a syntax is required for every value, or a string followed by square brackets (used to denote an entry's indexes) and corresponding indexes. Any of the formats used to print a single variable by .Nm bsnmpset is valid as input OID as well: .Bl -tag -width \& .It 1.3.6.1.2.1.25.1.1.0=TimeTicks:537615486 .It sysLocation=OctetString:"@ Home" (with Fl o Ar verbose No option) .It sysLocation.0="@ Home" .It 1.3.6.1.2.1.2.2.1.6.1=OctetString:ffffffffffff .It ifPhysAddress.1="00:02:b3:1d:1c:a3" .It ifRcvAddressStatus.1.6.255.255.255.255.255.255=1 .It "ifRcvAddressStatus[Integer:1,OctetString:ff:ff:ff:ff:ff:ff]=Integer:1" (with the .Fl o Ar verbose option) .El .It Cm syntax where the syntax string is one of: Integer, OctetString, OID, IpAddress, Counter32, Gauge, TimeTicks, Counter64. .It Cm value The value to be set - IP address in form of u.u.u.u - for example 1.3.1.6.1.2.0=IpAddress:192.168.0.1, strings require inverted-commas if they contain any special characters or spaces, all other numeric types do not. .El .El .Sh ENVIRONMENT .Nm , .Nm bsnmpwalk and .Nm bsnmpset use the following environment variables: .Bl -tag -width SNMPAUTH .It Ev SNMPAUTH Specifies a default SNMP USM authentication protocol. .It Ev SNMPPRIV Specifies a default SNMP USM privacy protocol. .It Ev SNMPUSER Specifies a default SNMP USM user name. .It Ev SNMPPASSWD Specifies the SNMP USM plain text password to use when calculating localized authentication and privacy keys. If this variable exists in the environment, SNMPv3 is the default version to use for outgoing requests. .El .Sh SEE ALSO .Xr gensnmpdef 1 .Sh AUTHORS -.An Shteryana Shopova Aq syrinx@FreeBSD.org +.An Shteryana Shopova Aq Mt syrinx@FreeBSD.org Index: head/usr.sbin/btxld/btxld.8 =================================================================== --- head/usr.sbin/btxld/btxld.8 (revision 267667) +++ head/usr.sbin/btxld/btxld.8 (revision 267668) @@ -1,98 +1,98 @@ .\" Copyright (c) 1998 Robert Nordier .\" 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 September 12, 1998 .Dt BTXLD 8 .Os .Sh NAME .Nm btxld .Nd link editor for BTX clients .Sh SYNOPSIS .Nm .Op Fl qv .Op Fl b Ar file .Op Fl E Ar address .Op Fl e Ar address .Op Fl f Ar format .Op Fl l Ar file .Op Fl o Ar filename .Op Fl P Ar page .Op Fl W Ar page .Ar file .Sh DESCRIPTION The .Nm utility binds the specified client executable together with a BTX loader program and the BTX kernel, and creates a composite object file suitable for loading during the boot process. .Pp The options are: .Bl -tag -width indent .It Fl q Quiet: inhibit warnings. .It Fl v Verbose: display information about the files processed. .It Fl b Ar file Specify the BTX kernel to be bound with the client. .It Fl E Ar address Set the client entry point. .It Fl e Ar address Set the BTX loader entry point. .It Fl f Ar format Specify the output format, where .Ar format is one of .Sq bin , .Sq aout , or .Sq elf . .It Fl l Ar file Specify the BTX loader to be bound with the client. .It Fl o Ar filename Name the output file. The default is .Dq a.out . .It Fl P Ar page Specify the first page of the client's segment to be marked .Sq present , where .Ar page may be 0 or 1. .It Fl W Ar page Specify the first page of the client's segment to be marked .Sq writable , where .Ar page may be 0, and should not exceed the number of pages occupied by the combined .text and .data segments of the client image. .El .Sh EXIT STATUS .Ex -std .Sh SEE ALSO .Xr ld 1 , .Xr boot 8 .Sh AUTHORS -.An Robert Nordier Aq rnordier@FreeBSD.org . +.An Robert Nordier Aq Mt rnordier@FreeBSD.org Index: head/usr.sbin/chkgrp/chkgrp.8 =================================================================== --- head/usr.sbin/chkgrp/chkgrp.8 (revision 267667) +++ head/usr.sbin/chkgrp/chkgrp.8 (revision 267668) @@ -1,93 +1,93 @@ .\" Copyright (c) 1998 Dag-Erling Coïdan Smørgrav .\" 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 .\" in this position and unchanged. .\" 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. The name of the author may not be used to endorse or promote products .\" derived from this software without specific prior written permission .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" .\" $FreeBSD$ .\" .Dd May 26, 2005 .Dt CHKGRP 8 .Os .Sh NAME .Nm chkgrp .Nd check the syntax of the group file .Sh SYNOPSIS .Nm .Op Fl q .Op Ar groupfile .Sh DESCRIPTION The .Nm utility scans the given file or, failing that, the system-wide group file for errors. Specifically, it checks that every non-blank, non-comment entry is composed of four colon-separated fields, that none of them contains whitespace, and that the third field (the group ID) is numeric. It will also check for invalid characters in the group names and group members. The following options are available: .Bl -tag -width indent .It Fl q This option disables printing of text when the group format is correct. .El .Sh FILES .Bl -tag -width /etc/group -compact .It Pa /etc/group group database file .El .Sh EXIT STATUS The .Nm utility returns .Dv EX_DATAERR if errors were found in the group file, and .Dv EX_OK otherwise. .Sh DIAGNOSTICS For each error found, .Nm will print an error message containing the name of the file being scanned and the line number on which the error was found. .Sh SEE ALSO .Xr getgrent 3 , .Xr group 5 .Sh HISTORY The .Nm utility appeared in .Fx 3.0 . .Sh AUTHORS .An -nosplit The .Nm utility and this manual page were written by -.An Dag-Erling Sm\(/orgrav Aq des@FreeBSD.org . +.An Dag-Erling Sm\(/orgrav Aq Mt des@FreeBSD.org . Further functionality was added by -.An Liam J. Foy Aq liamfoy@dragonflybsd.org . +.An Liam J. Foy Aq Mt liamfoy@dragonflybsd.org . .Sh BUGS Should check the range of the group ID. Index: head/usr.sbin/cpucontrol/cpucontrol.8 =================================================================== --- head/usr.sbin/cpucontrol/cpucontrol.8 (revision 267667) +++ head/usr.sbin/cpucontrol/cpucontrol.8 (revision 267668) @@ -1,182 +1,182 @@ .\" Copyright (c) 2006, 2008 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 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 June 30, 2009 .Dt CPUCONTROL 8 .Os .Sh NAME .Nm cpucontrol .Nd control utility for the .Xr cpuctl 4 device .Sh SYNOPSIS .Nm .Op Fl vh .Fl m Ar msr .Bk .Ar device .Ek .Nm .Op Fl vh .Fl m Ar msr Ns = Ns Ar value .Bk .Ar device .Ek .Nm .Op Fl vh .Fl m Ar msr Ns &= Ns Ar mask .Bk .Ar device .Ek .Nm .Op Fl vh .Fl m Ar msr Ns |= Ns Ar mask .Bk .Ar device .Ek .Nm .Op Fl vh .Fl i Ar level .Bk .Ar device .Ek .Nm .Op Fl vh .Fl i Ar level,level_type .Bk .Ar device .Ek .Nm .Op Fl vh .Op Fl d Ar datadir .Fl u .Bk .Ar device .Ek .Sh DESCRIPTION The .Nm utility can be used to read and write arbitrary machine-specific CPU registers via the .Xr cpuctl 4 special device. It can also be used to apply CPU firmware updates. .Pp The following options are available: .Bl -tag -width indent .It Fl d Ar datadir Where to look for microcode images. The option can be specified multiple times. .It Fl m Ar msr Ns Op = Ns Ar value Show value of the specified MSR. MSR register number should be given as a hexadecimal number. .It Fl m Ar msr Ns = Ns Ar value Store the .Ar value in the specified MSR register. The .Ar value argument can be prefixed with ~ operator. In this case the inverted value of argument will be stored in the register. .It Fl m Ar msr Ns &= Ns Ar mask Store the result of bitwise AND operation between .Ar mask and the current MSR value in the MSR register. The .Ar mask argument can be prefixed with ~ operator. In this case the inverted value of mask will be used. .It Fl m Ar msr Ns |= Ns Ar mask Store the result of bitwise OR operation between .Ar mask and the current MSR value in the MSR register. The .Ar mask argument can be prefixed with ~ operator. In this case the inverted value of mask will be used. .It Fl i Ar level Retrieve CPUID info. Level should be given as a hex number. .It Fl i Ar level,level_type Retrieve CPUID info. Level and level_type should be given as hex numbers. .It Fl u Apply CPU firmware updates. The .Nm utility will walk through the configured data directories and apply all firmware updates available for this CPU. .It Fl v Increase the verbosity level. .It Fl h Show help message. .El .Sh EXIT STATUS .Ex -std .Sh EXAMPLES The command .Pp .Dq Li "cpucontrol -m 0x10 /dev/cpuctl0" .Pp will read the contents of TSC MSR from CPU 0. .Pp To set the CPU 0 TSC MSR register value to 0x1 issue .Pp .Dq Li "cpucontrol -m 0x10=0x1 /dev/cpuctl0" . .Pp The following command will clear the second bit of TSC register: .Pp .Dq Li "cpucontrol -m 0x10&=~0x02 /dev/cpuctl0" . .Pp The following command will set the forth and second bit of TSC register: .Pp .Dq Li "cpucontrol -m 0x10|=0x0a /dev/cpuctl0" . .Pp The command .Pp .Dq Li "cpucontrol -i 0x1 /dev/cpuctl1" .Pp will retrieve the CPUID level 0x1 from CPU 1. .Pp To perform firmware updates on CPU 0 from images located at .Pa /usr/local/share/cpuctl/ use the following command: .Pp .Dq Li "cpucontrol -d /usr/local/share/cpuctl/ -u /dev/cpuctl0" .Sh SEE ALSO .Xr cpuctl 4 .Sh HISTORY The .Nm utility first appeared in .Fx 7.2 . .Sh AUTHORS The .Nm utility and this manual page was written by -.An Stanislav Sedov Aq stas@FreeBSD.org . +.An Stanislav Sedov Aq Mt stas@FreeBSD.org . .Sh BUGS Yes, probably, report if any. Index: head/usr.sbin/cron/cron/cron.8 =================================================================== --- head/usr.sbin/cron/cron/cron.8 (revision 267667) +++ head/usr.sbin/cron/cron/cron.8 (revision 267668) @@ -1,221 +1,221 @@ .\"/* Copyright 1988,1990,1993 by Paul Vixie .\" * All rights reserved .\" * .\" * Distribute freely, except: don't remove my name from the source or .\" * documentation (don't take credit for my work), mark your changes (don't .\" * get me blamed for your possible bugs), don't alter or remove this .\" * notice. May be sold if buildable source is provided to buyer. No .\" * warrantee of any kind, express or implied, is included with this .\" * software; use at your own risk, responsibility for damages (if any) to .\" * anyone resulting from the use of this software rests entirely with the .\" * user. .\" * .\" * Send bug reports, bug fixes, enhancements, requests, flames, etc., and .\" * I'll try to keep a version up to date. I can be reached as follows: .\" * Paul Vixie uunet!decwrl!vixie!paul .\" */ .\" .\" $FreeBSD$ .\" .Dd June 29, 2008 .Dt CRON 8 .Os .Sh NAME .Nm cron .Nd daemon to execute scheduled commands (Vixie Cron) .Sh SYNOPSIS .Nm .Op Fl j Ar jitter .Op Fl J Ar rootjitter .Op Fl m Ar mailto .Op Fl s .Op Fl o .Op Fl x Ar debugflag Ns Op , Ns Ar ... .Sh DESCRIPTION The .Nm utility should be started from .Pa /etc/rc or .Pa /etc/rc.local . It will return immediately, so you do not need to start it with '&'. .Pp The .Nm utility searches .Pa /var/cron/tabs for crontab files which are named after accounts in .Pa /etc/passwd ; crontabs found are loaded into memory. The .Nm utility also searches for .Pa /etc/crontab which is in a different format (see .Xr crontab 5 ) . .Pp The .Nm utility then wakes up every minute, examining all stored crontabs, checking each command to see if it should be run in the current minute. Before running a command from a per-account crontab file, .Nm checks the status of the account with .Xr pam 3 and skips the command if the account is unavailable, e.g., locked out or expired. Commands from .Pa /etc/crontab bypass this check. When executing commands, any output is mailed to the owner of the crontab (or to the user named in the .Ev MAILTO environment variable in the crontab, if such exists). .Pp Additionally, .Nm checks each minute to see if its spool directory's modification time (or the modification time on .Pa /etc/crontab ) has changed, and if it has, .Nm will then examine the modification time on all crontabs and reload those which have changed. Thus .Nm need not be restarted whenever a crontab file is modified. Note that the .Xr crontab 1 command updates the modification time of the spool directory whenever it changes a crontab. .Pp Available options: .Bl -tag -width indent .It Fl j Ar jitter Enable time jitter. Prior to executing commands, .Nm will sleep a random number of seconds in the range from 0 to .Ar jitter . This will not affect superuser jobs (see .Fl J ) . A value for .Ar jitter must be between 0 and 60 inclusive. Default is 0, which effectively disables time jitter. .Pp This option can help to smooth down system load spikes during moments when a lot of jobs are likely to start at once, e.g., at the beginning of the first minute of each hour. .It Fl J Ar rootjitter Enable time jitter for superuser jobs. The same as .Fl j except that it will affect jobs run by the superuser only. .It Fl m Ar mailto Overrides the default recipient for .Nm mail. Each .Xr crontab 5 without .Ev MAILTO explicitly set will send mail to the .Ar mailto mailbox. Sending mail will be disabled by default if .Ar mailto set to a null string, usually specified in a shell as .Li '' or .Li \*q\*q . .It Fl s Enable special handling of situations when the GMT offset of the local timezone changes, such as the switches between the standard time and daylight saving time. .Pp The jobs run during the GMT offset changes time as intuitively expected. If a job falls into a time interval that disappears (for example, during the switch from standard time) to daylight saving time or is duplicated (for example, during the reverse switch), then it is handled in one of two ways: .Pp The first case is for the jobs that run every at hour of a time interval overlapping with the disappearing or duplicated interval. In other words, if the job had run within one hour before the GMT offset change (and cron was not restarted nor the .Xr crontab 5 changed after that) or would run after the change at the next hour. They work as always, skip the skipped time or run in the added time as usual. .Pp The second case is for the jobs that run less frequently. They are executed exactly once, they are not skipped nor executed twice (unless cron is restarted or the user's .Xr crontab 5 is changed during such a time interval). If an interval disappears due to the GMT offset change, such jobs are executed at the same absolute point of time as they would be in the old time zone. For example, if exactly one hour disappears, this point would be during the next hour at the first minute that is specified for them in .Xr crontab 5 . .It Fl o Disable the special handling of situations when the GMT offset of the local timezone changes, to be compatible with the old (default) behavior. If both options .Fl o and .Fl s are specified, the option specified last wins. .It Fl x Ar debugflag Ns Op , Ns Ar ... Enable writing of debugging information to standard output. One or more of the following comma separated .Ar debugflag identifiers must be specified: .Pp .Bl -tag -width ".Cm proc" -compact .It Cm bit currently not used .It Cm ext make the other debug flags more verbose .It Cm load be verbose when loading crontab files .It Cm misc be verbose about miscellaneous one-off events .It Cm pars be verbose about parsing individual crontab lines .It Cm proc be verbose about the state of the process, including all of its offspring .It Cm sch be verbose when iterating through the scheduling algorithms .It Cm test trace through the execution, but do not perform any actions .El .El .Sh FILES .Bl -tag -width /etc/pam.d/cron -compact .It Pa /etc/crontab System crontab file .It Pa /etc/pam.d/cron .Xr pam.conf 5 configuration file for .Nm .It Pa /var/cron/tabs Directory for personal crontab files .El .Sh SEE ALSO .Xr crontab 1 , .Xr pam 3 , .Xr crontab 5 , .Xr pam.conf 5 .Sh AUTHORS -.An Paul Vixie Aq paul@vix.com +.An Paul Vixie Aq Mt paul@vix.com Index: head/usr.sbin/cron/crontab/crontab.1 =================================================================== --- head/usr.sbin/cron/crontab/crontab.1 (revision 267667) +++ head/usr.sbin/cron/crontab/crontab.1 (revision 267668) @@ -1,145 +1,145 @@ .\"/* Copyright 1988,1990,1993 by Paul Vixie .\" * All rights reserved .\" * .\" * Distribute freely, except: don't remove my name from the source or .\" * documentation (don't take credit for my work), mark your changes (don't .\" * get me blamed for your possible bugs), don't alter or remove this .\" * notice. May be sold if buildable source is provided to buyer. No .\" * warrantee of any kind, express or implied, is included with this .\" * software; use at your own risk, responsibility for damages (if any) to .\" * anyone resulting from the use of this software rests entirely with the .\" * user. .\" * .\" * Send bug reports, bug fixes, enhancements, requests, flames, etc., and .\" * I'll try to keep a version up to date. I can be reached as follows: .\" * Paul Vixie uunet!decwrl!vixie!paul .\" */ .\" .\" $FreeBSD$ .\" .Dd May 13, 2010 .Dt CRONTAB 1 .Os .Sh NAME .Nm crontab .Nd maintain crontab files for individual users (V3) .Sh SYNOPSIS .Nm .Op Fl u Ar user .Ar file .Nm .Op Fl u Ar user { .Fl l | .Fl r | .Fl e } .Sh DESCRIPTION The .Nm utility is the program used to install, deinstall or list the tables used to drive the .Xr cron 8 daemon in Vixie Cron. Each user can have their own crontab, and though these are files in .Pa /var , they are not intended to be edited directly. .Pp If the .Pa allow file exists, then you must be listed therein in order to be allowed to use this command. If the .Pa allow file does not exist but the .Pa deny file does exist, then you must .Em not be listed in the .Pa deny file in order to use this command. If neither of these files exists, then depending on site-dependent configuration parameters, only the super user will be allowed to use this command, or all users will be able to use this command. The format of these files is one username per line, with no leading or trailing whitespace. Lines of other formats will be ignored, and so can be used for comments. .Pp The first form of this command is used to install a new crontab from some named file or standard input if the pseudo-filename .Sq Fl is given. .Pp The following options are available: .Bl -tag -width indent .It Fl u Specify the name of the user whose crontab is to be tweaked. If this option is not given, .Nm examines .Dq your crontab, i.e., the crontab of the person executing the command. Note that .Xr su 1 can confuse .Nm and that if you are running inside of .Xr su 1 you should always use the .Fl u option for safety's sake. .It Fl l Display the current crontab on standard output. .It Fl r Remove the current crontab. .It Fl e Edit the current crontab using the editor specified by the .Ev VISUAL or .Ev EDITOR environment variables. The specified editor .Em must edit the file in place; any editor that unlinks the file and recreates it cannot be used. After you exit from the editor, the modified crontab will be installed automatically. .El .Sh FILES .Bl -tag -width /var/cron/allow -compact .It Pa /var/cron/allow List of users allowed to use crontab .It Pa /var/cron/deny List of users prohibited from using crontab .It Pa /var/cron/tabs Directory for personal crontab files .El .Sh DIAGNOSTICS A fairly informative usage message appears if you run it with a bad command line. .Sh SEE ALSO .Xr crontab 5 , .Xr cron 8 .Sh STANDARDS The .Nm command conforms to .St -p1003.2 with the exception that the dangerous variant of calling .Nm without a file name in the first form of the command is not allowed by this implementation. The pseudo-filename .Sq Fl must be specified to read from standard input. The new command syntax differs from previous versions of Vixie Cron, as well as from the classic SVR3 syntax. .Sh AUTHORS -.An Paul Vixie Aq paul@vix.com +.An Paul Vixie Aq Mt paul@vix.com Index: head/usr.sbin/cron/crontab/crontab.5 =================================================================== --- head/usr.sbin/cron/crontab/crontab.5 (revision 267667) +++ head/usr.sbin/cron/crontab/crontab.5 (revision 267668) @@ -1,323 +1,323 @@ .\"/* Copyright 1988,1990,1993,1994 by Paul Vixie .\" * All rights reserved .\" * .\" * Distribute freely, except: don't remove my name from the source or .\" * documentation (don't take credit for my work), mark your changes (don't .\" * get me blamed for your possible bugs), don't alter or remove this .\" * notice. May be sold if buildable source is provided to buyer. No .\" * warrantee of any kind, express or implied, is included with this .\" * software; use at your own risk, responsibility for damages (if any) to .\" * anyone resulting from the use of this software rests entirely with the .\" * user. .\" * .\" * Send bug reports, bug fixes, enhancements, requests, flames, etc., and .\" * I'll try to keep a version up to date. I can be reached as follows: .\" * Paul Vixie uunet!decwrl!vixie!paul .\" */ .\" .\" $FreeBSD$ .\" .Dd April 28, 2012 .Dt CRONTAB 5 .Os .Sh NAME .Nm crontab .Nd tables for driving cron .Sh DESCRIPTION A .Nm file contains instructions to the .Xr cron 8 daemon of the general form: ``run this command at this time on this date''. Each user has their own crontab, and commands in any given crontab will be executed as the user who owns the crontab. Uucp and News will usually have their own crontabs, eliminating the need for explicitly running .Xr su 1 as part of a cron command. .Pp Blank lines and leading spaces and tabs are ignored. Lines whose first non-space character is a pound-sign (#) are comments, and are ignored. Note that comments are not allowed on the same line as cron commands, since they will be taken to be part of the command. Similarly, comments are not allowed on the same line as environment variable settings. .Pp An active line in a crontab will be either an environment setting or a cron command. An environment setting is of the form, .Bd -literal name = value .Ed .Pp where the spaces around the equal-sign (=) are optional, and any subsequent non-leading spaces in .Em value will be part of the value assigned to .Em name . The .Em value string may be placed in quotes (single or double, but matching) to preserve leading or trailing blanks. The .Em name string may also be placed in quote (single or double, but matching) to preserve leading, trailing or inner blanks. .Pp Several environment variables are set up automatically by the .Xr cron 8 daemon. .Ev SHELL is set to .Pa /bin/sh , .Ev PATH is set to .Pa /usr/bin:/bin , and .Ev LOGNAME and .Ev HOME are set from the .Pa /etc/passwd line of the crontab's owner. .Ev HOME , .Ev PATH and .Ev SHELL may be overridden by settings in the crontab; .Ev LOGNAME may not. .Pp (Another note: the .Ev LOGNAME variable is sometimes called .Ev USER on .Bx systems... On these systems, .Ev USER will be set also). .Pp In addition to .Ev LOGNAME , .Ev HOME , .Ev PATH , and .Ev SHELL , .Xr cron 8 will look at .Ev MAILTO if it has any reason to send mail as a result of running commands in ``this'' crontab. If .Ev MAILTO is defined (and non-empty), mail is sent to the user so named. .Ev MAILTO may also be used to direct mail to multiple recipients by separating recipient users with a comma. If .Ev MAILTO is defined but empty (MAILTO=""), no mail will be sent. Otherwise mail is sent to the owner of the crontab. This option is useful if you decide on .Pa /bin/mail instead of .Pa /usr/lib/sendmail as your mailer when you install cron -- .Pa /bin/mail does not do aliasing, and UUCP usually does not read its mail. .Pp The format of a cron command is very much the V7 standard, with a number of upward-compatible extensions. Each line has five time and date fields, followed by a user name (with optional ``:'' and ``/'' suffixes) if this is the system crontab file, followed by a command. Commands are executed by .Xr cron 8 when the minute, hour, and month of year fields match the current time, .Em and when at least one of the two day fields (day of month, or day of week) matches the current time (see ``Note'' below). .Xr cron 8 examines cron entries once every minute. The time and date fields are: .Bd -literal -offset indent field allowed values ----- -------------- minute 0-59 hour 0-23 day of month 1-31 month 1-12 (or names, see below) day of week 0-7 (0 or 7 is Sun, or use names) .Ed .Pp A field may be an asterisk (*), which always stands for ``first\-last''. .Pp Ranges of numbers are allowed. Ranges are two numbers separated with a hyphen. The specified range is inclusive. For example, 8-11 for an ``hours'' entry specifies execution at hours 8, 9, 10 and 11. .Pp Lists are allowed. A list is a set of numbers (or ranges) separated by commas. Examples: ``1,2,5,9'', ``0-4,8-12''. .Pp Step values can be used in conjunction with ranges. Following a range with ``/'' specifies skips of the number's value through the range. For example, ``0-23/2'' can be used in the hours field to specify command execution every other hour (the alternative in the V7 standard is ``0,2,4,6,8,10,12,14,16,18,20,22''). Steps are also permitted after an asterisk, so if you want to say ``every two hours'', just use ``*/2''. .Pp Names can also be used for the ``month'' and ``day of week'' fields. Use the first three letters of the particular day or month (case does not matter). Ranges or lists of names are not allowed. .Pp The ``sixth'' field (the rest of the line) specifies the command to be run. The entire command portion of the line, up to a newline or % character, will be executed by .Pa /bin/sh or by the shell specified in the .Ev SHELL variable of the cronfile. Percent-signs (%) in the command, unless escaped with backslash (\\), will be changed into newline characters, and all data after the first % will be sent to the command as standard input. .Pp Note: The day of a command's execution can be specified by two fields \(em day of month, and day of week. If both fields are restricted (ie, are not *), the command will be run when .Em either field matches the current time. For example, ``30 4 1,15 * 5'' would cause a command to be run at 4:30 am on the 1st and 15th of each month, plus every Friday. .Pp Instead of the first five fields, one of eight special strings may appear: .Bd -literal -offset indent string meaning ------ ------- @reboot Run once, at startup of cron. @yearly Run once a year, "0 0 1 1 *". @annually (same as @yearly) @monthly Run once a month, "0 0 1 * *". @weekly Run once a week, "0 0 * * 0". @daily Run once a day, "0 0 * * *". @midnight (same as @daily) @hourly Run once an hour, "0 * * * *". @every_minute Run once a minute, "*/1 * * * *". @every_second Run once a second. .Ed .Sh EXAMPLE CRON FILE .Bd -literal # use /bin/sh to run commands, overriding the default set by cron SHELL=/bin/sh # mail any output to `paul', no matter whose crontab this is MAILTO=paul # # run five minutes after midnight, every day 5 0 * * * $HOME/bin/daily.job >> $HOME/tmp/out 2>&1 # run at 2:15pm on the first of every month -- output mailed to paul 15 14 1 * * $HOME/bin/monthly # run at 10 pm on weekdays, annoy Joe 0 22 * * 1-5 mail -s "It's 10pm" joe%Joe,%%Where are your kids?% 23 0-23/2 * * * echo "run 23 minutes after midn, 2am, 4am ..., everyday" 5 4 * * sun echo "run at 5 after 4 every sunday" .Ed .Sh SEE ALSO .Xr crontab 1 , .Xr cron 8 .Sh EXTENSIONS When specifying day of week, both day 0 and day 7 will be considered Sunday. .Bx and .Tn ATT seem to disagree about this. .Pp Lists and ranges are allowed to co-exist in the same field. "1-3,7-9" would be rejected by .Tn ATT or .Bx cron -- they want to see "1-3" or "7,8,9" ONLY. .Pp Ranges can include "steps", so "1-9/2" is the same as "1,3,5,7,9". .Pp Names of months or days of the week can be specified by name. .Pp Environment variables can be set in the crontab. In .Bx or .Tn ATT , the environment handed to child processes is basically the one from .Pa /etc/rc . .Pp Command output is mailed to the crontab owner .No ( Bx cannot do this), can be mailed to a person other than the crontab owner (SysV cannot do this), or the feature can be turned off and no mail will be sent at all (SysV cannot do this either). .Pp All of the .Sq @ commands that can appear in place of the first five fields are extensions. .Sh AUTHORS -.An Paul Vixie Aq paul@vix.com +.An Paul Vixie Aq Mt paul@vix.com .Sh BUGS If you are in one of the 70-odd countries that observe Daylight Savings Time, jobs scheduled during the rollback or advance may be affected if .Xr cron 8 is not started with the .Fl s flag. In general, it is not a good idea to schedule jobs during this period if .Xr cron 8 is not started with the .Fl s flag, which is enabled by default. See .Xr cron 8 for more details. .Pp For US timezones (except parts of AZ and HI) the time shift occurs at 2AM local time. For others, the output of the .Xr zdump 8 program's verbose .Fl ( v ) option can be used to determine the moment of time shift. Index: head/usr.sbin/crunch/crunchgen/crunchgen.1 =================================================================== --- head/usr.sbin/crunch/crunchgen/crunchgen.1 (revision 267667) +++ head/usr.sbin/crunch/crunchgen/crunchgen.1 (revision 267668) @@ -1,475 +1,475 @@ .\" .\" Copyright (c) 1994 University of Maryland .\" All Rights Reserved. .\" .\" Permission to use, copy, modify, distribute, and sell this software and its .\" documentation for any purpose is hereby granted without fee, provided that .\" the above copyright notice appear in all copies and that both that .\" copyright notice and this permission notice appear in supporting .\" documentation, and that the name of U.M. not be used in advertising or .\" publicity pertaining to distribution of the software without specific, .\" written prior permission. U.M. makes no representations about the .\" suitability of this software for any purpose. It is provided "as is" .\" without express or implied warranty. .\" .\" U.M. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL U.M. .\" BE LIABLE FOR ANY SPECIAL, 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. .\" .\" Author: James da Silva, Systems Design and Analysis Group .\" Computer Science Department .\" University of Maryland at College Park .\" $FreeBSD$ .\" .Dd December 23, 2005 .Dt CRUNCHGEN 1 .Os .Sh NAME .Nm crunchgen .Nd generates build environment for a crunched binary .Sh SYNOPSIS .Bk -words .Nm .Op Fl foql .Op Fl h Ar makefile-header-name .Op Fl m Ar makefile-name .Op Fl p Ar obj-prefix .Op Fl c Ar c-file-name .Op Fl e Ar exec-file-name .Op Ar conf-file .Ek .Sh DESCRIPTION A crunched binary is a program made up of many other programs linked together into a single executable. The crunched binary .Fn main function determines which component program to run by the contents of .Va argv[0] . The main reason to crunch programs together is for fitting as many programs as possible onto an installation or system recovery floppy. .Pp The .Nm utility reads in the specifications in .Ar conf-file for a crunched binary, and generates a .Pa Makefile and accompanying top-level C source file that when built creates the crunched executable file from the component programs. For each component program, .Nm can optionally attempt to determine the object (.o) files that make up the program from its source directory .Pa Makefile . This information is cached between runs. The .Nm utility uses the companion program .Xr crunchide 1 to eliminate link-time conflicts between the component programs by hiding all unnecessary symbols. .Pp The .Nm utility places specific requirements on package .Pa Makefile Ns s which make it unsuitable for use with .No non- Ns Bx sources. In particular, the .Pa Makefile must contain the target .Ic depend , and it must define all object files in the variable .Va OBJS . In some cases, you can use a fake .Pa Makefile : before looking for .Pa Makefile in the source directory .Pa foo , .Nm looks for the file .Pa Makefile.foo in the current directory. .Pp After .Nm is run, the crunched binary can be built by running .Dq Li make -f .mk . The component programs' object files must already be built. An .Ic objs target, included in the output makefile, will run .Xr make 1 in each component program's source dir to build the object files for the user. This is not done automatically since in release engineering circumstances it is generally not desirable to be modifying objects in other directories. .Pp The options are as follows: .Bl -tag -width indent .It Fl c Ar c-file-name Set output C file name to .Ar c-file-name . The default name is .Pa .c . .It Fl e Ar exec-file-name Set crunched binary executable file name to .Ar exec-file-name . The default name is .Pa . .It Fl f Flush cache. Forces the recalculation of cached parameters. .It Fl l List names. Lists the names this binary will respond to. .It Fl h Ar makefile-header-name Set the name of a file to be included at the beginning of the .Pa Makefile Ns s generated by .Nm . This is useful to define some make variables such as .Va RELEASE_CRUNCH or similar, which might affect the behavior of .Xr make 1 and are annoying to pass through environment variables. .It Fl m Ar makefile-name Set output .Pa Makefile name to .Ar makefile-name . The default name is .Pa .mk . .It Fl o Add .Dq Li make obj rules to each program make target. .It Fl p Ar obj-prefix Set the pathname to be prepended to the .Ic srcdir when computing the .Ic objdir . If this option is not present, then the prefix used is the content of the .Ev MAKEOBJDIRPREFIX environment variable, or .Pa /usr/obj . .It Fl q Quiet operation. Status messages are suppressed. .El .Sh CRUNCHGEN CONFIGURATION FILE COMMANDS The .Nm utility reads specifications from the .Ar conf-file that describe the components of the crunched binary. In its simplest use, the component program names are merely listed along with the top-level source directories in which their sources can be found. The .Nm utility then calculates (via the source makefiles) and caches the list of object files and their locations. For more specialized situations, the user can specify by hand all the parameters that .Nm needs. .Pp The .Ar conf-file commands are as follows: .Bl -tag -width indent .It Ic srcdirs Ar dirname ... A list of source trees in which the source directories of the component programs can be found. These dirs are searched using the .Bx .Dq Pa // convention. Multiple .Ic srcdirs lines can be specified. The directories are searched in the order they are given. .It Ic progs Ar progname ... A list of programs that make up the crunched binary. Multiple .Ic progs lines can be specified. .It Ic libs Ar libspec ... A list of library specifications to be included in the crunched binary link. Multiple .Ic libs lines can be specified. .It Ic libs_so Ar libspec ... A list of library specifications to be dynamically linked in the crunched binary. These libraries will need to be made available via the run-time link-editor .Xr rtld 1 when the component program that requires them is executed from the crunched binary. Multiple .Ic libs_so lines can be specified. The .Ic libs_so directive overrides a library specified gratuitously on a .Ic libs line. .It Ic buildopts Ar buildopts ... A list of build options to be added to every make target. .It Ic ln Ar progname linkname Causes the crunched binary to invoke .Ar progname whenever .Ar linkname appears in .Va argv[0] . This allows programs that change their behavior when run under different names to operate correctly. .El .Pp To handle specialized situations, such as when the source is not available or not built via a conventional .Pa Makefile , the following .Ic special commands can be used to set .Nm parameters for a component program. .Bl -tag -width indent .It Ic special Ar progname Ic srcdir Ar pathname Set the source directory for .Ar progname . This is normally calculated by searching the specified .Ic srcdirs for a directory named .Ar progname . .It Ic special Ar progname Ic objdir Ar pathname Set the .Pa obj directory for .Ar progname . The .Pa obj directory is normally calculated by looking for a directory whose name is that of the source directory prepended by one of the following components, in order of priority: the .Fl p argument passed to the command line; or, the value of the .Ev MAKEOBJDIRPREFIX environment variable, or .Pa /usr/obj . If the directory is not found, the .Ic srcdir itself becomes the .Ic objdir . .It Ic special Ar progname Ic buildopts Ar buildopts Define a set of build options that should be added to .Xr make 1 targets in addition to those specified using .Ic buildopts when processing .Ar progname . .It Ic special Ar progname Ic objs Ar object-file-name ... Set the list of object files for program .Ar progname . This is normally calculated by constructing a temporary makefile that includes .Dq Ic srcdir Ns / Ns Pa Makefile and outputs the value of .Va $(OBJS) . .It Ic special Ar progname Ic objpaths Ar full-pathname-to-object-file ... Sets the pathnames of the object files for program .Ar progname . This is normally calculated by prepending the .Ic objdir pathname to each file in the .Ic objs list. .It Ic special Ar progname Ic objvar Ar variable_name Sets the name of the .Xr make 1 variable which holds the list of object files for program .Ar progname . This is normally .Va OBJS but some .Pa Makefile Ns s might like to use other conventions or prepend the program's name to the variable, e.g.\& .Va SSHD_OBJS . .It Ic special Ar progname Ic lib Ar library-name ... Specifies libraries to be linked with object files to produce .Ar progname Ns Pa .lo . This can be useful with libraries which redefine routines in the standard libraries, or poorly written libraries which reference symbols in the object files. .It Ic special Ar progname Ic keep Ar symbol-name ... Add specified list of symbols to the keep list for program .Ar progname . An underscore .Pq Ql _ is prepended to each symbol and it becomes the argument to a .Fl k option for the .Xr crunchide 1 phase. This option is to be used as a last resort as its use can cause a symbol conflict, however in certain instances it may be the only way to have a symbol resolve. .It Ic special Ar progname Ic ident Ar identifier Set the .Pa Makefile Ns / Ns Tn C identifier for .Ar progname . This is normally generated from a .Ar progname , mapping .Ql - to .Ql _ and ignoring all other non-identifier characters. This leads to programs named .Qq Li foo.bar and .Qq Li foobar to map to the same identifier. .El .Pp Only the .Ic objpaths parameter is actually needed by .Nm , but it is calculated from .Ic objdir and .Ic objs , which are in turn calculated from .Ic srcdir , so is sometimes convenient to specify the earlier parameters and let .Nm calculate forward from there if it can. .Pp The makefile produced by .Nm contains an optional .Ic objs target that will build the object files for each component program by running .Xr make 1 inside that program's source directory. For this to work the .Ic srcdir and .Ic objs parameters must also be valid. If they are not valid for a particular program, that program is skipped in the .Ic objs target. .Sh EXAMPLES Here is an example .Nm input conf file, named .Dq Pa kcopy.conf : .Bd -literal -offset indent srcdirs /usr/src/bin /usr/src/sbin progs test cp echo sh fsck halt init mount umount myinstall progs anotherprog ln test [ # test can be invoked via [ ln sh -sh # init invokes the shell with "-sh" in argv[0] special myprog objpaths /homes/leroy/src/myinstall.o # no sources special anotherprog -DNO_FOO WITHOUT_BAR=YES libs -lutil -lcrypt .Ed .Pp This conf file specifies a small crunched binary consisting of some basic system utilities plus a homegrown install program .Dq Pa myinstall , for which no source directory is specified, but its object file is specified directly with the .Ic special line. .Pp Additionally when .Dq Pa anotherprog is built the arguments .Pp .Dl -DNO_FOO WITHOUT_BAR=YES .Pp are added to all build targets. .Pp The crunched binary .Dq Pa kcopy can be built as follows: .Bd -literal -offset indent % crunchgen -m Makefile kcopy.conf # gen Makefile and kcopy.c % make objs # build the component programs' .o files % make # build the crunched binary kcopy % kcopy sh # test that this invokes a sh shell $ # it works! .Ed .Pp At this point the binary .Dq Pa kcopy can be copied onto an install floppy and hard-linked to the names of the component programs. .Pp Note that if the .Ic libs_so command had been used, copies of the libraries so named would also need to be copied to the install floppy. .Sh SEE ALSO .Xr crunchide 1 , .Xr make 1 , .Xr rtld 1 .Sh AUTHORS .An -nosplit The .Nm utility was written by -.An James da Silva Aq jds@cs.umd.edu . +.An James da Silva Aq Mt jds@cs.umd.edu . .Pp Copyright (c) 1994 University of Maryland. All Rights Reserved. .Pp The .Ic libs_so keyword was added in 2005 by -.An Adrian Steinmann Aq ast@marabu.ch +.An Adrian Steinmann Aq Mt ast@marabu.ch and -.An Ceri Davies Aq ceri@FreeBSD.org . +.An Ceri Davies Aq Mt ceri@FreeBSD.org . .Sh CAVEATS While .Nm takes care to eliminate link conflicts between the component programs of a crunched binary, conflicts are still possible between the libraries that are linked in. Some shuffling in the order of libraries may be required, and in some rare cases two libraries may have an unresolvable conflict and thus cannot be crunched together. .Pp Some versions of the .Bx build environment do not by default build the intermediate object file for single-source file programs. The .Dq Li make objs must then be used to get those object files built, or some other arrangements made. Index: head/usr.sbin/crunch/crunchide/crunchide.1 =================================================================== --- head/usr.sbin/crunch/crunchide/crunchide.1 (revision 267667) +++ head/usr.sbin/crunch/crunchide/crunchide.1 (revision 267668) @@ -1,92 +1,92 @@ .\" .\" Copyright (c) 1994 University of Maryland .\" All Rights Reserved. .\" .\" Permission to use, copy, modify, distribute, and sell this software and its .\" documentation for any purpose is hereby granted without fee, provided that .\" the above copyright notice appear in all copies and that both that .\" copyright notice and this permission notice appear in supporting .\" documentation, and that the name of U.M. not be used in advertising or .\" publicity pertaining to distribution of the software without specific, .\" written prior permission. U.M. makes no representations about the .\" suitability of this software for any purpose. It is provided "as is" .\" without express or implied warranty. .\" .\" U.M. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL U.M. .\" BE LIABLE FOR ANY SPECIAL, 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. .\" .\" Author: James da Silva, Systems Design and Analysis Group .\" Computer Science Department .\" University of Maryland at College Park .\" $FreeBSD$ .\" .Dd June 14, 1994 .Dt CRUNCHIDE 1 .Os .Sh NAME .Nm crunchide .Nd hides symbol names from ld, for crunching programs together .Sh SYNOPSIS .Nm .Op Fl f Ar keep-list-file .Op Fl k Ar keep-symbol .Op Ar object-file ... .Sh DESCRIPTION The .Nm utility hides the global symbols of .Ar object-file such that they are ignored by subsequent runs of the linker, .Xr ld 1 . Some symbols may be left visible via the .Fl k Ar keep-symbol and .Fl f Ar keep-list-file options. The .Ar keep-list-file must contain a list of symbols to keep visible, one symbol per line. The names given by .Ar keep-symbol or in .Ar keep-list-file should be C names. For example, to keep the C function .Dq foo visible, the option .Dq -k foo should be used. .Pp The .Nm utility is designed as a companion program for .Xr crunchgen 1 , which automates the process of creating crunched binaries from multiple component programs. .Sh SEE ALSO .Xr crunchgen 1 , .Xr ld 1 .Sh AUTHORS .An -nosplit The .Nm crunch utility was written by -.An James da Silva Aq jds@cs.umd.edu . +.An James da Silva Aq Mt jds@cs.umd.edu . .Pp Copyright (c) 1994 University of Maryland. All Rights Reserved. .Pp -.An Chris Demetriou Aq cgd@netbsd.org +.An Chris Demetriou Aq Mt cgd@netbsd.org reorganized .Nm so that it supported multiple object formats, and added ELF object support and ECOFF object recognition. .Pp Copyright (c) 1997 .An Christopher G. Demetriou . All Rights Reserved. Index: head/usr.sbin/ctladm/ctladm.8 =================================================================== --- head/usr.sbin/ctladm/ctladm.8 (revision 267667) +++ head/usr.sbin/ctladm/ctladm.8 (revision 267668) @@ -1,1056 +1,1056 @@ .\" .\" Copyright (c) 2003 Silicon Graphics International Corp. .\" 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. .\" .\" ctladm utility man page. .\" .\" Author: Ken Merry .\" .\" $Id: //depot/users/kenm/FreeBSD-test2/usr.sbin/ctladm/ctladm.8#3 $ .\" $FreeBSD$ .\" .Dd June 15, 2014 .Dt CTLADM 8 .Os .Sh NAME .Nm ctladm .Nd CAM Target Layer control utility .Sh SYNOPSIS .Nm .Aq Ar command .Op target:lun .Op generic args .Op command args .Nm .Ic tur .Aq target:lun .Op general options .Nm .Ic inquiry .Aq target:lun .Op general options .Nm .Ic reqsense .Aq target:lun .Op general options .Nm .Ic reportluns .Aq target:lun .Op general options .Nm .Ic read .Aq target:lun .Op general options .Aq Fl l Ar lba .Aq Fl d Ar datalen .Aq Fl f Ar file|- .Aq Fl b Ar blocksize_bytes .Op Fl c Ar cdbsize .Op Fl N .Nm .Ic write .Aq target:lun .Op general options .Aq Fl l Ar lba .Aq Fl d Ar datalen .Aq Fl f Ar file|- .Aq Fl b Ar blocksize_bytes .Op Fl c Ar cdbsize .Op Fl N .Nm .Ic bbrread .Aq target:lun .Op general options .Aq Fl -l Ar lba .Aq Fl -d Ar datalen .Nm .Ic readcap .Aq target:lun .Op general options .Op Fl c Ar cdbsize .Nm .Ic modesense .Aq target:lun .Aq Fl m Ar page | Fl l .Op Fl P Ar pc .Op Fl d .Op Fl S Ar subpage .Op Fl c Ar size .Nm .Ic start .Aq target:lun .Op general options .Op Fl i .Op Fl o .Nm .Ic stop .Aq target:lun .Op general options .Op Fl i .Op Fl o .Nm .Ic synccache .Aq target:lun .Op general options .Op Fl l Ar lba .Op Fl b Ar blockcount .Op Fl r .Op Fl i .Op Fl c Ar cdbsize .Nm .Ic shutdown .Op general options .Nm .Ic startup .Op general options .Nm .Ic hardstop .Nm .Ic hardstart .Nm .Ic lunlist .Nm .Ic delay .Aq target:lun .Aq Fl l Ar datamove|done .Aq Fl t Ar secs .Op Fl T Ar oneshot|cont .Nm .Ic realsync Aq on|off|query .Nm .Ic setsync interval .Aq target:lun .Aq Fl i Ar interval .Nm .Ic getsync .Aq target:lun .Nm .Ic inject .Aq Fl i Ar action .Aq Fl p Ar pattern .Op Fl r Ar lba,len .Op Fl s Ar len fmt Op Ar args .Op Fl c .Op Fl d Ar delete_id .Nm .Ic create .Aq Fl b Ar backend .Op Fl B Ar blocksize .Op Fl d Ar device_id .Op Fl l Ar lun_id .Op Fl o Ar name=value .Op Fl s Ar size_bytes .Op Fl S Ar serial_num .Op Fl t Ar device_type .Nm .Ic remove .Aq Fl b Ar backend .Aq Fl l Ar lun_id .Op Fl o Ar name=value .Nm .Ic modify .Aq Fl b Ar backend .Aq Fl l Ar lun_id .Aq Fl s Ar size_bytes .Nm .Ic devlist .Op Fl b Ar backend .Op Fl v .Op Fl x .Nm .Ic port .Op Fl l .Op Fl o Ar on|off .Op Fl w Ar wwpn .Op Fl W Ar wwnn .Op Fl p Ar targ_port .Op Fl t Ar fe_type .Op Fl q .Op Fl x .Nm .Ic dumpooa .Nm .Ic dumpstructs .Nm .Ic islist .Op Fl v .Op Fl x .Nm .Ic islogout .Aq Fl a | Fl c Ar connection-id | Fl i Ar name | Fl p Ar portal .Nm .Ic isterminate .Aq Fl a | Fl c Ar connection-id | Fl i Ar name | Fl p Ar portal .Nm .Ic help .Sh DESCRIPTION The .Nm utility is designed to provide a way to access and control the CAM Target Layer (CTL). It provides a way to send .Tn SCSI commands to the CTL layer, and also provides some meta-commands that utilize .Tn SCSI commands. (For instance, the .Ic lunlist command is implemented using the .Tn SCSI REPORT LUNS and INQUIRY commands.) .Pp The .Nm utility has a number of primary functions, many of which require a device identifier. The device identifier takes the following form: .Bl -tag -width 14n .It target:lun Specify the target (almost always 0) and LUN number to operate on. .El Many of the primary functions of the .Nm utility take the following optional arguments: .Bl -tag -width 10n .It Fl C Ar retries Specify the number of times to retry a command in the event of failure. .It Fl D Ar device Specify the device to open. This allows opening a device other than the default device, .Pa /dev/cam/ctl , to be opened for sending commands. .It Fl I Ar id Specify the initiator number to use. By default, .Nm will use 7 as the initiator number. .El .Pp Primary commands: .Bl -tag -width 11n .It Ic tur Send the .Tn SCSI TEST UNIT READY command to the device and report whether or not it is ready. .It Ic inquiry Send the .Tn SCSI INQUIRY command to the device and display some of the returned inquiry data. .It Ic reqsense Send the .Tn SCSI REQUEST SENSE command to the device and display the returned sense information. .It Ic reportluns Send the .Tn SCSI REPORT LUNS command to the device and display supported LUNs. .It Ic read Send a .Tn SCSI READ command to the device, and write the requested data to a file or stdout. .Bl -tag -width 12n .It Fl l Ar lba Specify the starting Logical Block Address for the READ. This can be specified in decimal, octal (starting with 0), hexadecimal (starting with 0x) or any other base supported by .Xr strtoull 3 . .It Fl d Ar datalen Specify the length, in 512 byte blocks, of the READ request. .It Fl f Ar file Specify the destination for the data read by the READ command. Either a filename or .Sq - for stdout may be specified. .It Fl c Ar cdbsize Specify the minimum .Tn SCSI CDB (Command Data Block) size to be used for the READ request. Allowable values are 6, 10, 12 and 16. Depending upon the LBA and amount of data requested, a larger CDB size may be used to satisfy the request. (e.g., for LBAs above 0xffffffff, READ(16) must be used to satisfy the request.) .It Fl b Ar blocksize Specify the blocksize of the underlying .Tn SCSI device, so the transfer length can be calculated accurately. The blocksize can be obtained via the .Tn SCSI READ CAPACITY command. .It Fl N Do not copy data to .Nm from the kernel when doing a read, just execute the command without copying data. This is to be used for performance testing. .El .It Ic write Read data from a file or stdin, and write the data to the device using the .Tn SCSI WRITE command. .Bl -tag -width 12n .It Fl l Ar lba Specify the starting Logical Block Address for the WRITE. This can be specified in decimal, octal (starting with 0), hexadecimal (starting with 0x) or any other base supported by .Xr strtoull 3 . .It Fl d Ar atalen Specify the length, in 512 byte blocks, of the WRITE request. .It Fl f Ar file Specify the source for the data to be written by the WRITE command. Either a filename or .Sq - for stdin may be specified. .It Fl c Ar cdbsize Specify the minimum .Tn SCSI CDB (Command Data Block) size to be used for the READ request. Allowable values are 6, 10, 12 and 16. Depending upon the LBA and amount of data requested, a larger CDB size may be used to satisfy the request. (e.g., for LBAs above 0xffffffff, READ(16) must be used to satisfy the request.) .It Fl b Ar blocksize Specify the blocksize of the underlying .Tn SCSI device, so the transfer length can be calculated accurately. The blocksize can be obtained via the .Tn SCSI READ CAPACITY command. .It Fl N Do not copy data to .Nm to the kernel when doing a write, just execute the command without copying data. This is to be used for performance testing. .El .It Ic bbrread Issue a SCSI READ command to the logical device to potentially force a bad block on a disk in the RAID set to be reconstructed from the other disks in the array. This command should only be used on an array that is in the normal state. If used on a critical array, it could cause the array to go offline if the bad block to be remapped is on one of the disks that is still active in the array. .Pp The data for this particular command will be discarded, and not returned to the user. .Pp In order to determine which LUN to read from, the user should first determine which LUN the disk with a bad block belongs to. Then he should map the bad disk block back to the logical block address for the array in order to determine which LBA to pass in to the .Ic bbrread command. .Pp This command is primarily intended for testing. In practice, bad block remapping will generally be triggered by the in-kernel Disk Aerobics and Disk Scrubbing code. .Bl -tag -width 10n .It Fl l Ar lba Specify the starting Logical Block Address. .It Fl d Ar datalen Specify the amount of data in bytes to read from the LUN. This must be a multiple of the LUN blocksize. .El .It Ic readcap Send the .Tn SCSI READ CAPACITY command to the device and display the device size and device block size. By default, READ CAPACITY(10) is used. If the device returns a maximum LBA of 0xffffffff, however, .Nm will automatically issue a READ CAPACITY(16), which is implemented as a service action of the SERVICE ACTION IN(16) opcode. The user can specify the minimum CDB size with the .Fl c argument. Valid values for the .Fl c option are 10 and 16. If a 10 byte CDB is specified, the request will be automatically reissued with a 16 byte CDB if the maximum LBA returned is 0xffffffff. .It Ic modesense Send a .Tn SCSI MODE SENSE command to the device, and display the requested mode page(s) or page list. .Bl -tag -width 10n .It Fl m Ar page Specify the mode page to display. This option and the .Fl l option are mutually exclusive. One of the two must be specified, though. Mode page numbers may be specified in decimal or hexadecimal. .It Fl l Request that the list of mode pages supported by the device be returned. This option and the .Fl m option are mutually exclusive. One of the two must be specified, though. .It Fl P Ar pc Specify the mode page control value. Possible values are: .Bl -tag -width 2n -compact .It 0 Current values. .It 1 Changeable value bitmask. .It 2 Default values. .It 3 Saved values. .El .It Fl d Disable block descriptors when sending the mode sense request. .It Fl S Ar subpage Specify the subpage used with the mode sense request. .It Fl c Ar cdbsize Specify the CDB size used for the mode sense request. Supported values are 6 and 10. .El .It Ic start Send the .Tn SCSI START STOP UNIT command to the specified LUN with the start bit set. .Bl -tag -width 4n .It Fl i Set the immediate bit in the CDB. Note that CTL does not support the immediate bit, so this is primarily useful for making sure that CTL returns the proper error. .It Fl o Set the Copan proprietary on/offline bit in the CDB. When this flag is used, the LUN will be marked online again (see the description of the .Ic shutdown and .Ic startup commands). When this flag is used with a start command, the LUN will NOT be spun up. You need to use a start command without the .Fl o flag to spin up the disks in the LUN. .El .It Ic stop Send the .Tn SCSI START STOP UNIT command to the specified LUN with the start bit cleared. We use an ordered tag to stop the LUN, so we can guarantee that all pending I/O executes before it is stopped. (CTL guarantees this anyway, but .Nm sends an ordered tag for completeness.) .Bl -tag -width 4n .It Fl i Set the immediate bit in the CDB. Note that CTL does not support the immediate bit, so this is primarily useful for making sure that CTL returns the proper error. .It Fl o Set the Copan proprietary on/offline bit in the CDB. When this flag is used, the LUN will be spun down and taken offline ("Logical unit not ready, manual intervention required"). See the description of the .Ic shutdown and .Ic startup options. .El .It Ic synccache Send the .Tn SCSI SYNCHRONIZE CACHE command to the device. By default, SYNCHRONIZE CACHE(10) is used. If the specified starting LBA is greater than 0xffffffff or the length is greater than 0xffff, though, SYNCHRONIZE CACHE(16) will be used. The 16 byte command will also be used if the user specifies a 16 byte CDB with the .Fl c argument. .Bl -tag -width 14n .It Fl l Ar lba Specify the starting LBA of the cache region to synchronize. This option is a no-op for CTL. If you send a SYNCHRONIZE CACHE command, it will sync the cache for the entire LUN. .It Fl b Ar blockcount Specify the length of the cache region to synchronize. This option is a no-op for CTL. If you send a SYNCHRONIZE CACHE command, it will sync the cache for the entire LUN. .It Fl r Specify relative addressing for the starting LBA. CTL does not support relative addressing, since it only works for linked commands, and CTL does not support linked commands. .It Fl i Tell the target to return status immediately after issuing the SYHCHRONIZE CACHE command rather than waiting for the cache to finish syncing. CTL does not support this bit. .It Fl c Ar cdbsize Specify the minimum CDB size. Valid values are 10 and 16 bytes. .El .It Ic shutdown Issue a .Tn SCSI START STOP UNIT command with the start bit cleared and the on/offline bit set to all direct access LUNs. This will spin down all direct access LUNs, and mark them offline ("Logical unit not ready, manual intervention required"). Once marked offline, the state can only be cleared by sending a START STOP UNIT command with the start bit set and the on/offline bit set. The .Nm commands .Ic startup and .Ic start will accomplish this. Note that the on/offline bit is a non-standard Copan extension to the .Tn SCSI START STOP UNIT command, so merely sending a normal start command from an initiator will not clear the condition. (This is by design.) .It Ic startup Issue a .Tn SCSI START STOP UNIT command with the start bit set and the on/offline bit set to all direct access LUNs. This will mark all direct access LUNs "online" again. It will not cause any LUNs to start up. A separate start command without the on/offline bit set is necessary for that. .It Ic hardstop Use the kernel facility for stopping all direct access LUNs and setting the offline bit. Unlike the .Ic shutdown command above, this command allows shutting down LUNs with I/O active. It will also issue a LUN reset to any reserved LUNs to break the reservation so that the LUN can be stopped. .Ic shutdown command instead. .It Ic hardstart This command is functionally identical to the .Ic startup command described above. The primary difference is that the LUNs are enumerated and commands sent by the in-kernel Front End Target Driver instead of by .Nm . .It Ic lunlist List all LUNs registered with CTL. Because this command uses the ioctl port, it will only work when the FETDs (Front End Target Drivers) are enabled. This command is the equivalent of doing a REPORT LUNS on one LUN and then an INQUIRY on each LUN in the system. .It Ic delay Delay commands at the given location. There are two places where commands may be delayed currently: before data is transferred .Pq Dq datamove and just prior to sending status to the host .Pq Dq done . One of the two must be supplied as an argument to the .Fl l option. The .Fl t option must also be specified. .Bl -tag -width 12n .It Fl l Ar delayloc Delay command(s) at the specified location. This can either be at the data movement stage (datamove) or prior to command completion (done). .It Fl t Ar delaytime Delay command(s) for the specified number of seconds. This must be specified. If set to 0, it will clear out any previously set delay for this particular location (datamove or done). .It Fl T Ar delaytype Specify the delay type. By default, the .Ic delay option will delay the next command sent to the given LUN. With the .Fl T Ar cont option, every command will be delayed by the specified period of time. With the .Fl T Ar oneshot the next command sent to the given LUN will be delayed and all subsequent commands will be completed normally. This is the default. .El .It Ic realsync Query and control CTL's SYNCHRONIZE CACHE behavior. The .Sq query argument will show whether SYNCHRONIZE CACHE commands are being sent to the backend or not. The default is to send SYNCHRONIZE CACHE commands to the backend. The .Sq on argument will cause all SYNCHRONIZE CACHE commands sent to all LUNs to be sent to the backend. The .Sq off argument will cause all SYNCHRONIZE CACHE commands sent to all LUNs to be immediately returned to the initiator with successful status. .It Ic setsync For a given lun, only actually service every Nth SYNCHRONIZE CACHE command that is sent. This can be used for debugging the optimal time period for sending SYNCHRONIZE cache commands. An interval of 0 means that the cache will be flushed for this LUN every time a SYNCHRONIZE CACHE command is received. .Pp You must specify the target and LUN you want to modify. .It Ic getsync Get the interval at which we actually service the SYNCHRONIZE CACHE command, as set by the .Ic setsync command above. The reported number means that we will actually flush the cache on every Nth SYNCHRONIZE CACHE command. A value of 0 means that we will flush the cache every time. .Pp You must specify the target and LUN you want to query. .It Ic inject Inject the specified type of error for the LUN specified, when a command that matches the given pattern is seen. The sense data returned is in either fixed or descriptor format, depending upon the status of the D_SENSE bit in the control mode page (page 0xa) for the LUN. .Pp Errors are only injected for commands that have not already failed for other reasons. By default, only the first command matching the pattern specified is returned with the supplied error. .Pp If the .Fl c flag is specified, all commands matching the pattern will be returned with the specified error until the error injection command is deleted with .Fl d flag. .Bl -tag -width 17n .It Fl i Ar action Specify the error to return: .Bl -tag -width 10n .It aborted Return the next matching command on the specified LUN with the sense key ABORTED COMMAND (0x0b), and the ASC/ASCQ 0x45,0x00 ("Select or reselect failure"). .It mediumerr Return the next matching command on the specified LUN with the sense key MEDIUM ERROR (0x03) and the ASC/ASCQ 0x11,0x00 ("Unrecovered read error") for reads, or ASC/ASCQ 0x0c,0x02 ("Write error - auto reallocation failed") for write errors. .It ua Return the next matching command on the specified LUN with the sense key UNIT ATTENTION (0x06) and the ASC/ASCQ 0x29,0x00 ("POWER ON, RESET, OR BUS DEVICE RESET OCCURRED"). .It custom Return the next matching command on the specified LUN with the supplied sense data. The .Fl s argument must be specified. .El .It Fl p Ar pattern Specify which commands should be returned with the given error. .Bl -tag -width 10n .It read The error should apply to READ(6), READ(10), READ(12), READ(16), etc. .It write The error should apply to WRITE(6), WRITE(10), WRITE(12), WRITE(16), WRITE AND VERIFY(10), etc. .It rw The error should apply to both read and write type commands. .It readcap The error should apply to READ CAPACITY(10) and READ CAPACITY(16) commands. .It tur The error should apply to TEST UNIT READY commands. .It any The error should apply to any command. .El .It Fl r Ar lba,len Specify the starting lba and length of the range of LBAs which should trigger an error. This option is only applies when read and/or write patterns are specified. If used with other command types, the error will never be triggered. .It Fl s Ar len fmt Op Ar args Specify the sense data that is to be returned for custom actions. If the format is .Sq - , len bytes of sense data will be read from standard input and written to the sense buffer. If len is longer than 252 bytes (the maximum allowable .Tn SCSI sense data length), it will be truncated to that length. The sense data format is described in .Xr cam_cdparse 3 . .It Fl c The error injection should be persistent, instead of happening once. Persistent errors must be deleted with the .Fl d argument. .It Fl d Ar delete_id Delete the specified error injection serial number. The serial number is returned when the error is injected. .El .It Ic port Perform one of several CTL frontend port operations. Either get a list of frontend ports .Pq Fl l , turn one or more frontends on or off .Pq Fl o Ar on|off , or set the World Wide Node Name .Pq Fl w Ar wwnn or World Wide Port Name .Pq Fl W Ar wwpn for a given port. One of .Fl l , .Fl o , or .Fl w or .Fl W must be specified. The WWNN and WWPN may both be specified at the same time, but cannot be combined with enabling/disabling or listing ports. .Bl -tag -width 12n .It Fl l List all CTL frontend ports or a specific port type or number. .It Fl o Ar on|off Turn the specified CTL frontend ports off or on. If no port number or port type is specified, all ports are turned on or off. .It Fl p Ar targ_port Specify the frontend port number. The port numbers can be found in the frontend port list. .It Fl q Omit the header in the port list output. .It Fl t Ar fe_type Specify the frontend type. Currently defined port types are .Dq fc (Fibre Channel), .Dq scsi (Parallel SCSI), .Dq ioctl (CTL ioctl interface), and .Dq internal (CTL CAM SIM). .It Fl w Ar wwnn Set the World Wide Node Name for the given port. The .Fl n argument must be specified, since this is only possible to implement on a single port. As a general rule, the WWNN should be the same across all ports on the system. .It Fl W Ar wwpn Set the World Wide Port Name for the given port. The .Fl n argument must be specified, since this is only possible to implement on a single port. As a general rule, the WWPN must be different for every port in the system. .It Fl x Output the port list in XML format. .El .It Ic dumpooa Dump the OOA (Order Of Arrival) queue for each LUN registered with CTL. .It Ic dumpstructs Dump the CTL structures to the console. .It Ic create Create a new LUN. The backend must be specified, and depending upon the backend requested, some of the other options may be required. If the LUN is created successfully, the LUN configuration will be displayed. If LUN creation fails, a message will be displayed describing the failure. .Bl -tag -width 14n .It Fl b Ar backend The .Fl b flag is required. This specifies the name backend to use when creating the LUN. Examples are .Dq ramdisk and .Dq block . .It Fl B Ar blocksize Specify the blocksize of the backend in bytes. .It Fl d Ar device_id Specify the LUN-associated string to use in the .Tn SCSI INQUIRY VPD page 0x83 data. .It Fl l Ar lun_id Request that a particular LUN number be assigned. If the requested LUN number is not available, the request will fail. .It Fl o Ar name=value Specify a backend-specific name/value pair. Multiple .Fl o arguments may be specified. Refer to the backend documentation for arguments that may be used. .It Fl s Ar size_bytes Specify the size of the LUN in bytes. Some backends may allow setting the size (e.g. the ramdisk backend) and for others the size may be implicit (e.g. the block backend). .It Fl S Ar serial_num Specify the serial number to be used in the .Tn SCSI INQUIRY VPD page 0x80 data. .It Fl t Ar device_type Specify the numeric SCSI device type to use when creating the LUN. For example, the Direct Access type is 0. If this flag is not used, the type of LUN created is backend-specific. Not all LUN types are supported. Currently CTL only supports Direct Access (type 0) and Processor (type 3) LUNs. The backend requested may or may not support all of the LUN types that CTL supports. .El .It Ic remove Remove a LUN. The backend must be specified, and the LUN number must also be specified. Backend-specific options may also be specified with the .Fl o flag. .Bl -tag -width 14n .It Fl b Ar backend Specify the backend that owns the LUN to be removed. Examples are .Dq ramdisk and .Dq block . .It Fl l Ar lun_id Specify the LUN number to remove. .It Fl o Ar name=value Specify a backend-specific name/value pair. Multiple .Fl o arguments may be specified. Refer to the backend documentation for arguments that may be used. .El .It Ic modify Modify a LUN size. The backend, the LUN number, and the size must be specified. .Bl -tag -width 14n .It Fl b Ar backend Specify the backend that owns the LUN to be removed. Examples are .Dq ramdisk and .Dq block . .It Fl l Ar lun_id Specify the LUN number to remove. .It Fl s Ar size_bytes Specify the size of the LUN in bytes. For the .Dq block backend, an .Dq auto keyword may be passed instead; this will make CTL use the size of backing file or device. .El .It Ic devlist Get a list of all configured LUNs. This also includes the LUN size and blocksize, serial number and device ID. .Bl -tag -width 11n .It Fl b Ar backend Specify the backend. This restricts the LUN list to the named backend. Examples are .Dq ramdisk and .Dq block . .It Fl v Be verbose. This will also display any backend-specific LUN attributes in addition to the standard per-LUN information. .It Fl x Dump the raw XML. The LUN list information from the kernel comes in XML format, and this option allows the display of the raw XML data. This option and the .Fl v and .Fl b options are mutually exclusive. If you specify .Fl x , the entire LUN database is displayed in XML format. .El .It Ic islist Get a list of currently running iSCSI connections. This includes initiator and target names and the unique connection IDs. .Bl -tag -width 11n .It Fl v Verbose mode. .It Fl x Dump the raw XML. The connections list information from the kernel comes in XML format, and this option allows the display of the raw XML data. .El .It Ic islogout Ask the initiator to log out iSCSI connections matching criteria. .Bl -tag -width 11n .It Fl a Log out all connections. .It Fl c Specify connection ID. .It Fl i Specify initiator name. .It Fl p Specify initiator portal (hostname or IP address). .El .It Ic isterminate Forcibly terminate iSCSI connections matching criteria. .Bl -tag -width 11n .It Fl a Terminate all connections. .It Fl c Specify connection ID. .It Fl i Specify initiator name. .It Fl p Specify initiator portal (hostname or IP address). .El .It Ic help Display .Nm usage information. .El .Sh OPTIONS Number of additional configuration options may be specified for LUNs. Some options are global, others are backend-specific. .Pp Global options: .Bl -tag -width 12n .It Va vendor Specifies LUN vendor string up to 8 chars. .It Va product Specifies LUN product string up to 16 chars. .It Va revision Specifies LUN revision string up to 4 chars. .It Va unmap Set to "on", enables UNMAP support for the LUN. .El .Pp Options specific for block backend: .Bl -tag -width 12n .It Va file Specifies file or device name to use for backing store. .It Va num_threads Specifies number of backend threads to use for this LUN. .El .Sh EXAMPLES .Dl ctladm tur 0:1 .Pp Send a .Tn SCSI TEST UNIT READY command to LUN 1. .Pp .Dl ctladm modesense 0:1 -l .Pp Display the list of mode pages supported by LUN 1. .Pp .Dl ctladm modesense 0:0 -m 10 -P 3 -d -c 10 .Pp Display the saved version of the Control mode page (page 10) on LUN 0. Disable fetching block descriptors, and use a 10 byte MODE SENSE command instead of the default 6 byte command. .Bd -literal ctladm read 0:2 -l 0 -d 1 -b 512 -f - > foo .Ed .Pp Read the first 512 byte block from LUN 2 and dump it to the file .Pa foo . .Bd -literal ctladm write 0:3 -l 0xff432140 -d 20 -b 512 -f /tmp/bar .Ed .Pp Read 10240 bytes from the file .Pa /tmp/bar and write it to target 0, LUN 3. starting at LBA 0xff432140. .Pp .Dl ctladm create -b ramdisk -s 10485760000000000 .Pp Create a LUN with the .Dq fake ramdisk as a backing store. The LUN will claim to have a size of approximately 10 terabytes. .Pp .Dl ctladm create -b block -o file=src/usr.sbin/ctladm/ctladm.8 .Pp Create a LUN using the block backend, and specify the file .Pa src/usr.sbin/ctladm/ctladm.8 as the backing store. The size of the LUN will be derived from the size of the file. .Pp .Dl ctladm create -b block -o file=src/usr.sbin/ctladm/ctladm.8 -S MYSERIAL321 -d MYDEVID123 .Pp Create a LUN using the block backend, specify the file .Pa src/usr.sbin/ctladm/ctladm.8 as the backing store, and specify the .Tn SCSI VPD page 0x80 and 0x83 serial number .Fl ( S ) and device ID .Fl ( d ) . .Pp .Dl ctladm remove -b block -l 12 .Pp Remove LUN 12, which is handled by the block backend, from the system. .Pp .Dl ctladm devlist .Pp List configured LUNs in the system, along with their backend and serial number. This works when the Front End Target Drivers are enabled or disabled. .Pp .Dl ctladm lunlist .Pp List all LUNs in the system, along with their inquiry data and device type. This only works when the FETDs are enabled, since the commands go through the ioctl port. .Pp .Dl ctladm inject 0:6 -i mediumerr -p read -r 0,512 -c .Pp Inject a medium error on LUN 6 for every read that covers the first 512 blocks of the LUN. .Bd -literal -offset indent ctladm inject 0:6 -i custom -p tur -s 18 "f0 0 02 s12 04 02" .Ed .Pp Inject a custom error on LUN 6 for the next TEST UNIT READY command only. This will result in a sense key of NOT READY (0x02), and an ASC/ASCQ of 0x04,0x02 ("Logical unit not ready, initializing command required"). .Sh SEE ALSO .Xr cam 3 , .Xr cam_cdbparse 3 , .Xr cam 4 , .Xr ctl 4 , .Xr xpt 4 , .Xr camcontrol 8 , .Xr ctld 8 .Sh HISTORY The .Nm utility was originally written during the Winter/Spring of 2003 as an interface to CTL. .Sh AUTHORS -.An Ken Merry Aq ken@FreeBSD.org +.An Ken Merry Aq Mt ken@FreeBSD.org Index: head/usr.sbin/ctld/ctl.conf.5 =================================================================== --- head/usr.sbin/ctld/ctl.conf.5 (revision 267667) +++ head/usr.sbin/ctld/ctl.conf.5 (revision 267668) @@ -1,287 +1,287 @@ .\" Copyright (c) 2012 The FreeBSD Foundation .\" All rights reserved. .\" .\" This software was developed by Edward Tomasz Napierala under sponsorship .\" from the FreeBSD Foundation. .\" .\" 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 AUTHORS 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 AUTHORS 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 24, 2014 .Dt CTL.CONF 5 .Os .Sh NAME .Nm ctl.conf .Nd CAM Target Layer / iSCSI target daemon configuration file .Sh DESCRIPTION The .Nm configuration file is used by the .Xr ctld 8 daemon. Lines starting with .Ql # are interpreted as comments. The general syntax of the .Nm file is: .Bd -literal -offset indent pidfile auth-group { chap ... } portal-group { listen
listen-iser
discovery-auth-group ... } target { auth-group portal-group lun { path } ... } .Ed .Ss global level The following statements are available at the global level: .Bl -tag -width indent .It Ic auth-group Aq Ar name Opens an auth-group section, defining an authentication group, which can then be assigned to any number of targets. .It Ic debug Aq Ar level Specifies debug level. The default is 0. .It Ic maxproc Aq Ar number Specifies limit for concurrently running child processes handling incoming connections. The default is 30. Setting it to 0 disables the limit. .It Ic pidfile Aq Ar path Specifies path to pidfile. The default is .Pa /var/run/ctld.pid . .It Ic portal-group Aq Ar name Opens a portal-group section, defining a portal group, which can then be assigned to any number of targets. .It Ic target Aq Ar name Opens a target configuration section. .It Ic timeout Aq Ar seconds Specifies timeout for login session, after which the connection will be forcibly terminated. The default is 60. Setting it to 0 disables the timeout. .El .Ss auth-group level The following statements are available at the auth-group level: .Bl -tag -width indent .It Ic auth-type Ao Ar type Ac Specifies authentication type. Type can be either "none", "deny", "chap", or "chap-mutual". In most cases it is not neccessary to set the type using this clause; it is usually used to disable authentication for a given auth-group. .It Ic chap Ao Ar user Ac Aq Ar secret Specifies CHAP authentication credentials. .It Ic chap-mutual Ao Ar user Ac Ao Ar secret Ac Ao Ar mutualuser Ac Aq Ar mutualsecret Specifies mutual CHAP authentication credentials. Note that for any auth-group, configuration may contain either chap, or chap-mutual entries; it's an error to mix them. .It Ic initiator-name Ao Ar initiator-name Ac Specifies iSCSI initiator name. If not defined, there will be no restrictions based on initiator name. Otherwise, only initiators with names matching one of defined ones will be allowed to connect. .It Ic initiator-portal Ao Ar address Ac Specifies iSCSI initiator portal - IPv4 or IPv6 address. If not defined, there will be no restrictions based on initiator address. Otherwise, only initiators with addresses matching one of defined ones will be allowed to connect. .El .Ss portal-group level The following statements are available at the portal-group level: .Bl -tag -width indent .It Ic discovery-auth-group Aq Ar name Assigns previously defined authentication group to the portal group, to be used for target discovery. By default, portal groups that do not specify their own auth settings, using clauses such as "chap" or "initiator-name", are assigned predefined auth-group "default", which denies discovery. Another predefined auth-group, "no-authentication", may be used to permit discovery without authentication. .It Ic listen Aq Ar address Specifies IPv4 or IPv6 address and port to listen on for incoming connections. .It Ic listen-iser Aq Ar address Specifies IPv4 or IPv6 address and port to listen on for incoming connections using iSER (iSCSI over RDMA) protocol. .El .Ss target level: The following statements are available at the target level: .Bl -tag -width indent .It Ic alias Aq Ar text Assigns human-readable description to the target. There is no default. .It Ic auth-group Aq Ar name Assigns previously defined authentication group to the target. By default, targets that do not specify their own auth settings, using clauses such as "chap" or "initiator-name", are assigned predefined auth-group "default", which denies all access. Another predefined auth-group, "no-authentication", may be used to permit access without authentication. .It Ic auth-type Ao Ar type Ac Specifies authentication type. Type can be either "none", "deny", "chap", or "chap-mutual". In most cases it is not neccessary to set the type using this clause; it is usually used to disable authentication for a given target. This clause is mutually exclusive with auth-group; one cannot use both in a single target. .It Ic chap Ao Ar user Ac Aq Ar secret Specifies CHAP authentication credentials. Note that targets must use either auth-group, or chap, or chap-mutual clauses; it's a configuration error to mix them in one target. .It Ic chap-mutual Ao Ar user Ac Ao Ar secret Ac Ao Ar mutualuser Ac Aq Ar mutualsecret Specifies mutual CHAP authentication credentials. Note that targets must use either auth-group, chap, or chap-mutual clauses; it's a configuration error to mix them in one target. .It Ic initiator-name Ao Ar initiator-name Ac Specifies iSCSI initiator name. If not defined, there will be no restrictions based on initiator name. Otherwise, only initiators with names matching one of defined ones will be allowed to connect. This clause is mutually exclusive with auth-group; one cannot use both in a single target. .It Ic initiator-portal Ao Ar address Ac Specifies iSCSI initiator portal - IPv4 or IPv6 address. If not defined, there will be no restrictions based on initiator address. Otherwise, only initiators with addresses matching one of defined ones will be allowed to connect. This clause is mutually exclusive with auth-group; one cannot use both in a single target. .It Ic portal-group Aq Ar name Assigns previously defined portal group to the target. Default portal group is "default", which makes the target available on TCP port 3260 on all configured IPv4 and IPv6 addresses. .It Ic lun Aq Ar number Opens a lun configuration section, defining LUN exported by a target. .El .Ss lun level The following statements are available at the lun level: .Bl -tag -width indent .It Ic backend Ao Ar block | Ar ramdisk Ac Specifies the CTL backend to use for a given LUN. Valid choices are .Dq block and .Dq ramdisk ; block is used for LUNs backed by files or disk device nodes; ramdisk is a bitsink device, used mostly for testing. The default backend is block. .It Ic blocksize Aq Ar size Specifies blocksize visible to the initiator. The default blocksize is 512. .It Ic device-id Aq Ar string Specifies SCSI Device Identification string presented to the initiator. .It Ic option Ao Ar name Ac Aq Ar value Specifies CTL-specific options passed to the kernel. .It Ic path Aq Ar path Specifies path to file or device node used to back the LUN. .It Ic serial Aq Ar string Specifies SCSI serial number presented to the initiator. .It Ic size Aq Ar size Specifies LUN size, in bytes. .El .Sh FILES .Bl -tag -width ".Pa /etc/ctl.conf" -compact .It Pa /etc/ctl.conf The default location of the .Xr ctld 8 configuration file. .El .Sh EXAMPLES .Bd -literal pidfile /var/run/ctld.pid auth-group example2 { chap-mutual "user" "secret" "mutualuser" "mutualsecret" chap-mutual "user2" "secret2" "mutualuser" "mutualsecret" } portal-group example2 { discovery-auth-group no-authentication listen 127.0.0.1 listen 0.0.0.0:3261 listen [::]:3261 listen [fe80::be:ef] } target iqn.2012-06.com.example:target0 { alias "Example target" auth-group no-authentication lun 0 { path /dev/zvol/example_0 blocksize 4096 size 4G } } target iqn.2012-06.com.example:target3 { chap chapuser chapsecret lun 0 { path /dev/zvol/example_3 } } target iqn.2012-06.com.example:target2 { auth-group example2 portal-group example2 lun 0 { path /dev/zvol/example2_0 } lun 1 { path /dev/zvol/example2_1 option foo bar } } .Ed .Sh SEE ALSO .Xr ctl 4 , .Xr ctladm 8 , .Xr ctld 8 .Sh AUTHORS The .Nm configuration file functionality for .Xr ctld 8 was developed by -.An Edward Tomasz Napierala Aq trasz@FreeBSD.org +.An Edward Tomasz Napierala Aq Mt trasz@FreeBSD.org under sponsorship from the FreeBSD Foundation. Index: head/usr.sbin/ctld/ctld.8 =================================================================== --- head/usr.sbin/ctld/ctld.8 (revision 267667) +++ head/usr.sbin/ctld/ctld.8 (revision 267668) @@ -1,113 +1,113 @@ .\" Copyright (c) 2012 The FreeBSD Foundation .\" All rights reserved. .\" .\" This software was developed by Edward Tomasz Napierala under sponsorship .\" from the FreeBSD Foundation. .\" .\" 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 AUTHORS 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 AUTHORS 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 September 20, 2012 .Dt CTLD 8 .Os .Sh NAME .Nm ctld .Nd CAM Target Layer / iSCSI target daemon .Sh SYNOPSIS .Nm .Op Fl d .Op Fl f Ar config-file .Sh DESCRIPTION The .Nm daemon is responsible for managing the CAM Target Layer configuration, accepting incoming iSCSI connections, performing authentication and passing connections to the kernel part of the native iSCSI target. .Pp Upon startup, the .Nm daemon parses the configuration file and exits, if it encounters any errors. Then it compares the configuration with the kernel list of LUNs managed by previously running .Nm instances, removes LUNs no longer existing in the configuration file, and creates new LUNs as neccessary. After that it listens for the incoming iSCSI connections, performs authentication, and, if successful, passes the connections to the kernel part of CTL iSCSI target, which handles it from that point. .Pp When it receives a SIGHUP signal, the .Nm reloads its configuration and applies the changes to the kernel. Changes are applied in a way that avoids unneccessary disruptions; for example removing one LUN does not affect other LUNs. .Pp When exiting gracefully, the .Nm daemon removes LUNs it managed and forcibly disconnects all the clients. Otherwise - e.g. when killed with SIGKILL - LUNs stay configured and clients remain connected. .Pp To perform administrative actions that apply to already connected sessions, such as forcing termination, use .Xr ctladm 8 . .Pp The following options are available: .Bl -tag -width ".Fl P Ar pidfile" .It Fl f Ar config-file Specifies the name of the configuration file. The default is .Pa /etc/ctl.conf . .It Fl d Debug mode. The server sends verbose debug output to standard error, and does not put itself in the background. The server will also not fork and will exit after processing one connection. This option is only intended for debugging the target. .El .Sh FILES .Bl -tag -width ".Pa /var/run/ctld.pid" -compact .It Pa /etc/ctl.conf The configuration file for .Nm . The file format and configuration options are described in .Xr ctl.conf 5 . .It Pa /var/run/ctld.pid The default location of the .Nm PID file. .El .Sh EXIT STATUS The .Nm utility exits 0 on success, and >0 if an error occurs. .Sh SEE ALSO .Xr ctl 4 , .Xr ctl.conf 5 , .Xr ctladm 8 .Sh AUTHORS The .Nm was developed by -.An Edward Tomasz Napierala Aq trasz@FreeBSD.org +.An Edward Tomasz Napierala Aq Mt trasz@FreeBSD.org under sponsorship from the FreeBSD Foundation. Index: head/usr.sbin/ctm/ctm/ctm.1 =================================================================== --- head/usr.sbin/ctm/ctm/ctm.1 (revision 267667) +++ head/usr.sbin/ctm/ctm/ctm.1 (revision 267668) @@ -1,325 +1,324 @@ .\" ---------------------------------------------------------------------------- .\" "THE BEER-WARE LICENSE" (Revision 42): .\" wrote this file. As long as you retain this notice you .\" can do whatever you want with this stuff. If we meet some day, and you think .\" this stuff is worth it, you can buy me a beer in return. Joerg Wunsch .\" ---------------------------------------------------------------------------- .\" .\" This manual page is partially obtained from Poul-Hennings CTM README .\" file. .\" .\" CTM and ctm(1) by .\" .\" $FreeBSD$ .\" .Dd March 25, 1995 .Dt CTM 1 .Os .Sh NAME .Nm ctm .Nd source code mirror program .Sh SYNOPSIS .Nm .Op Fl cFklquv .Op Fl b Ar basedir .Op Fl B Ar backup-file .Op Fl e Ar include-regex .Op Fl t Ar tar-command .Op Fl T Ar tmpdir .Op Fl V Ar level .Op Fl x Ar exclude-regex .Ar .Sh DESCRIPTION The .Nm utility was originally .Dq Cvs Through eMail , but now instead it seems more fitting to call it .Dq Current Through eMail . .Pp The .Nm utility is now meant to be the definitive way to make and apply a delta between two versions of a directory tree. .Pp There are two parts to this, making the delta and applying it. These are two entirely different things. .Ss Usage To apply a CTM delta, you pass it to the .Nm command. You can pass a CTM delta on stdin, or you can give the filename as an argument. If you do the latter, you make life a lot easier for your self, since the program can accept gzip'ed files and since it will not have to make a temporary copy of your file. You can specify multiple deltas at one time, they will be processed one at a time. Deltas that are already applied will be ignored. .Pp The .Nm command runs in a number of passes. It will process the entire input file in each pass, before commencing with the next pass. .Pp Before working on a file .Ar name .Nm first checks for the existence of the file .Ar name.ctm . If this file exists, .Nm works on it instead. .Pp Pass 1 will verify that the input file is OK. The syntax, the data and the global MD5 checksum will be checked. If any of these fail, .Nm will simply reject the input file. .Pp Pass 2 will validate that the directory tree is in the state expected by the CTM delta. This is done by looking for files and directories which should/should not exist and by checking the MD5 checksums of files. .Pp If a .Ar backup-file had been specified using the .Fl B option, all files that would be modified by this .Nm invocation are backed up to this file using the archiver command specified by the .Fl t option. The default archiver command is .Nm "tar -rf %s -T -" . .Pp Pass 3 will actually apply the delta. .Pp The list of files that would be modified by .Nm is subject to filtering regular expressions specified using the .Fl e and .Fl x options. The .Fl e and .Fl x options are applied in order of appearance on the command line. The last filter that matched a given file name determines whether the file would be operated on or left alone by .Nm . .Pp The .Nm utility will extract the file hierarchy below its working directory. Absolute filenames or filenames containing references through .Sq Pa .\& and .Sq Pa ..\& are explicitly prohibited as a security measure. .Ss Options .Bl -tag -width indent .It Fl b Ar basedir Prepend the path .Ar basedir to every filename. .It Fl B Ar backup-file Backup all files that would be modified by this CTM run to .Ar backup-file . If any filters are specified using the .Fl e and .Fl x options, then the final set of files backed up are those that would be modified by CTM after the filters are applied. .It Fl c Check it out, do not do anything. .It Fl e Ar regular_expression Match each name in the CTM file against .Ar regular_expression , and if it matches process the file, otherwise leave it alone. There may be any number of these options. Use of this option disables the .Pa .ctm_status sequence number checks. For example, the expression .Ic ^usr.sbin/ctm for example, will select the .Pa usr.sbin/ctm source directory and all pathnames under it. .Pp Pathnames can be disabled from being considered by CTM using the .Fl x option. .It Fl F Force. .It Fl k Keep files and directories and do not remove them even if the CTM file specifies they are to be removed. If the .Fl B option is specified, these files and directories will not be backed up. .It Fl l List files that would be modified by this invocation of CTM and the actions that would be performed on them. Use of the .Fl l option disables the .Pa .ctm_status checks and integrity checks on the source tree being operated on. The .Fl l option can be combined with the .Fl e and .Fl x options to determine which files would be modified by the given set of command line options. .It Fl q Tell us less. .It Fl t Ar tar-command Use .Ar tar-command instead of the default archiver .Nm tar . This option takes effect only if a backup file had been specified using the .Fl B option. A %s in the tar command will be replaced by the name of the backup file. .It Fl T Ar tmpdir Put temporary files under .Ar tmpdir . .It Fl u Set modification time of created and modified files to the CTM delta creation time. .It Fl v Tell us more. .It Fl V Ar level Tell us more. .Ar Level is the level of verbosity. .It Fl x Ar regular_expression Match each name in the CTM file against .Ar regular_expression and if it matches, leave the file alone. There may be any number of these options. Use of this option disables the .Pa .ctm_status sequence number checks. .Pp Pathnames can be selected for CTM's consideration using the .Fl e option. .El .Sh SECURITY On its own, CTM is an insecure protocol - there is no authentication performed that the changes applied to the source code were sent by a trusted party, and so care should be taken if the CTM deltas are obtained via an unauthenticated medium such as regular email. It is a relatively simple matter for an attacker to forge a CTM delta to replace or precede the legitimate one and insert malicious code into your source tree. If the legitimate delta is somehow prevented from arriving, this will go unnoticed until a later delta attempts to touch the same file, at which point the MD5 checksum will fail. .Pp To remedy this insecurity, CTM pieces generated by FreeBSD.org are cryptographically signed in a format compatible with the GNU Privacy Guard utility, available in /usr/ports/security/gpg, and the Pretty Good Privacy v5 utility, /usr/ports/security/pgp5. The relevant public key can be obtained by fingering ctm@FreeBSD.org. .Pp CTM deltas which are thus signed cannot be undetectably altered by an attacker. Therefore it is recommended that you make use of GPG or PGP5 to verify the signatures if you receive your CTM deltas via email. .Sh ENVIRONMENT .Ev TMPDIR , if set to a pathname, will cause ctm to use that pathname as the location of temporary file. See .Xr tempnam 3 , for more details on this. The same effect may be achieved with the .Fl T flag. .Sh FILES .Pa .ctm_status contains the sequence number of the last CTM delta applied. Changing or removing this file will greatly confuse .Nm . .Pp Using the .Fl e and .Fl x options can update a partial subset of the source tree and causes sources to be in an inconsistent state. It is assumed that you know what you are doing when you use these options. .Sh EXAMPLES .Bd -literal cd ~cvs /usr/sbin/ctm ~ctm/cvs-* .Ed .Pp To extract and patch all sources under `lib' .Bd -literal cd ~/lib-srcs /usr/sbin/ctm -e '^lib' ~ctm/src-cur* .Ed .Sh DIAGNOSTICS Numerous messages, hopefully self-explanatory. The .Dq noise level can be adjusted with the .Fl q , .Fl v and .Fl V options. .Sh SEE ALSO .Xr ctm_rmail 1 , .Xr ctm 5 .Sh HISTORY Initial trials were run during the work on .Fx 1.1.5 , and many bugs and methods were hashed out. .Pp The .Nm command appeared in .Fx 2.1 . .Sh AUTHORS +.An -nosplit The CTM system has been designed and implemented by -.An Poul-Henning Kamp -.Aq phk@FreeBSD.org . +.An Poul-Henning Kamp Aq Mt phk@FreeBSD.org . .Pp -.An Joerg Wunsch -.Aq joerg@FreeBSD.org +.An Joerg Wunsch Aq Mt joerg@FreeBSD.org wrote this man-page. Index: head/usr.sbin/ctm/ctm/ctm.5 =================================================================== --- head/usr.sbin/ctm/ctm/ctm.5 (revision 267667) +++ head/usr.sbin/ctm/ctm/ctm.5 (revision 267668) @@ -1,183 +1,182 @@ .\" ---------------------------------------------------------------------------- .\" "THE BEER-WARE LICENSE" (Revision 42): .\" wrote this file. As long as you retain this notice you .\" can do whatever you want with this stuff. If we meet some day, and you think .\" this stuff is worth it, you can buy me a beer in return. Joerg Wunsch .\" ---------------------------------------------------------------------------- .\" .\" This manual page is partially obtained from Poul-Hennings CTM README .\" file. .\" .\" CTM and ctm(1) by .\" .\" $FreeBSD$ .\" .Dd March 25, 1995 .Dt CTM 5 .Os .Sh NAME .Nm ctm .Nd source code mirror system .Sh DESCRIPTION The .Nm transfers data in a specific file format, called a CTM delta. .Pp CTM deltas consist of control lines and data chunks. Each control line starts with the letters .Dq CTM , followed by a CTM statement and control data, and ends with a '\en' character. .Pp Data chunks always belong to the preceding control line, and the last field on that control line is the number of bytes in the data chunk. A trailing newline '\en' character follows each data chunk, this newline is not part of the chunk and is not included in the count. .Pp The CTM statements are as follows. .Bl -tag -width indent .It _BEGIN Ar version name number timestamp prefix This is the overall begin of a CTM delta file. The .Ar version field must match the program version (currently 2.0). .Ar Name is the name and .Ar number the sequence number of the CTM service, it is matched against the file .Pa .ctm_status to see if the delta has already been applied. .Ar Timestamp contains the year, month, day, hour, minute, and second of the time of delta creation for reference (followed by the letter .Sq Z meaning this is a UTC timestamp). The .Ar prefix field is currently not implemented. .It _END Ar md5 This statement ends the CTM delta, the global .Ar md5 checksum is matched against the MD5 checksum of the entire delta, up to and including the space (0x20) character following ``_END''. .It \&FM Ar name uid gid mode md5 count Make the file .Ar name , the original file had the uid .Ar uid (numerical, decimal), the gid .Ar gid (numerical, decimal), mode .Ar mode (numerical, octal), and the MD5 checksum .Ar md5 . .Pp The following .Ar count bytes data are the contents of the new file. .It \&FS Ar name uid gid mode md5before md5after count Substitute the contents of file .Ar name , the original file had the new uid .Ar uid (numerical, decimal), the new gid .Ar gid (numerical, decimal), new mode .Ar mode (numerical, octal), the old MD5 checksum .Ar md5before , and the new MD5 checksum .Ar md5after . .Pp The following .Ar count bytes data are the contents of the new file. .Pp File substitution is used if the commands to edit a file would exceed the total file length, so substituting it is more efficient. .It \&FN Ar name uid gid mode md5before md5after count Edit the file .Ar name . The arguments are as above, but the data sections contains an .Xr diff 1 -n script which should be applied to the file in question. .It \&FR Ar name md5 Remove the file .Ar name , which must match the MD5 checksum .Ar md5 . .It \&AS Ar name uid gid mode The original file .Ar name changed its owner to .Ar uid , its group to .Ar gid , and/or its mode to .Ar mode . .It \&DM Ar name uid gid mode The directory .Ar name is to be created, it had originally the owner .Ar uid , group .Ar gid , and mode .Ar mode . .It \&DR Ar name The directory .Ar name is to be removed. .El .Sh EXAMPLES In the following example, long lines have been folded to make them printable (marked by backslashes). .Bd -literal CTM_BEGIN 2.0 cvs-cur 485 19950324214652Z . CTMFR src/sys/gnu/i386/isa/scd.c,v 5225f13aa3c7e458f9dd0d4bb637b18d CTMFR src/sys/gnu/i386/isa/scdreg.h,v e5af42b8a06f2c8030b93a7d71afb223 CTMDM src/sys/gnu/i386/isa/Attic 0 552 775 CTMFS .ctm_status 545 552 664 d9ccd2a84a9dbb8db56ba85663adebf0 \\ e2a10c6f66428981782a0a18a789ee2e 12 cvs-cur 485 CTMFN CVSROOT/commitlogs/gnu 545 552 664 \\ 5d7bc3549140d860bd9641b5782c002d 7fb04ed84b48160c9b8eea84b4c0b6e3 394 a6936 21 ache 95/03/24 09:59:50 Modified: gnu/lib/libdialog kernel.c prgbox.c Log: [...] CTM_END 74ddd298d76215ae45a077a4b6a74e9c .Ed .Sh SEE ALSO .Xr ctm 1 , .Xr ctm_rmail 1 , .Xr ed 1 .Sh HISTORY Initial trials ran during the .Fx 1.1.5 , and many bugs and methods were hashed out. The CTM system has been made publicly available in .Fx 2.1 . .Sh AUTHORS +.An -nosplit The CTM system has been designed and implemented by -.An Poul-Henning Kamp -.Aq phk@FreeBSD.org . +.An Poul-Henning Kamp Aq Mt phk@FreeBSD.org . .Pp -.An Joerg Wunsch -.Aq joerg@FreeBSD.org +.An Joerg Wunsch Aq Mt joerg@FreeBSD.org wrote this man-page. Index: head/usr.sbin/ctm/ctm_rmail/ctm_rmail.1 =================================================================== --- head/usr.sbin/ctm/ctm_rmail/ctm_rmail.1 (revision 267667) +++ head/usr.sbin/ctm/ctm_rmail/ctm_rmail.1 (revision 267668) @@ -1,510 +1,510 @@ .\" NOTICE: This is free documentation. I hope you get some use from these .\" words. In return you should think about all the nice people who sweat .\" blood to document their free software. Maybe you should write some .\" documentation and give it away. Maybe with a free program attached! .\" .\" Author: Stephen McKay .\" .\" $FreeBSD$ .\" .Dd January 24, 1995 .Dt CTM_MAIL 1 .Os .Sh NAME .Nm ctm_smail , .Nm ctm_dequeue , .Nm ctm_rmail .Nd send and receive .Xr ctm 1 deltas via mail .Sh SYNOPSIS .Nm ctm_smail .Op Fl l Ar log .Op Fl m Ar maxmsgsize .Op Fl c Ar maxctmsize .Op Fl q Ar queue-dir .Ar ctm-delta .Ar mail-alias .Nm ctm_dequeue .Op Fl l Ar log .Op Fl n Ar numchunks .Ar queue-dir .Nm ctm_rmail .Op Fl Dfuv .Op Fl l Ar log .Op Fl p Ar piecedir .Op Fl d Ar deltadir .Op Fl b Ar basedir .Op Ar .Sh DESCRIPTION In conjunction with the .Xr ctm 1 command, .Nm ctm_smail , .Nm ctm_dequeue and .Nm ctm_rmail are used to distribute changes to a source tree via email. The .Nm ctm_smail utility is given a compressed .Xr ctm delta, and a mailing list to send it to. It splits the delta into manageable pieces, encodes them as mail messages and sends them to the mailing list (optionally queued to spread the mail load). Each recipient uses .Nm ctm_rmail (either manually or automatically) to decode and reassemble the delta, and optionally call .Xr ctm to apply it to the source tree. At the moment, several source trees are distributed, and by several sites. These include the .Fx Ns -current source and CVS trees, distributed by .Li freefall.FreeBSD.org . .Pp Command line arguments for .Nm ctm_smail : .Bl -tag -width indent .It Fl l Ar log Instead of appearing on .Em stderr , error diagnostics and informational messages (other than command line errors) are time stamped and written to the file .Em log . .It Fl m Ar maxmsgsize Limit the maximum size mail message that .Nm ctm_smail is allowed to send. It is approximate since mail headers and other niceties are not counted in this limit. If not specified, it will default to 64000 bytes, leaving room for 1535 bytes of headers before the rumoured 64k mail limit. .It Fl c Ar maxctmsize Limit the maximum size delta that will be sent. Deltas bigger that this limit will cause an apology mail message to be sent to the mailing list. This is to prevent massive changes overwhelming users' mail boxes. Note that this is the size before encoding. Encoding causes a 4/3 size increase before mail headers are added. If not specified, there is no limit. .It Fl q Ar queue-dir Instead of mailing the delta pieces now, store them in the given directory to be mailed later using .Nm ctm_dequeue . This feature allows the mailing of large deltas to be spread out over hours or even days to limit the impact on recipients with limited network bandwidth or small mail spool areas. .El .Pp .Ar ctm-delta is the delta to be sent, and .Ar mail-alias is the mailing list to send the delta to. The mail messages are sent using .Xr sendmail 8 . .Pp Command line arguments for .Nm ctm_dequeue : .Bl -tag -width indent .It Fl l Ar log Instead of appearing on .Em stderr , error diagnostics and informational messages (other than command line errors) are time stamped and written to the file .Em log . .It Fl n Ar numchunks Limit the number of mail messages that .Nm ctm_dequeue will send per run. By default, .Nm ctm_dequeue will send one mail message per run. .El .Pp .Ar queuedir is the directory containing the mail messages stored by .Nm ctm_smail . Up to .Ar numchunks mail messages will be sent in each run. The recipient mailing list is already encoded in the queued files. .Pp It is safe to run .Nm ctm_dequeue while .Nm ctm_smail is adding entries to the queue, or even to run .Nm ctm_smail multiple times concurrently, but a separate queue directory should be used for each tree being distributed. This is because entries are served in alphabetical order, and one tree will be unfairly serviced before any others, based on the delta names, not delta creation times. .Pp Command line arguments for .Nm ctm_rmail : .Bl -tag -width indent .It Fl l Ar log Instead of appearing on .Em stderr , error diagnostics and informational messages (other than command line errors) are time stamped and written to the file .Em log . .It Fl p Ar piecedir Collect pieces of deltas in this directory. Each piece corresponds to a single mail message. Pieces are removed when complete deltas are built. If this flag is not given, no input files will be read, but completed deltas may still be applied with .Xr ctm if the .Fl b flag is given. .It Fl d Ar deltadir Collect completed deltas in this directory. Deltas are built from one or more pieces when all pieces are present. .It Fl b Ar basedir Apply any completed deltas to this source tree. If this flag is not given, deltas will be stored, but not applied. The user may then apply the deltas manually, or by using .Nm ctm_rmail without the .Fl p flag. Deltas will not be applied if they do not match the .Li .ctm_status file in .Ar basedir (or if .Li .ctm_status does not exist). .It Fl D Delete deltas after successful application by .Xr ctm . It is probably a good idea to avoid this flag (and keep all the deltas) as .Xr ctm has the ability to recover small groups of files from a full set of deltas. .It Fl f Fork and execute in the background while applying deltas with .Xr ctm . This is useful when automatically invoking .Nm ctm_rmail from .Xr sendmail because .Xr ctm can take a very long time to complete, causing other people's mail to be delayed, and can in theory cause spurious mail retransmission due to the remote .Xr sendmail timing out, or even termination of .Nm ctm_rmail by mail filters such as .Xr "MH's" .Xr slocal . Do not worry about zillions of background .Xr ctm processes loading your machine, since locking is used to prevent more than one .Xr ctm invocation at a time. .It Fl u Pass the .Fl u flag to the .Xr ctm command when applying the complete deltas, causing it to set the modification time of created and modified files to the CTM delta creation time. .It Fl v Pass the .Fl v flag to the .Xr ctm command when applying the complete deltas, causing a more informative output. All .Xr ctm output appears in the .Nm ctm_rmail log file. .El .Pp The file arguments (or .Em stdin , if there are none) are scanned for delta pieces. Multiple delta pieces can be read from a single file, so an entire maildrop can be scanned and processed with a single command. .Pp It is safe to invoke .Nm ctm_rmail multiple times concurrently (with different input files), as might happen when .Xr sendmail is delivering mail asynchronously. This is because locking is used to keep things orderly. .Sh FILE FORMAT Following are the important parts of an actual (very small) delta piece: .Bd -literal From: owner-src-cur To: src-cur Subject: ctm-mail src-cur.0003.gz 1/4 CTM_MAIL BEGIN src-cur.0003.gz 1 4 H4sIAAAAAAACA3VU72/bNhD9bP0VByQoEiyRSZEUSQP9kKTeYCR2gDTdsGFAwB/HRogtG5K8NCj6 v4+UZSdtUQh6Rz0eee/xaF/dzx8up3/MFlDkBNrGnbttAwyo1pxoRgoiBNX/QJ5d3c9/X8DcPGGo lggkPiXngE4W1gUjKPJCYyk5MZRbIqmNW/ASglIFcdwIzTUxaAqhnCPcBqloKEkJVNDMF0Azk+Bo dDzzk0Ods/+A5gXv9YyJHjMCtJwQNeESNma7hOmXDRxn CTM_MAIL END 61065 .Ed .Pp The subject of the message always begins with .Dq ctm-mail followed by the name of the delta, which piece this is, and how many total pieces there are. The data are bracketed by .Dq CTM_MAIL BEGIN and .Dq CTM_MAIL END lines, duplicating the information in the subject line, plus a simple checksum. .Pp If the delta exceeds .Ar maxctmsize , then a message like this will be received instead: .Bd -literal From: owner-src-cur To: src-cur Subject: ctm-notice src-cur.0999.gz src-cur.0999.gz is 792843 bytes. The limit is 300000 bytes. You can retrieve this delta via ftp. .Ed .Pp You are then on your own! .Sh ENVIRONMENT If deltas are to be applied then .Xr ctm 1 and .Xr gunzip 1 must be in your .Ev PATH . .Sh FILES .Bl -tag -width indent .It Pa QUEUEDIR/* Pieces of deltas encoded as mail messages waiting to be sent to the mailing list. .It Pa PIECEDIR/* Pieces of deltas waiting for the rest to arrive. .It Pa DELTADIR/* Completed deltas. .It Pa BASEDIR/.ctm_status File containing the name and number of the next delta to be applied to this source tree. .El .Sh EXIT STATUS The .Nm ctm_smail , .Nm ctm_dequeue and .Nm ctm_rmail utilities return exit status 0 for success, and 1 for various failures. The .Nm ctm_rmail utility is expected to be called from a mail transfer program, and thus signals failure only when the input mail message should be bounced (preferably into your regular maildrop, not back to the sender). In short, failure to apply a completed delta with .Xr ctm is not considered an error important enough to bounce the mail, and .Nm ctm_rmail returns an exit status of 0. .Sh EXAMPLES To send delta 32 of .Em src-cur to a group of wonderful code hackers known to .Xr sendmail as .Em src-guys , limiting the mail size to roughly 60000 bytes, you could use: .Bd -literal -offset indent ctm_smail -m 60000 /wherever/it/is/src-cur.0032.gz src-guys .Ed .Pp To decode every .Nm ctm-mail message in your mailbox, assemble them into complete deltas, then apply any deltas built or lying around, you could use: .Bd -literal -offset indent ctm_rmail -p ~/pieces -d ~/deltas -b /usr/ctm-src-cur $MAIL .Ed .Pp (Note that no messages are deleted by .Nm ctm_rmail . Any mail reader could be used for that purpose.) .Pp To create a mail alias called .Em receiver-dude that will automatically decode and assemble deltas, but not apply them, you could put the following lines in your .Pa /etc/mail/aliases file (assuming the .Pa /ctm/tmp and .Pa /ctm/deltas directories and .Pa /ctm/log file are writable by user .Em daemon or group .Em wheel ) : .Bd -literal -offset indent receiver-dude: "|ctm_rmail -p /ctm/tmp -d /ctm/deltas -l /ctm/log" owner-receiver-dude: real_dude@wherever.you.like .Ed .Pp The second line will catch failures and drop them into your regular mailbox, or wherever else you like. .Pp To apply all the deltas collected, and delete those applied, you could use: .Bd -literal -offset indent ctm_rmail -D -d /ctm/deltas -b /ctm/src-cur -l /ctm/apply.log .Ed .Pp For maximum flexibility, consider this excerpt from a .Xr procmail script: .Bd -literal -offset indent PATH=$HOME/bin:$PATH :0 w * ^Subject: ctm-mail cvs-cur | ctm_incoming .Ed .Pp together with the shell script .Pa ~/bin/ctm_incoming : .Bd -literal -offset indent #! /bin/sh PATH="$HOME/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin" export PATH cd $HOME/ctm && ctm_rmail -f -p pieces -d deltas -l log -b /ctm .Ed .Pp which will deposit all .Xr ctm deltas in .Pa ~/ctm/deltas , apply them to the tree in .Pa /ctm , and drop any failures into your regular mail box. Note the .Ev PATH manipulation in .Pa ctm_incoming which allows .Nm ctm_rmail to execute .Xr ctm 1 on the .Pq non- Ns Fx machine that this example was taken from. .Sh SECURITY On its own, CTM is an insecure protocol - there is no authentication performed that the changes applied to the source code were sent by a trusted party, and so care should be taken if the CTM deltas are obtained via an unauthenticated medium such as regular email. It is a relatively simple matter for an attacker to forge a CTM delta to replace or precede the legitimate one and insert malicious code into your source tree. If the legitimate delta is somehow prevented from arriving, this will go unnoticed until a later delta attempts to touch the same file, at which point the MD5 checksum will fail. .Pp To remedy this insecurity, CTM delta pieces generated by FreeBSD.org are cryptographically signed in a format compatible with the GNU Privacy Guard utility, available in /usr/ports/security/gpg, and the Pretty Good Privacy v5 utility, /usr/ports/security/pgp5. The relevant public key can be obtained by fingering ctm@FreeBSD.org. .Pp CTM deltas which are thus signed cannot be undetectably altered by an attacker. Therefore it is recommended that you make use of GPG or PGP5 to verify the signatures if you receive your CTM deltas via email. .Sh DIAGNOSTICS In normal operation, .Nm ctm_smail will report messages like: .Bd -literal -offset indent ctm_smail: src-cur.0250.gz 1/2 sent to src-guys .Ed .Pp or, if queueing, .Bd -literal -offset indent ctm_smail: src-cur.0250.gz 1/2 queued for src-guys .Ed .Pp The .Nm ctm_dequeue utility will report messages like: .Bd -literal -offset indent ctm_dequeue: src-cur.0250.gz 1/2 sent .Ed .Pp The .Nm ctm_rmail utility will report messages like: .Bd -literal -offset indent ctm_rmail: src-cur.0250.gz 1/2 stored ctm_rmail: src-cur.0250.gz 2/2 stored ctm_rmail: src-cur.0250.gz complete .Ed .Pp If any of the input files do not contain a valid delta piece, .Nm ctm_rmail will report: .Bd -literal -offset indent ctm_rmail: message contains no delta .Ed .Pp and return an exit status of 1. You can use this to redirect wayward messages back into your real mailbox if your mail filter goes wonky. .Pp These messages go to .Em stderr or to the log file. Messages from .Xr ctm 1 turn up here too. Error messages should be self explanatory. .Sh SEE ALSO .Xr ctm 1 , .Xr ctm 5 .\" .Sh HISTORY .Sh AUTHORS -.An Stephen McKay Aq mckay@FreeBSD.org +.An Stephen McKay Aq Mt mckay@FreeBSD.org Index: head/usr.sbin/dconschat/dconschat.8 =================================================================== --- head/usr.sbin/dconschat/dconschat.8 (revision 267667) +++ head/usr.sbin/dconschat/dconschat.8 (revision 267668) @@ -1,329 +1,329 @@ .\" Copyright (c) 2003 Hidetoshi Shimokawa .\" 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 February 11, 2003 .Dt DCONSCHAT 8 .Os .Sh NAME .Nm dconschat .Nd user interface to .Xr dcons 4 .Sh SYNOPSIS .Nm .Op Fl brvwRT1 .Op Fl e Ar escape-char .Op Fl h Ar hz .Op Fl C Ar console_port .Op Fl G Ar gdb_port .Op Fl M Ar core .Op Fl N Ar system .Nm .Op Fl brvwR1 .Op Fl h Ar hz .Op Fl C Ar console_port .Op Fl G Ar gdb_port .Op Fl a Ar address .Op Fl u Ar bus_num .Fl t Ar target_eui64 .Sh DESCRIPTION The .Nm utility is designed to provide a way for users to access .Xr dcons 4 (dumb console device) on a local or remote system. The .Nm utility interacts with .Xr dcons 4 using .Xr kvm 3 or .Xr firewire 4 , and interacts with the user over TTY or TCP/IP. To access remote .Xr dcons 4 using .Xr firewire 4 , you have to specify target EUI64 address using the .Fl t option. Physical DMA should be enabled on the target machine for access via FireWire. .Pp The .Nm utility and the .Xr dcons 4 driver communicate using 2 ports, one for the console port and another for remote .Xr gdb 1 port. Users are supposed to access .Nm using TTY, .Xr telnet 1 and .Xr gdb 1 . You can specify listen ports for console and .Xr gdb 1 port using the .Fl C and .Fl G options respectively. The port number 0 has special meaning that current TTY (stdin/stdout) is used instead of TCP/IP. A negative port number will disable the port. By analogy with .Xr pty 4 device, the .Xr dcons 4 acts as a slave device and .Nm acts as a master device with .Xr telnetd 8 . .Pp Typed characters are normally transmitted directly to .Xr dcons 4 . A escape character (the default is .Ql ~ ) appearing as the first character of a line is an escape signal; the following are recognized: .Bl -tag -width ident .It Ic ~. Drop the connection and exit. .It Ic ~^G Invoke kgdb on the terminal on which dconschat is running. .It Ic ~^R Reset the target over FireWire if a reset address is registered in Configuration ROM. .It Ic ~^Z Suspend the dconschat process. .El .Pp The following options are supported. .Bl -tag -width indent .It Fl b Translate Ctrl-C to ALT_BREAK (CR + .Ql ~ + Ctrl-B) on .Xr gdb 1 port. .It Fl r Replay old buffer on connection. .It Fl v Verbose debug output. Multiple .Fl v options increase verbosity. .It Fl w Listen on a wildcard address rather than localhost. .It Fl R Read-only. Do not write anything to the .Xr dcons 4 buffer. .It Fl T Enable ad-hoc workaround for the TELNET protocol to remove unnecessary byte sequences. It should be set when you access .Nm using .Xr telnet 1 . .It Fl 1 One-shot. Read available buffer, then exit. This implies the .Fl r option. .It Fl e Ar escape-char Specify escape character. The default is '~'. .It Fl h Ar hz Specify polling rate. The default value is 100. .It Fl C Ar console_port Specify the console port. The default value is 0 (stdin/stdout). .It Fl G Ar gdb_port Specify .Xr gdb 1 port. The default value is \-1 (disabled). .It Fl M Ar core Specify core file. .It Fl N Ar system Specify system file such as .Pa /boot/kernel/kernel . .It Fl t Ar target_eui64 Specify the 64-bit extended unique identifier of the target, and use FireWire to access remote .Xr dcons 4 . .It Fl a Ar address Specify the physical I/O address of the .Xr dcons 4 buffer. See .Xr dcons 4 for details. If this option is not specified, .Nm tries to get the address from the Configuration ROM on the target. You are supposed to enable .Xr dcons_crom 4 on the target to omit this option. .It Fl u Ar bus_num Specify FireWire bus number. The default is 0. .El .Sh FILES .Bl -tag -width indent -compact .It Pa /dev/fwmem0.0 .It Pa /dev/mem .It Pa /dev/kmem .El .Sh EXAMPLES To use .Nm with FireWire for remote .Xr dcons 4 , you have to specify the EUI64 of the target. You can obtain EUI64 by running .Xr fwcontrol 8 without options. The first EUI64 is of the host running .Xr fwcontrol 8 and others on the bus follow. .Bd -literal -offset indent # fwcontrol 2 devices (info_len=2) node EUI64 status 1 77-66-55-44-33-22-11-00 0 0 00-11-22-33-44-55-66-77 1 .Ed .Pp The EUI64 does not change unless you change the hardware as the ethernet address. .Pp Now we can run .Nm . .Bd -literal -offset indent # dconschat -br -G 12345 -t 00-11-22-33-44-55-66-77 .Ed .Pp You will get console output of the target and login prompt if a .Xr getty 8 is running on .Xr dcons 4 . You can break to DDB with ALT_BREAK (CR + .Ql ~ + Ctrl-B) if .Dv DDB and .Dv ALT_BREAK_TO_DEBUGGER are enabled in the target kernel. To quit the session, type CR + .Ql ~ + .Ql \&. in the console port. .Pp Using .Xr gdb 1 port is almost the same as remote .Xr gdb 1 over serial line except using TCP/IP instead of .Pa /dev/cu* . See .Sx "On-line Kernel Debugging Using Remote GDB" section of .%T "The FreeBSD Developers Handbook" and .Xr gdb 4 for details. .Bd -literal -offset indent % gdb -k kernel.debug (kgdb) target remote :12345 .Ed .Pp Once .Xr gdb 1 is attached and you specified the .Fl b option to .Nm , typing Ctrl-C in .Xr gdb 1 causes a break to debugger. .Pp The following command gets the console log from the crash dump: .Bd -literal -offset indent # dconschat -1 -M vmcore.0 -N kernel.0 .Ed .Pp If you want access to the console using .Xr telnet 1 , try the following: .Bd -literal -offset indent # dconschat -rTC 5555 & # telnet localhost 5555 .Ed .Pp You may want to keep logging console output of several machines. .Nm conserver-com in the Ports collection may help you. Insert the following lines in .Pa conserver.cf : .Bd -literal -offset indent console local { master localhost; type exec; exec /usr/sbin/dconschat -rh 25; } console remote { master localhost; type exec; exec /usr/sbin/dconschat -rh 25 -t 00-11-22-33-44-55-66-77; } .Ed .Sh SEE ALSO .Xr gdb 1 , .Xr telnet 1 , .Xr kvm 3 , .Xr dcons 4 , .Xr dcons_crom 4 , .Xr ddb 4 , .Xr firewire 4 , .Xr fwohci 4 , .Xr gdb 4 , .Xr eui64 5 , .Xr fwcontrol 8 .Sh AUTHORS -.An Hidetoshi Shimokawa Aq simokawa@FreeBSD.org +.An Hidetoshi Shimokawa Aq Mt simokawa@FreeBSD.org .Sh BUGS This utility is .Ud Index: head/usr.sbin/devinfo/devinfo.8 =================================================================== --- head/usr.sbin/devinfo/devinfo.8 (revision 267667) +++ head/usr.sbin/devinfo/devinfo.8 (revision 267668) @@ -1,76 +1,76 @@ .\" -*- nroff -*- .\" .\" Copyright (c) 2002 Hiten Pandya .\" Copyright (c) 2002 Robert N. M. Watson .\" .\" 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 AUTHORS ``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 AUTHORS 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 28, 2005 .Dt DEVINFO 8 .Os .Sh NAME .Nm devinfo .Nd print information about system device configuration .Sh SYNOPSIS .Nm .Op Fl rv .Nm .Fl u .Sh DESCRIPTION The .Nm utility, without any arguments, shows the hierarchy of devices available in the system, starting from the .Dq nexus device. .Pp The following options are accepted. .Bl -tag -width indent .It Fl r Causes hardware resource information (such as IRQ, I/O ports, I/O memory addresses) to be also listed, under each device that has reserved those resources. .It Fl u Displays the same information as with .Fl r but sorts by resource type rather than by device, allowing to review the set of system resources by usage and available resources. I.e., it lists all the IRQ consumers together. .It Fl v Display all devices in the driver tree, not just those that are attached or busy. Without this flag, only those devices that have attached are reported. .El .Sh SEE ALSO .Xr systat 1 , .Xr devinfo 3 , .Xr iostat 8 , .Xr pciconf 8 , .Xr pnpinfo 8 , .Xr vmstat 8 , .Xr devclass 9 , .Xr device 9 .Sh AUTHORS -.An Mike Smith Aq msmith@FreeBSD.org +.An Mike Smith Aq Mt msmith@FreeBSD.org Index: head/usr.sbin/dumpcis/dumpcis.8 =================================================================== --- head/usr.sbin/dumpcis/dumpcis.8 (revision 267667) +++ head/usr.sbin/dumpcis/dumpcis.8 (revision 267668) @@ -1,49 +1,48 @@ .\" .\" Copyright (c) 2006 M. Warner Losh .\" 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. The name of the author may not be used to endorse or promote products .\" derived from this software without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" .\" $FreeBSD$ .\" .Dd October 18, 2006 .Dt DUMPCIS 8 .Os .Sh NAME .Nm dumpcis .Nd PC Card and Cardbus (PCMCIA) CIS display tool .Sh SYNOPSIS .Nm .Ar .Sh DESCRIPTION The .Nm utility translates a raw CIS stream into human readable form. .Sh SEE ALSO .Xr cardbus 4 , .Xr cbb 4 , .Xr pccard 4 .Sh AUTHORS -.An -nosplit The original version was written by -.An Warner Losh Aq imp@FreeBSD.org . +.An Warner Losh Aq Mt imp@FreeBSD.org . Index: head/usr.sbin/eeprom/eeprom.8 =================================================================== --- head/usr.sbin/eeprom/eeprom.8 (revision 267667) +++ head/usr.sbin/eeprom/eeprom.8 (revision 267668) @@ -1,700 +1,700 @@ .\" Copyright (c) 1996 The NetBSD Foundation, Inc. .\" Copyright (c) 2004 Marius Strobl .\" All rights reserved. .\" .\" This code is derived from software contributed to The NetBSD Foundation .\" by Jason R. Thorpe. .\" .\" 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. .\" .\" from: NetBSD: eeprom.8,v 1.11 2003/03/31 01:31:39 perry Exp .\" $FreeBSD$ .\" .Dd September 1, 2006 .Dt EEPROM 8 sparc64 .Os .Sh NAME .Nm eeprom .Nd "display or modify contents of the EEPROM or NVRAM" .Sh SYNOPSIS .Nm .Fl a .Nm .Op Fl .Ar name Ns Op = Ns Ar value .Ar ... .Sh DESCRIPTION The .Nm utility provides an interface for displaying and changing the system's configuration variables contained in EEPROM or NVRAM. In the first synopsis form, all available configuration variables and their current values are printed. In the second form, only the variable selected by .Ar name and its value is printed or changed if .Ar name is followed by .Ql = and a .Ar value . .Pp The following options are available: .Bl -tag -width indent .It Fl Commands for displaying or changing variables are taken from stdin, allowing one .Ar name or one .Ar name and .Ar value pair per line. The output is printed on stdout. .It Fl a Print all available configuration variables and their current values. .El .Sh VARIABLES AND VALUES Below are variables and values that one is likely to find on a system equipped with OpenBoot 3.x and Open Firmware respectively. .Pp Note: the attempt to set a variable to an illegal value results in the Open Firmware setting it to some legal value instead. The .Nm utility will detect this, try to recover the previous value of the variable and issue a warning telling that the requested value could not be set. .Bl -tag -width ".Va last-hardware-update" .It Va auto-boot? If .Dq Li true , the system will try to boot automatically from the devices listed in .Va boot-device and .Va diag-device respectively, using the command specified in .Va boot-command at power-up. Default: .Dq Li true . .It Va auto-boot-retry? If set to .Dq Li true and .Va auto-boot? is also set to .Dq Li true , the system will try to boot from the specified boot devices forever. Default: .Dq Li false . .It Va ansi-terminal? If .Dq Li false , .Tn ANSI escape sequences are not interpreted by the terminal emulator. Default: .Dq Li true . .It Va boot-command Command executed when .Va auto-boot? is set to .Dq Li true . Default: .Dq Li boot . .It Va boot-device Default device to boot from if .Va diag-switch? is set to .Dq Li false . Takes one or more device aliases or device paths. The boot devices are sequentially tried to boot from, beginning with the first one specified. Default: .Dq Li "net disk" . .It Va cpci-probe-list Digits in the format .Dq Li 0,1,2 specifying in which order to probe the devices on the CompactPCI bus at power-up. Default: system-dependent. .It Va boot-file Default arguments for boot when .Va diag-switch? is set to .Dq Li false . When empty, the secondary boot loader will choose the file to boot. Default: empty string. .It Va diag-device Like .Va boot-device . Used when .Va diag-switch? is set to .Dq Li true . Default: .Dq Li net . .It Va diag-file Like .Va boot-file . Used when .Va diag-switch? is set to .Dq Li true . Default: empty string. .It Va diag-level Level of diagnostics to run when .Va diag-switch? is set to .Dq Li true . Possible values are .Dq Li max , .Dq Li menus , .Dq Li min and .Dq Li off (depending on the system model). When set to .Dq Li off , the Power-On Self Test (POST) is not run. The other values are interpreted by the POST. Default: .Dq Li min or .Dq Li max (system-dependent). .It Va diag-switch? If .Dq Li true , the system will boot and run in diagnostic mode. Default: .Dq Li false or .Dq Li true (system-dependent). .It Va env-monitor Enables or disables the Advanced System Monitoring (ASM). Possible values are .Dq Li enabled and .Dq Li disabled . Default: .Dq Li enabled . .It Va fcode-debug? Used for debugging FCode programs. If set to .Dq Li true , names of additional FCodes are registered in the Forth dictionary. Default: .Dq Li false . .It Va hardware-revision A string describing the system hardware version. Default: system-dependent. .It Va input-device One of the strings .Dq Li keyboard , .Dq Li ttya , or .Dq Li ttyb , specifying the default console input device. Default: .Dq Li keyboard or .Dq Li ttya (system-dependent). .It Va keyboard-click? If set to .Dq Li true , the keys click annoyingly. Default: .Dq Li false . .It Va keymap Keymap for a custom keyboard. Default: empty string. .It Va last-hardware-update Similar to .Va hardware-revision , describing when the hardware was last updated. Default: system-dependent. .It Va last-poweroff-cause Cause of the last power-off. Used internally by the OpenBoot PROM. Default: .Dq Li 0 . .It Va load-base Default address where client programs are loaded to. It is unlikely that this value should ever be changed. Default: .Dq Li 16384 . .It Va local-mac-address? If set to .Dq Li false , all Ethernet devices with FCode will use the system default MAC address. If set to .Dq Li true , Ethernet devices with FCode that contains a unique MAC address will use it rather than the system's default MAC address. Default: .Dq Li false . .Pp Ethernet devices with FCode include those supported by .Xr dc 4 , .Xr gem 4 and .Xr hme 4 . Please see the respective manual page for further information. .It Va mfg-mode Manufacture test mode interpreted by the POST. Possible values are .Dq Li chamber and .Dq Li off . Default: .Dq Li off . .It Va mfg-switch? If set to .Dq Li true , manufacturing tests are repeated until stopped by pressing STOP-A. Default: .Dq Li off . .It Va net-timeout If set to .Dq Li 0 , the system will try to boot forever when the boot device used is a network device. Any non-zero value is interpreted as minutes to try a network boot. Default: .Dq Li 0 . .It Va nvramrc Contents of the NVRAMRC. Default: empty string. .Pp While .Va nvramrc can be set using .Nm , it is preferred to use .Ic nvedit in the boot monitor instead. .It Va oem-banner A string displayed at power-up, rather than the default banner. Used when .Va oem-banner? is set to .Dq Li true . Default: system-dependent. .It Va oem-banner? If set to .Dq Li true , the string stored in .Va oem-banner is displayed at power-up rather than the default banner. Default: system-dependent. .It Va oem-logo A logo displayed at power-up when .Va oem-logo? is set to .Dq Li true , rather than the default logo. The logo has to be 512 bytes in size, containing a 64x64-bit monochrome image in Sun Raster format without the leading 32-byte header. Default: system-dependent. .Pp To set the logo with .Nm , give the pathname of the file containing the image as the .Ar value . Using an empty .Ar value will remove the image. .It Va oem-logo? If set to .Dq Li true , the logo stored in .Va oem-logo is displayed at power-up rather than the default logo. .It Va output-device One of the strings .Dq Li screen , .Dq Li ttya , or .Dq Li ttyb , specifying the default console output device. Default: .Dq Li screen or .Dq Li ttya (system-dependent). .It Va pcia-probe-list Digits in the format .Dq Li 1,2,3 specifying in which order to probe the devices on the PCI bus A. Default: system-dependent. .It Va pcib-probe-list Like .Va pcia-probe-list , but for PCI bus B. Default: system-dependent. .It Va #power-cycles Number of power-cycles. Automatically incremented on each power-cycle. Default: system-dependent. .It Va sbus-probe-list Digits in the format .Dq Li 0123 specifying in which order to probe the SBus slots at power-up. Default: system-dependent. .It Va screen-#columns An integer specifying the screen width in characters per line. Default: .Dq Li 80 . .It Va screen-#rows An integer specifying the screen height in lines. Default: .Dq Li 34 . .It Va scsi-initiator-id The SCSI ID of SCSI controllers in the range of [0-7] or [0-f] (depending on the controller). A SCSI controller may or may not adhere to this setting, depending on its FCode and device driver. Default: .Dq Li 7 . .It Va security-#badlogins Number of incorrect password attempts when .Va security-mode is set to .Dq Li command or .Dq Li full . Default: .Dq Li 0 . .It Va security-mode Boot monitor security level. One of the three possible values .Dq Li full , .Dq Li command , or .Dq Li none . When set to .Dq Li full , all boot monitor commands except for .Ic go require the password. When set to .Dq Li command , all boot monitor commands except for .Ic boot and .Ic go require the password. When set to .Dq Li none , no password is required. Default: .Dq Li none . .Pp When .Nm is used to set .Va security-mode to .Dq Li full or .Dq Li command , you will be prompted for the password. When .Va security-mode is set to .Dq Li none , .Nm will clear the password. .It Va security-password The password used when .Va security-mode is set to .Dq Li full or .Dq Li command . The maximum length for this password is 8 characters. All characters exceeding this length will be ignored. The value displayed for .Va security-password is always an empty string, even when a password is set. Default: empty string. .Pp When .Va security-mode is set to .Dq Li full or .Dq Li command , .Nm can be used to enter a new password using any .Ar value for .Va security-password on the command line. You will be prompted by .Nm to type in the new password in this case. Trying to set .Va security-password when .Va security-mode is set to .Dq Li none using .Nm has no effect. .It Va selftest-#megs An integer specifying the number of megabytes of memory to test upon power-up when .Va diag-switch? is set to .Dq Li false . Default: .Dq Li 1 . .It Va shutdown-temperature Temperature at which the ASM issues an over-temperature shutdown. Default: system-dependent. .It Va silent-mode If set to .Dq Li true , memory test messages will not be displayed at power-up. Default: .Dq Li false . .It Va sunmon-compat? If set to .Dq Li true , the old bootROM interface will be used while in the boot monitor, rather than the OpenBoot PROM interface. Default: .Dq Li false . .It Va system-board-date Manufacturing date of the system board. Default: system-dependent. .It Va system-board-serial# Serial number of the system board. Default: system-dependent. .It Va tpe-link-test? Enable link test on 10baseT and 100baseTX Ethernet devices. Default: .Dq Li true . .It Va ttya-mode A string of five comma separated fields in the format .Dq Li 9600,8,n,1,- . The first field is the baud rate. The second field is the number of data bits. The third field is the parity; acceptable values for parity are .Ql n (none), .Ql e (even), .Ql o (odd), .Ql m (mark), and .Ql s (space). The fourth field is the number of stop bits. The fifth field is the .Dq handshake field; acceptable values are .Ql - (none), .Ql h (RTS/CTS), and .Ql s (Xon/Xoff). Default: .Dq Li 9600,8,n,1,- . .It Va ttya-ignore-cd If set to .Dq Li true , the system will ignore carrier detect. Default: .Dq Li true . .It Va ttya-rts-dtr-off If set to .Dq Li true , the system will ignore RTS/DTR. Default: .Dq Li false . .It Va ttyb-mode Like .Va ttya-mode , but for ttyb. Default: .Dq Li 9600,8,n,1,- . .It Va ttyb-ignore-cd Like .Va ttya-ignore-cd , but for ttyb. Default: .Dq Li true . .It Va ttyb-rts-dtr-off Like .Va ttya-rts-dtr-off , but for ttyb. Default: .Dq Li false . .It Va use-boot-table? Use boot table defined by the OEM. Default: system-dependent. .It Va use-nvramrc? If set to .Dq Li true , the script stored in .Va nvramrc will be executed during start-up. Default: .Dq Li false . .It Va warning-temperature Temperature at which the ASM issues an over-temperature warning. Default: system-dependent. .It Va watchdog-enable? Enables or disables the system watchdog timer. Default: .Dq Li false . .It Va watchdog-reboot? If set to .Dq Li true , the system will reboot upon terminal count of the system watchdog timer. If set to .Dq Li false , the system will fall into the boot monitor. Default: .Dq Li false . .It Va watchdog-timeout Expiry limit for the system watchdog timer. Range and unit depend on the system model. Default: system-dependent. .El .Sh EXAMPLES Print all available configuration variables and their current values: .Pp .Dl "eeprom -a" .Pp Print the current value of the .Va local-mac-address? variable: .Pp .Dl "eeprom local-mac-address\e?" .Pp Set the value of the .Va local-mac-address? variable to .Dq Li true : .Pp .Dl "eeprom local-mac-address\e?=true" .Pp Note that the .Ql \e in the above examples is used to keep the shell from interpreting the .Ql \&? . .Pp Write an image to the .Va oem-logo variable: .Pp .Dl "eeprom oem-logo=/path/to/image.raw" .Pp Remove the image from the .Va oem-logo variable again: .Pp .Dl "eeprom oem-logo=" .Pp Set the value of the .Va security-mode variable to .Dq Li full , and set the password: .Bd -literal -offset indent eeprom security-mode=full New password: Retype new password: .Ed .Pp Remember that the maximum length for the password is 8 characters. All characters exceeding this length will be ignored. .Pp Set a new password when the .Va security-mode variable is set to .Dq Li command or .Dq Li full : .Bd -literal -offset indent eeprom security-password= New password: Retype new password: .Ed .Sh SEE ALSO .Xr dc 4 , .Xr gem 4 , .Xr hme 4 , .Xr ofwdump 8 .Sh HISTORY The .Nm utility first appeared in .Bx 4.4 . It was adopted from there by .Fx 2.0 . The .Nm utility was removed from .Fx again after .Fx 2.1.7 because the utility was unused at that time. The present implementation of the .Nm utility first appeared in .Fx 5.3 . It is inspired by the .Nx .Xr eeprom 8 and SunOS/Solaris .Xr eeprom 1M utilities. .Sh AUTHORS .An -nosplit The .Nm utility uses base code from the .Nx version written by -.An "Jason R. Thorpe" . +.An Jason R. Thorpe . The handlers for the Open Firmware .Pa /options node were written by -.An "Marius Strobl" Aq marius@FreeBSD.org . +.An Marius Strobl Aq Mt marius@FreeBSD.org . The code for accessing the Open Firmware device tree is shared with the .Xr ofwdump 8 utility written by -.An "Thomas Moestl" Aq tmm@FreeBSD.org . +.An Thomas Moestl Aq Mt tmm@FreeBSD.org . .Sh BUGS Currently, .Nm only supports systems equipped with Open Firmware and is only tested on Sun Microsystems sun4u machines. Index: head/usr.sbin/etcupdate/etcupdate.8 =================================================================== --- head/usr.sbin/etcupdate/etcupdate.8 (revision 267667) +++ head/usr.sbin/etcupdate/etcupdate.8 (revision 267668) @@ -1,836 +1,836 @@ .\" Copyright (c) 2010-2013 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 December 9, 2013 .Dt ETCUPDATE 8 .Os .Sh NAME .Nm etcupdate .Nd "manage updates to system files not updated by installworld" .Sh SYNOPSIS .Nm .Op Fl npBF .Op Fl d Ar workdir .Op Fl r | Fl s Ar source | Fl t Ar tarball .Op Fl A Ar patterns .Op Fl D Ar destdir .Op Fl I Ar patterns .Op Fl L Ar logfile .Op Fl M Ar options .Nm .Cm build .Op Fl B .Op Fl d Ar workdir .Op Fl s Ar source .Op Fl L Ar logfile .Op Fl M Ar options .Ar tarball .Nm .Cm diff .Op Fl d Ar workdir .Op Fl D Ar destdir .Op Fl I Ar patterns .Op Fl L Ar logfile .Nm .Cm extract .Op Fl B .Op Fl d Ar workdir .Op Fl s Ar source | Fl t Ar tarball .Op Fl L Ar logfile .Op Fl M Ar options .Nm .Cm resolve .Op Fl p .Op Fl d Ar workdir .Op Fl D Ar destdir .Op Fl L Ar logfile .Nm .Cm status .Op Fl d Ar workdir .Op Fl D Ar destdir .Sh DESCRIPTION The .Nm utility is a tool for managing updates to files that are not updated as part of .Sq make installworld such as files in .Pa /etc . It manages updates by doing a three-way merge of changes made to these files against the local versions. It is also designed to minimize the amount of user intervention with the goal of simplifying upgrades for clusters of machines. .Pp To perform a three-way merge, .Nm keeps copies of the current and previous versions of files that it manages. These copies are stored in two trees known as the .Dq current and .Dq previous trees. During a merge, .Nm compares the .Dq current and .Dq previous copies of each file to determine which changes need to be merged into the local version of each file. If a file can be updated without generating a conflict, .Nm will update the file automatically. If the local changes to a file conflict with the changes made to a file in the source tree, then a merge conflict is generated. The conflict must be resolved after the merge has finished. The .Nm utility will not perform a new merge until all conflicts from an earlier merge are resolved. .Sh MODES The .Nm utility supports several modes of operation. The mode is specified via an optional command argument. If present, the command must be the first argument on the command line. If a command is not specified, the default mode is used. .Ss Default Mode The default mode merges changes from the source tree to the destination directory. First, it updates the .Dq current and .Dq previous trees. Next, it compares the two trees merging changes into the destination directory. Finally, it displays warnings for any conditions it could not handle automatically. .Pp If the .Fl r option is not specified, then the first step taken is to update the .Dq current and .Dq previous trees. If a .Dq current tree already exists, then that tree is saved as the .Dq previous tree. An older .Dq previous tree is removed if it exists. By default the new .Dq current tree is built from a source tree. However, if a tarball is specified via the .Fl t option, then the tree is extracted from that tarball instead. .Pp Next, .Nm compares the files in the .Dq current and .Dq previous trees. If a file was removed from the .Dq current tree, then it will be removed from the destination directory only if it does not have any local modifications. If a file was added to the .Dq current tree, then it will be copied to the destination directory only if it would not clobber an existing file. If a file is changed in the .Dq current tree, then .Nm will attempt to merge the changes into the version of the file in the destination directory. If the merge encounters conflicts, then a version of the file with conflict markers will be saved for future resolution. If the merge does not encounter conflicts, then the merged version of the file will be saved in the destination directory. If .Nm is not able to safely merge in changes to a file other than a merge conflict, it will generate a warning. .Pp For each file that is updated a line will be output with a leading character to indicate the action taken. The possible actions follow: .Pp .Bl -tag -width "A" -compact -offset indent .It A Added .It C Conflict .It D Deleted .It M Merged .It U Updated .El .Pp Finally, if any warnings were encountered they are displayed after the merge has completed. .Pp Note that for certain files .Nm will perform post-install actions any time that the file is updated. Specifically, .Xr pwd_mkdb 8 is invoked if .Pa /etc/master.passwd is changed, .Xr cap_mkdb 1 is invoked to update .Pa /etc/login.conf.db if .Pa /etc/login.conf is changed, .Xr newaliases 1 is invoked if .Pa /etc/mail/aliases is changed, and .Pa /etc/rc.d/motd is invoked if .Pa /etc/motd is changed. One exception is that if .Pa /etc/mail/aliases is changed and the destination directory is not the default, then a warning will be issued instead. This is due to a limitation of the .Xr newaliases 1 command. Similarly, if .Pa /etc/motd is changed and the destination directory is not the default, then .Pa /etc/rc.d/motd will not be executed due to a limitation of that script. In this case no warning is issued as the result of .Pa /etc/rc.d/motd is merely cosmetic and will be corrected on the next reboot. .Ss Build Mode The .Cm build mode is used to build a tarball that contains a snapshot of a .Dq current tree. This tarball can be used by the default and extract modes. Using a tarball can allow .Nm to perform a merge without requiring a source tree that matches the currently installed world. The .Fa tarball argument specifies the name of the file to create. The file will be a .Xr tar 5 file compressed with .Xr bzip2 1 . .Ss Diff Mode The .Cm diff mode compares the versions of files in the destination directory to the .Dq current tree and generates a unified format diff of the changes. This can be used to determine which files have been locally modified and how. Note that .Nm does not manage files that are not maintained in the source tree such as .Pa /etc/fstab and .Pa /etc/rc.conf . .Ss Extract Mode The .Cm extract mode generates a new .Dq current tree. Unlike the default mode, it does not save any existing .Dq current tree and does not modify any existing .Dq previous tree. The new .Dq current tree can either be built from a source tree or extracted from a tarball. .Ss Resolve Mode The .Cm resolve mode is used to resolve any conflicts encountered during a merge. In this mode, .Nm iterates over any existing conflicts prompting the user for actions to take on each conflicted file. For each file, the following actions are available: .Pp .Bl -tag -width "(tf) theirs-full" -compact .It (p) postpone Ignore this conflict for now. .It (df) diff-full Show all changes made to the merged file as a unified diff. .It (e) edit Change the merged file in an editor. .It (r) resolved Install the merged version of the file into the destination directory. .It (mf) mine-full Use the version of the file in the destination directory and ignore any changes made to the file in the .Dq current tree. .It (tf) theirs-full Use the version of the file from the .Dq current tree and discard any local changes made to the file. .It (h) help Display the list of commands. .El .Ss Status Mode The .Cm status mode shows a summary of the results of the most recent merge. First it lists any files for which there are unresolved conflicts. Next it lists any warnings generated during the last merge. If the last merge did not generate any conflicts or warnings, then nothing will be output. .Sh OPTIONS The following options are available. Note that most options do not apply to all modes. .Bl -tag -width ".Fl A Ar patterns" .It Fl A Ar patterns Always install the new version of any files that match any of the patterns listed in .Ar patterns . Each pattern is evaluated as an .Xr sh 1 shell pattern. This option may be specified multiple times to specify multiple patterns. Multiple space-separated patterns may also be specified in a single option. Note that ignored files specified via the .Ev IGNORE_FILES variable or the .Fl I option will not be installed. .It Fl B Do not build generated files in a private object tree. Instead, reuse the generated files from a previously built object tree that matches the source tree. This can be useful to avoid gratuitous conflicts in .Xr sendmail 8 configuration files when bootstrapping. It can also be useful for building a tarball that matches a specific world build. .It Fl D Ar destdir Specify an alternate destination directory as the target of a merge. This is analogous to the .Dv DESTDIR variable used with .Sq make installworld . The default destination directory is an empty string which results in merges updating .Pa /etc on the local machine. .It Fl d Ar workdir Specify an alternate directory to use as the work directory. The work directory is used to store the .Dq current and .Dq previous trees as well as unresolved conflicts. The default work directory is .Pa /var/db/etcupdate . .It Fl F Ignore changes in the FreeBSD ID string when comparing files in the destination directory to files in either of the .Dq current or .Dq previous trees. In .Cm diff mode, this reduces noise due to FreeBSD ID string changes in the output. During an update this can simplify handling for harmless conflicts caused by FreeBSD ID string changes. .Pp Specifically, if a file in the destination directory is identical to the same file in the .Dq previous tree modulo the FreeBSD ID string, then the file is treated as if it was unmodified and the .Dq current version of the file will be installed. Similarly, if a file in the destination directory is identical to the same file in the .Dq current tree modulo the FreeBSD ID string, then the .Dq current version of the file will be installed to update the ID string. If the .Dq previous and .Dq current versions of the file are identical, then .Nm will not change the file in the destination directory. .Pp Due to limitations in the .Xr diff 1 command, this option may not have an effect if there are other changes in a file that are close to the FreeBSD ID string. .It Fl I Ar patterns Ignore any files that match any of the patterns listed in .Ar patterns . No warnings or other messages will be generated for those files during a merge. Each pattern is evaluated as an .Xr sh 1 shell pattern. This option may be specified multiple times to specify multiple patterns. Multiple space-separated patterns may also be specified in a single option. .It Fl L Ar logfile Specify an alternate path for the log file. The .Nm utility logs each command that it invokes along with the standard output and standard error to this file. By default the log file is stored in a file named .Pa log in the work directory. .It Fl M Ar options Pass .Ar options as additional parameters to .Xr make 1 when building a .Dq current tree. This can be used for to set the .Dv TARGET or .Dv TARGET_ARCH variables for a cross-build. .It Fl n Enable .Dq dry-run mode. Do not merge any changes to the destination directory. Instead, report what actions would be taken during a merge. Note that the existing .Dq current and .Dq previous trees will not be changed. If the .Fl r option is not specified, then a temporary .Dq current tree will be extracted to perform the comparison. .It Fl p Enable .Dq pre-world mode. Only merge changes to files that are necessary to successfully run .Sq make installworld or .Sq make installkernel . When this flag is enabled, the existing .Dq current and .Dq previous trees are left alone. Instead, a temporary tree is populated with the necessary files. This temporary tree is compared against the .Dq current tree. This allows a normal update to be run after .Sq make installworld has completed. Any conflicts generated during a .Dq pre-world update should be resolved by a .Dq pre-world .Cm resolve . .It Fl r Do not update the .Dq current and .Dq previous trees during a merge. This can be used to .Dq re-run a previous merge operation. .It Fl s Ar source Specify an alternate source tree to use when building or extracting a .Dq current tree. The default source tree is .Pa /usr/src . .It Fl t Ar tarball Extract a new .Dq current tree from a tarball previously generated by the .Cm build command rather than building the tree from a source tree. .El .Sh CONFIG FILE The .Nm utility can also be configured by setting variables in an optional configuration file named .Pa /etc/etcupdate.conf . Note that command line options override settings in the configuration file. The configuration file is executed by .Xr sh 1 , so it uses that syntax to set configuration variables. The following variables can be set: .Bl -tag -width ".Ev ALWAYS_INSTALL" .It Ev ALWAYS_INSTALL Always install files that match any of the patterns listed in this variable similar to the .Fl A option. .It Ev DESTDIR Specify an alternate destination directory similar to the .Fl D option. .It Ev EDITOR Specify a program to edit merge conflicts. .It Ev FREEBSD_ID Ignore changes in the FreeBSD ID string similar to the .Fl F option. This is enabled by setting the variable to a non-empty value. .It Ev IGNORE_FILES Ignore files that match any of the patterns listed in this variable similar to the .Fl I option. .It Ev LOGFILE Specify an alternate path for the log file similar to the .Fl L option. .It Ev MAKE_OPTIONS Pass additional options to .Xr make 1 when building a .Dq current tree similar to the .Fl M option. .It Ev SRCDIR Specify an alternate source tree similar to the .Fl s option. .It Ev WORKDIR Specify an alternate work directory similar to the .Fl d option. .El .Sh ENVIRONMENT The .Nm utility uses the program identified in the .Ev EDITOR environment variable to edit merge conflicts. If .Ev EDITOR is not set, .Xr vi 1 is used as the default editor. .Sh FILES .Bl -tag -width ".Pa /var/db/etcupdate/log" -compact .It Pa /etc/etcupdate.conf Optional config file. .It Pa /var/db/etcupdate Default work directory used to store trees and other data. .It Pa /var/db/etcupdate/log Default log file. .El .Sh EXIT STATUS .Ex -std .Sh EXAMPLES If the source tree matches the currently installed world, then the following can be used to bootstrap .Nm so that it can be used for future upgrades: .Pp .Dl "etcupdate extract" .Pp To merge changes after an upgrade via the buildworld and installworld process: .Pp .Dl "etcupdate" .Pp To resolve any conflicts generated during a merge: .Pp .Dl "etcupdate resolve" .Sh DIAGNOSTICS The following warning messages may be generated during a merge. Note that several of these warnings cover obscure cases that should occur rarely if at all in practice. For example, if a file changes from a file to a directory in the .Dq current tree and the file was modified in the destination directory, then a warning will be triggered. In general, when a warning references a pathname, the corresponding file in the destination directory is not changed by a merge operation. .Bl -diag .It "Directory mismatch: ()" An attempt was made to create a directory at .Pa path but an existing file of type .Dq type already exists for that path name. .It "Modified link changed: ( became )" The target of a symbolic link named .Pa file was changed from .Dq old to .Dq new in the .Dq current tree. The symbolic link has been modified to point to a target that is neither .Dq old nor .Dq new in the destination directory. .It "Modified mismatch: ( vs )" A file named .Pa file of type .Dq new was modified in the .Dq current tree, but the file exists as a different type .Dq dest in the destination directory. .It "Modified changed: ( became )" A file named .Pa file changed type from .Dq old in the .Dq previous tree to type .Dq new in the .Dq current tree. The file in the destination directory of type .Dq type has been modified, so it could not be merged automatically. .It "Modified remains: " The file of type .Dq type named .Pa file has been removed from the .Dq current tree, but it has been locally modified. The modified version of the file remains in the destination directory. .It "Needs update: /etc/localtime (required manual update via tzsetup(1))" The .Fa /var/db/zoneinfo file does not exist, so .Nm was not able to refresh .Fa /etc/localtime from its source file in .Fa /usr/share/zoneinfo . Running .Xr tzsetup 1 will both refresh .Fa /etc/localtime and generate .Fa /var/db/zoneinfo permitting future updates to refresh .Fa /etc/localtime automatically. .It "Needs update: /etc/mail/aliases.db (required manual update via newaliases(1))" The file .Pa /etc/mail/aliases was updated during a merge with a non-empty destination directory. Due to a limitation of the .Xr newaliases 1 command, .Nm was not able to automatically update the corresponding aliases database. .It "New file mismatch: ( vs )" A new file named .Pa file of type .Dq new has been added to the .Dq current tree. A file of that name already exists in the destination directory, but it is of a different type .Dq dest . .It "New link conflict: ( vs )" A symbolic link named .Pa file has been added to the .Dq current tree that links to .Dq new . A symbolic link of the same name already exists in the destination directory, but it links to a different target .Dq dest . .It "Non-empty directory remains: " The directory .Pa file was removed from the .Dq current tree, but it contains additional files in the destination directory. These additional files as well as the directory remain. .It "Remove mismatch: ( became )" A file named .Pa file changed from type .Dq old in the .Dq previous tree to type .Dq new in the .Dq current tree, but it has been removed in the destination directory. .It "Removed file changed: " A file named .Pa file was modified in the .Dq current tree, but it has been removed in the destination directory. .It "Removed link changed: ( became )" The target of a symbolic link named .Pa file was changed from .Dq old to .Dq new in the .Dq current tree, but it has been removed in the destination directory. .El .Sh SEE ALSO .Xr cap_mkdb 1 , .Xr diff 1 , .Xr make 1 , .Xr newaliases 1 , .Xr sh 1 , .Xr pwd_mkdb 8 .Sh HISTORY The .Nm utility first appeared in .Fx 10.0 . .Sh AUTHORS The .Nm utility was written by -.An John Baldwin Aq jhb@FreeBSD.org . +.An John Baldwin Aq Mt jhb@FreeBSD.org . .Sh BUGS Rerunning a merge does not automatically delete conflicts left over from a previous merge. Any conflicts must be resolved before the merge can be rerun. It it is not clear if this is a feature or a bug. .Pp There is no way to easily automate conflict resolution for specific files. For example, one can imagine a syntax along the lines of .Pp .Dl "etcupdate resolve tf /some/file" .Pp to resolve a specific conflict in an automated fashion. .Pp It might be nice to have something like a .Sq revert command to replace a locally modified version of a file with the stock version of the file. For example: .Pp .Dl "etcupdate revert /etc/mail/freebsd.cf" .Pp Bootstrapping .Nm often results in gratuitous diffs in .Pa /etc/mail/*.cf that cause conflicts in the first merge. If an object tree that matches the source tree is present when bootstrapping, then passing the .Fl B flag to the .Cm extract command can work around this. Index: head/usr.sbin/fdwrite/fdwrite.1 =================================================================== --- head/usr.sbin/fdwrite/fdwrite.1 (revision 267667) +++ head/usr.sbin/fdwrite/fdwrite.1 (revision 267668) @@ -1,129 +1,129 @@ .\" .\" ---------------------------------------------------------------------------- .\" "THE BEER-WARE LICENSE" (Revision 42): .\" wrote this file. As long as you retain this notice you .\" can do whatever you want with this stuff. If we meet some day, and you think .\" this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp .\" ---------------------------------------------------------------------------- .\" .\" $FreeBSD$ .\" .\" .Dd September 16, 1993 .Dt FDWRITE 1 .Os .Sh NAME .Nm fdwrite .Nd format and write floppy disks .Sh SYNOPSIS .Nm .Op Fl v .Op Fl y .Op Fl f Ar inputfile .Op Fl d Ar device .Sh DESCRIPTION The .Nm utility formats and writes one and more floppy disks. Any floppy disk device capable of formatting can be used. .Pp The .Nm utility will ask the user (on .Pa /dev/tty ) to insert a new floppy and press return. The device will then be opened, and queried for its parameters, then each track will be formatted, written with data from the .Ar inputfile , read back and compared. When the floppy disk is filled, the process is repeated, with the next disk. This continues until the program is interrupted or EOF is encountered on the .Ar inputfile . .Pp The options are as follows: .Bl -tag -width 10n -offset indent .It Fl v Toggle verbosity on stdout. Default is ``on''. After .Ar device is opened first time the format will be printed. During operation progress will be reported with the number of tracks remaining on the current floppy disk, and the letters I, Z, F, W, R and C, which indicates completion of Input, Zero-fill, Format Write, Read and Compare of current track respectively. .It Fl y Do not ask for presence of a floppy disk in the drive. This non-interactive flag is useful for shell scripts. .It Fl f Ar inputfile Input file to read. If none is given, stdin is assumed. .It Fl d Ar device The name of the floppy device to write to. Default is .Pa /dev/fd0 . .El .Pp The .Nm utility actually closes the .Ar device while it waits for the user to press return, it is thus quite possible to use the drive for other purposes at this time and later resume writing with the next floppy. .Pp The parameters returned from .Ar device are used for formatting. If custom formatting is needed, please use .Xr fdformat 1 instead. .Sh EXAMPLES The .Nm utility was planned as a tool to make life easier when writing a set of floppies, one such use could be to write a tar-archive: .Pp .Dl tar cf - . | gzip -9 | fdwrite -d /dev/fd0.1720 -v .Pp The main difference from using .Xr tar 1 Ns 's multivolume facility is of course the formatting of the floppies, which here is done on the fly, thus reducing the amount of work for the floppy-jockey. .Sh SEE ALSO .Xr fdformat 1 .Sh HISTORY The .Nm utility was written while waiting for ``make world'' to complete. Some of the code was taken from .Xr fdformat 1 . .Sh AUTHORS The program has been contributed by -.An Poul-Henning Kamp Aq phk@FreeBSD.org . +.An Poul-Henning Kamp Aq Mt phk@FreeBSD.org . .Sh BUGS Diagnostics are less than complete at present. .Pp If a floppy is sick, and the .Ar inputfile is seekable, it should ask the user to frisbee the disk, insert another, and rewind to the right spot and continue. .Pp This concept could be extended to cover non-seekable input also by employing a temporary file. .Pp An option (defaulting to zero) should allow the user to ask for retries in case of failure. .Pp At present a suitable tool for reading back a multivolume set of floppies is missing. Programs like .Xr tar 1 for instance, will do the job, if the data has not been compressed. One can always trust .Xr dd 1 to help out in this situation of course. Index: head/usr.sbin/flowctl/flowctl.8 =================================================================== --- head/usr.sbin/flowctl/flowctl.8 (revision 267667) +++ head/usr.sbin/flowctl/flowctl.8 (revision 267668) @@ -1,90 +1,90 @@ .\" Copyright (c) 2004-2005 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 June 8, 2012 .Dt FLOWCTL 8 .Os .Sh NAME .Nm flowctl .Nd .Xr ng_netflow 4 control utility .Sh SYNOPSIS .Nm .Op Fl d Ar level .Ar path command .Sh DESCRIPTION The .Nm utility is intended to control the .Xr ng_netflow 4 nodes. It has a single option: .Bl -tag -width ".Fl d Ar level" .It Fl d Ar level Set the .Xr netgraph 3 debugging level to .Ar level . .El .Sh COMMANDS Currently, .Nm supports only one command. .Bl -tag -width ".Cm show" .It Cm show Oo Cm ipv4|ipv6 Oc Op Cm human|verbose This command is the analog of the .Dq "show ip cache flow" command of a Cisco router. It dumps the contents of the flow cache in Cisco-like format. Specifying either .Cm ipv4 or .Cm ipv6 would extract only IPv4 or IPv6 flows respectively. It has optional parameter .Cm verbose , which is analog of the .Dq "show ip cache verbose flow" command. Additionally, .Cm human parameter can be specify to show selected flows in human-readable format. .El .Sh EXIT STATUS .Ex -std .Sh SEE ALSO .Xr netgraph 3 , .Xr ng_netflow 4 .Sh AUTHORS .An -nosplit The .Nm utility was written by -.An Gleb Smirnoff Aq glebius@FreeBSD.org , +.An Gleb Smirnoff Aq Mt glebius@FreeBSD.org , based on .Nm ipacctctl written by -.An Roman V. Palagin Aq romanp@unshadow.net . +.An Roman V. Palagin Aq Mt romanp@unshadow.net . Index: head/usr.sbin/freebsd-update/freebsd-update.8 =================================================================== --- head/usr.sbin/freebsd-update/freebsd-update.8 (revision 267667) +++ head/usr.sbin/freebsd-update/freebsd-update.8 (revision 267668) @@ -1,177 +1,177 @@ .\"- .\" Copyright 2006, 2007 Colin Percival .\" All rights reserved .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted providing 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 July 14, 2010 .Dt FREEBSD-UPDATE 8 .Os FreeBSD .Sh NAME .Nm freebsd-update .Nd fetch and install binary updates to FreeBSD .Sh SYNOPSIS .Nm .Op Fl b Ar basedir .Op Fl d Ar workdir .Op Fl f Ar conffile .Op Fl k Ar KEY .Op Fl r Ar newrelease .Op Fl s Ar server .Op Fl t Ar address .Cm command ... .Sh DESCRIPTION The .Nm tool is used to fetch, install, and rollback binary updates to the FreeBSD base system. Note that updates are only available if they are being built for the FreeBSD release and architecture being used; in particular, the .Fx Security Team only builds updates for releases shipped in binary form by the .Fx Release Engineering Team, e.g., .Fx 7.3-RELEASE and .Fx 8.0-RELEASE, but not .Fx 6.3-STABLE or .Fx 9.0-CURRENT. .Sh OPTIONS The following options are supported: .Bl -tag -width "-f conffile" .It Fl b Ar basedir Operate on a system mounted at .Ar basedir . (default: .Pa / , or as given in the configuration file.) .It Fl d Ar workdir Store working files in .Ar workdir . (default: .Pa /var/db/freebsd-update/ , or as given in the configuration file.) .It Fl f Ar conffile Read configuration options from .Ar conffile . (default: .Pa /etc/freebsd-update.conf ) .It Fl k Ar KEY Trust an RSA key with SHA256 of .Ar KEY . (default: read value from configuration file.) .It Fl r Ar newrelease Specify the new release to which .Nm should upgrade (upgrade command only). .It Fl s Ar server Fetch files from the specified server or server pool. (default: read value from configuration file.) .It Fl t Ar address Mail output of .Cm cron command, if any, to .Ar address . (default: root, or as given in the configuration file.) .El .Sh COMMANDS The .Cm command can be any one of the following: .Bl -tag -width "-f conffile" .It Cm fetch Based on the currently installed world and the configuration options set, fetch all available binary updates. .It Cm cron Sleep a random amount of time between 1 and 3600 seconds, then download updates as if the .Cm fetch command was used. If updates are downloaded, an email will be sent (to root or a different address if specified via the .Fl t option or in the configuration file). As the name suggests, this command is designed for running from .Xr cron 8 ; the random delay serves to minimize the probability that a large number of machines will simultaneously attempt to fetch updates. .It Cm upgrade Fetch files necessary for upgrading to a new release. Before using this command, make sure that you read the announcement and release notes for the new release in case there are any special steps needed for upgrading. Note that this command may require up to 500 MB of space in .Ar workdir depending on which components of the .Fx base system are installed. .It Cm install Install the most recently fetched updates or upgrade. .It Cm rollback Uninstall the most recently installed updates. .It Cm IDS Compare the system against a "known good" index of the installed release. .El .Sh TIPS .Bl -bullet .It If your clock is set to local time, adding the line .Pp .Dl 0 3 * * * root /usr/sbin/freebsd-update cron .Pp to /etc/crontab will check for updates every night. If your clock is set to UTC, please pick a random time other than 3AM, to avoid overly imposing an uneven load on the server(s) hosting the updates. .It In spite of its name, .Nm IDS should not be relied upon as an "Intrusion Detection System", since if the system has been tampered with it cannot be trusted to operate correctly. If you intend to use this command for intrusion-detection purposes, make sure you boot from a secure disk (e.g., a CD). .El .Sh FILES .Bl -tag -width "/etc/freebsd-update.conf" .It Pa /etc/freebsd-update.conf Default location of the .Nm configuration file. .It Pa /var/db/freebsd-update/ Default location where .Nm stores temporary files and downloaded updates. .El .Sh SEE ALSO .Xr freebsd-update.conf 5 .Sh AUTHORS -.An Colin Percival Aq cperciva@FreeBSD.org +.An Colin Percival Aq Mt cperciva@FreeBSD.org Index: head/usr.sbin/fwcontrol/fwcontrol.8 =================================================================== --- head/usr.sbin/fwcontrol/fwcontrol.8 (revision 267667) +++ head/usr.sbin/fwcontrol/fwcontrol.8 (revision 267668) @@ -1,220 +1,220 @@ .\" Copyright (c) 2002 Hidetoshi Shimokawa .\" 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 September 12, 2008 .Dt FWCONTROL 8 .Os .Sh NAME .Nm fwcontrol .Nd FireWire control utility .Sh SYNOPSIS .Nm .Op Fl u Ar bus_num .Op Fl prt .Op Fl c Ar node .Op Fl d Ar node .Op Fl o Ar node .Op Fl s Ar node .Op Fl l Ar file .Op Fl f Ar node .Op Fl g Ar gap_count .Op Fl b Ar pri_req .Op Fl M Ar mode .Op Fl R Ar filename .Op Fl S Ar filename .Op Fl m Ar EUI64 | hostname .Sh DESCRIPTION The .Nm utility is designed to provide a way for users to access and control the .Fx FireWire subsystem. Without options, .Nm will output a list of devices that are/were connected to the bus. .Pp The following options are available: .Bl -tag -width indent .It Fl u Ar bus_num Specify the FireWire bus number to be operated on. The default is bus 0. .It Fl r Initiate bus reset. .It Fl t Show the topology map. .It Fl p Dump PHY registers. .It Fl c Ar node Show the configuration ROM on the node. .It Fl d Ar node Hex dump of the configuration ROM. .It Fl o Ar node Send a link-on PHY packet to the node. .It Fl s Ar node Write to the .Dv RESET_START register on the node. .It Fl l Ar file Load hex dump file of the configuration ROM and parse it. .It Fl f Ar node Force specified .Ar node to be the root node on the next bus reset by sending a PHY config packet. Valid values are 0 - 63. .It Fl g Ar gap_count Broadcast new .Ar gap_count by sending a PHY_config packet. By default this value is 63 on all nodes. Valid values are 0 - 63. .It Fl i Ar pri_req Set the .Dv PRIORITY_BUDGET register on all supported nodes. .It Fl M Ar mode Explicitly specify either .Ar dv or .Ar mpeg mode for the incoming stream. Only meaningful in case of and must precede the .Fl R option. If not specified, the program will try to guess. In case of .Dq format 0x20 error, try to force the .Dq mpeg mode. .It Fl R Ar filename Receive DV or MPEG TS stream and dump it to a file. Use ^C to stop the receiving. Some DV cameras seem not to send the stream if a bus manager exists. If it is impossible to get the stream, try the following commands: .Bd -literal -offset indent sysctl hw.firewire.try_bmr=0 fwcontrol -r .Ed .Pp The resulting file contains raw DV data excluding isochronous header and CIP header. It can be handled by .Nm libdv in the .Fx Ports Collection. Resulting MPEG TS stream can be played and sent over a network using the VideoLAN .Nm vlc tool in the .Fx Ports Collection. The stream can be piped directly to .Nm vlc, see .Sx EXAMPLES . .It Fl S Ar filename Send a DV file as isochronous stream. .It Fl m Ar EUI64 | hostname Set default fwmem target. Hostname will be converted to EUI64 using .Xr eui64 5 . .El .Sh FILES .Bl -tag -width "Pa /dev/fw0.0" .It Pa /dev/fw0.0 .El .Sh EXAMPLES Each DV frame has a fixed size and it is easy to edit the frame order. .Pp .Dl "fwcontrol -R original.dv" .Pp Receive a DV stream with DV camera attached. .Pp .Dl "dd if=original.dv of=first.dv bs=120000 count=30" .Pp Get first 30 frames(NTSC). .Pp .Dl "dd if=original.dv of=second.dv bs=120000 skip=30 count=30" .Pp Get second 30 frames(NTSC). .Pp .Dl "cat second.dv first.dv | fwcontrol -S /dev/stdin" .Pp Swap first and second 30 frames and send them to DV recorder. .Pp For PAL, replace .Dq Li bs=120000 with .Dq Li bs=144000 . .Pp .Dl "fwcontrol -R file.m2t" .Pp Receive an MPEG TS stream from a camera producing MPEG transport stream. This has been tested with SONY HDR-FX1E camera that produces HD MPEG-2 stream at 25 Mbps bandwidth. .Pp To send the stream from the camera over the network using TCP (which surprisingly works better with vlc), you can use .Dl "fwcontrol -R - | nc 192.168.10.11 9000" with .Nm netcat from ports and to receive the stream, use .Dl nc -l -p 9000 | vlc - .Pp To netcast via UDP, you need to use .Nm buffer program from ports, since vlc is not fast enough to read UDP packets from buffers and thus it experiences dropouts when run directly. The sending side can use .Dl "fwcontrol -R - | nc 192.168.10.11 9000" and to receive the stream, use .Dl nc -l -u -p 9000 | buffer -s 10k -b 1000 -m 20m -p 5 | vlc - .Pp For more information on how to work with .Nm vlc see its docs. .Sh SEE ALSO .Xr mplayer 1 , .Xr vlc 1 , .Xr firewire 4 , .Xr fwe 4 , .Xr fwip 4 , .Xr fwohci 4 , .Xr sbp 4 .Sh HISTORY The .Nm utility first appeared in .Fx 5.0 . .Sh AUTHORS -.An Hidetoshi Shimokawa Aq simokawa@FreeBSD.org -.An Petr Holub Aq hopet@ics.muni.cz -- MPEG TS mode. +.An Hidetoshi Shimokawa Aq Mt simokawa@FreeBSD.org +.An Petr Holub Aq Mt hopet@ics.muni.cz +(MPEG TS mode) .Sh BUGS This utility is still under development and provided for debugging purposes. Especially MPEG TS reception support is very rudimental and supports only high-bandwidth MPEG-2 streams (fn field in CIP header equals 3). Index: head/usr.sbin/gpioctl/gpioctl.8 =================================================================== --- head/usr.sbin/gpioctl/gpioctl.8 (revision 267667) +++ head/usr.sbin/gpioctl/gpioctl.8 (revision 267668) @@ -1,125 +1,124 @@ .\" Copyright (c) 1980, 1991, 1993 .\" The Regents of the University of California. 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. .\" 4. Neither the name of the University 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 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 November 7, 2013 .Dt GPIOCTL 1 .Os .Sh NAME .Nm gpioctl .Nd GPIO control utility .Sh SYNOPSIS .Nm .Cm -l .Op Fl f Ar ctldev .Op Fl v .Nm .Cm -t .Op Fl f Ar ctldev .Ar pin .Nm .Cm -c .Op Fl f Ar ctldev .Ar pin .Ar flag .Op flag ... .Nm .Op Cm -f Ar ctldev .Ar pin .Ar [0|1] .Sh DESCRIPTION The .Nm utility could be used to manage GPIO pins from userland and list available pins. .Pp The options are as follows: .Bl -tag -width ".Fl f Ar ctldev" .It Fl c Ar pin Ar flag Op flag ... Configure pin by setting provided flags. The following flags are currently defined: .Bl -tag -offset indent -width ".Cm PULSE" .It Cm IN Input pin .It Cm OUT Output pin .It Cm OD Open drain pin .It Cm PP Push pull pin .It Cm TS Tristate pin .It Cm PU Pull-up pin .It Cm PD Pull-down pin .It Cm II Inverted input pin .It Cm IO Inverted output pin .El .It Fl f Ar ctldev GPIO controller device to use If not specified, defaults to .Pa /dev/gpioc0 .It Fl l list available pins .It Fl t Ar pin toggle value of provided pin number .It Fl v be verbose: for each listed pin print current configuration .El .Sh EXAMPLES .Bl -bullet .It List pins available on GPIO controller defined by device /dev/gpioc0 .Pp gpioctl -f /dev/gpioc0 -l .It Set the value of pin 12 to 1 .Pp gpioctl -f /dev/gpioc0 12 1 .It Configure pin 12 to be input pin .Pp gpioctl -f /dev/gpioc0 -c 12 IN .El .Sh SEE ALSO .Xr gpio 4 .Xr gpioiic 4 .Xr gpioled 4 .Sh HISTORY The .Nm utility appeared in .Fx 9.0 . .Sh AUTHORS .An -nosplit The .Nm utility and this manual page were written by -.An Oleksandr Tymoshenko -.Aq gonzo@freebsd.org +.An Oleksandr Tymoshenko Aq Mt gonzo@freebsd.org . Index: head/usr.sbin/gssd/gssd.8 =================================================================== --- head/usr.sbin/gssd/gssd.8 (revision 267667) +++ head/usr.sbin/gssd/gssd.8 (revision 267668) @@ -1,119 +1,119 @@ .\" Copyright (c) 2008 Isilon Inc http://www.isilon.com/ .\" Authors: Doug Rabson .\" Developed with Red Inc: Alfred Perlstein .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" .\" $FreeBSD$ .\" .Dd July 7, 2013 .Dt GSSD 8 .Os .Sh NAME .Nm gssd .Nd "Generic Security Services Daemon" .Sh SYNOPSIS .Nm .Op Fl d .Op Fl h .Op Fl o .Op Fl v .Op Fl s Ar dir-list .Op Fl c Ar file-substring .Op Fl r Ar preferred-realm .Sh DESCRIPTION The .Nm program provides support for the kernel GSS-API implementation. .Pp The options are as follows: .Bl -tag -width indent .It Fl d Run in debug mode. In this mode, .Nm will not fork when it starts. .It Fl h Enable support for host-based initiator credentials. This permits a kerberized NFS mount to use a service principal in the default Kerberos 5 keytab file for access. Such access is enabled via the gssname option for the .Xr mount_nfs 8 command. .It Fl o Force use of DES and the associated old style GSS-API initialization token. This may be required to make kerberized NFS mounts work against some non-FreeBSD NFS servers. .It Fl v Run in verbose mode. In this mode, .Nm will log activity messages to syslog using LOG_INFO | LOG_DAEMON or to stderr, if the .Fl d option has also been specified. The minor status is logged as a decimal number, since it is actually a Kerberos return status, which is signed. .It Fl s Ar dir-list Look for an appropriate credential cache file in this list of directories. The list should be full pathnames from root, separated by ':' characters. Usually this list will simply be "/tmp". Without this option, .Nm assumes that the credential cache file is called /tmp/krb5cc_, where is the effective uid for the RPC caller. .It Fl c Ar file-substring Set a file-substring for the credential cache file names. Only files with this substring embedded in their names will be selected as candidates when .Fl s has been specified. If not specified, it defaults to "krb5cc_". .It Fl r Ar preferred-realm Use Kerberos credentials for this realm when searching for credentials in directories specified with .Fl s . If not specified, the default Kerberos realm will be used. .El .Sh FILES .Bl -tag -width ".Pa /etc/krb5.keytab" -compact .It Pa /etc/krb5.keytab Contains Kerberos service principals which may be used as credentials by kernel GSS-API services. .El .Sh EXIT STATUS .Ex -std .Sh SEE ALSO .Xr gssapi 3 , .Xr mount_nfs 8 , .Xr syslog 3 .Sh HISTORY The .Nm manual page first appeared in .Fx 8.0 . .Sh AUTHORS This manual page was written by -.An Doug Rabson Aq dfr@FreeBSD.org . +.An Doug Rabson Aq Mt dfr@FreeBSD.org . Index: head/usr.sbin/i2c/i2c.8 =================================================================== --- head/usr.sbin/i2c/i2c.8 (revision 267667) +++ head/usr.sbin/i2c/i2c.8 (revision 267668) @@ -1,166 +1,164 @@ .\" .\" Copyright (C) 2008-2009 Semihalf, Michal Hajduk and Bartlomiej Sieka .\" 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 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 January 23, 2009 .Dt I2C 8 .Os .Sh NAME .Nm i2c .Nd test I2C bus and slave devices .Sh SYNOPSIS .Nm .Cm -a Ar address .Op Fl f Ar device .Op Fl d Ar r|w .Op Fl w Ar 0|8|16 .Op Fl o Ar offset .Op Fl c Ar count .Op Fl m Ar ss|rs|no .Op Fl b .Op Fl v .Nm .Cm -s .Op Fl f Ar device .Op Fl n Ar skip_addr .Op Fl v .Nm .Cm -r .Op Fl f Ar device .Op Fl v .Sh DESCRIPTION The .Nm utility can be used to perform raw data transfers (read or write) with devices on the I2C bus. It can also scan the bus for available devices and reset the I2C controller. .Pp The options are as follows: .Bl -tag -width ".Fl d Ar direction" .It Fl a Ar address 7-bit address on the I2C device to operate on (hex). .It Fl b binary mode - when performing a read operation, the data read from the device is output in binary format on stdout; when doing a write, the binary data to be written to the device is read from stdin. .It Fl c Ar count number of bytes to transfer (dec). .It Fl d Ar r|w transfer direction: r - read, w - write. .It Fl f Ar device I2C bus to use (default is /dev/iic0). .It Fl m Ar ss|rs|no addressing mode, i.e., I2C bus operations performed after the offset for the transfer has been written to the device and before the actual read/write operation. rs - repeated start; ss - stop start; no - none. .It Fl n Ar skip_addr skip address - address(es) to be skipped during bus scan. There are two ways to specify addresses to ignore: by range 'a..b' or using selected addresses 'a:b:c'. This option is available only when "-s" is used. .It Fl o Ar offset offset within the device for data transfer (hex). .It Fl r reset the controller. .It Fl s scan the bus for devices. .It Fl v be verbose. .It Fl w Ar 0|8|16 device addressing width (in bits). .El .Sh WARNINGS Great care must be taken when manipulating slave I2C devices with the .Nm utility. Often times important configuration data for the system is kept in non-volatile but write enabled memories located on the I2C bus, for example Ethernet hardware addresses, RAM module parameters (SPD), processor reset configuration word etc. .Pp It is very easy to render the whole system unusable when such configuration data is deleted or altered, so use the .Dq -d w (write) command only if you know exactly what you are doing. .Pp Also avoid ungraceful interrupting of an ongoing transaction on the I2C bus, as it can lead to potentially dangerous effects. Consider the following scenario: when the host CPU is reset (for whatever reason) in the middle of a started I2C transaction, the I2C slave device could be left in write mode waiting for data or offset to arrive. When the CPU reinitializes itself and talks to this I2C slave device again, the commands and other control info it sends are treated by the slave device as data or offset it was waiting for, and there's great potential for corruption if such a write is performed. .Sh EXAMPLES .Bl -bullet .It Scan the default bus (/dev/iic0) for devices: .Pp i2c -s .It Scan the default bus (/dev/iic0) for devices and skip addresses 0x56 and 0x45. .Pp i2c -s -n 0x56:0x45 .It Scan the default bus (/dev/iic0) for devices and skip address range 0x34 to 0x56. .Pp i2c -s -n 0x34..0x56 .It Read 8 bytes of data from device at address 0x56 (e.g., an EEPROM): .Pp i2c -a 0x56 -d r -c 8 .It Write 16 bytes of data from file data.bin to device 0x56 at offset 0x10: .Pp i2c -a 0x56 -d w -c 16 -o 0x10 -b < data.bin .It Copy 4 bytes between two EEPROMs (0x56 on /dev/iic1 to 0x57 on /dev/iic0): .Pp i2c -a 0x56 -f /dev/iic1 -d r -c 0x4 -b | i2c -a 0x57 -f /dev/iic0 -d w -c 4 -b .It Reset the controller: .Pp i2c -f /dev/iic1 -r .El .Sh SEE ALSO .Xr iic 4 , .Xr iicbus 4 .Sh HISTORY The .Nm utility appeared in .Fx 8.0 . .Sh AUTHORS .An -nosplit The .Nm utility and this manual page were written by -.An Bartlomiej Sieka -.Aq tur@semihalf.com +.An Bartlomiej Sieka Aq Mt tur@semihalf.com and -.An Michal Hajduk -.Aq mih@semihalf.com . +.An Michal Hajduk Aq Mt mih@semihalf.com . Index: head/usr.sbin/iostat/iostat.8 =================================================================== --- head/usr.sbin/iostat/iostat.8 (revision 267667) +++ head/usr.sbin/iostat/iostat.8 (revision 267668) @@ -1,515 +1,515 @@ .\" .\" Copyright (c) 1997 Kenneth D. Merry. .\" 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. The name of the author may not be used to endorse or promote products .\" derived from this software without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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$ .\" .\" Copyright (c) 1985, 1991, 1993 .\" The Regents of the University of California. 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. .\" 4. Neither the name of the University 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 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. .\" .\" @(#)iostat.8 8.1 (Berkeley) 6/6/93 .\" .Dd December 15, 2012 .Dt IOSTAT 8 .Os .Sh NAME .Nm iostat .Nd report .Tn I/O statistics .Sh SYNOPSIS .Nm .Op Fl CdhIKoTxz?\& .Op Fl c Ar count .Op Fl M Ar core .Op Fl n Ar devs .Op Fl N Ar system .Oo .Fl t .Sm off .Ar type , if , pass .Sm on .Oc .Op Fl w Ar wait .Op Ar drives .Sh DESCRIPTION The .Nm utility displays kernel .Tn I/O statistics on terminal, device and cpu operations. The first statistics that are printed are averaged over the system uptime. To get information about the current activity, a suitable wait time should be specified, so that the subsequent sets of printed statistics will be averaged over that time. .Pp The options are as follows: .Bl -tag -width flag .It Fl c Repeat the display .Ar count times. If no repeat .Ar count is specified, the default depends on whether .Fl w is specified. With .Fl w the default repeat count is infinity, otherwise it is 1. .It Fl C Display CPU statistics. This is on by default, unless .Fl d or .Fl x is specified. .It Fl d Display only device statistics. If this flag is turned on, only device statistics will be displayed, unless .Fl C or .Fl T is also specified to enable the display of CPU or TTY statistics. .It Fl h Put .Nm in .Sq top mode. In this mode, .Nm will show devices in order from highest to lowest bytes per measurement cycle. .It Fl I Display total statistics for a given time period, rather than average statistics for each second during that time period. .It Fl K In the blocks transferred display (-o), display block count in kilobytes rather then the device native block size. .It Fl M Extract values associated with the name list from the specified core instead of the default .Dq Pa /dev/kmem . .It Fl n Display up to .Ar devs number of devices. The .Nm utility will display fewer devices if there are not .Ar devs devices present. .It Fl N Extract the name list from the specified system instead of the default .Dq Pa /boot/kernel/kernel . .It Fl o Display old-style .Nm device statistics. Sectors per second, transfers per second, and milliseconds per seek are displayed. If .Fl I is specified, total blocks/sectors, total transfers, and milliseconds per seek are displayed. .It Fl t Specify which types of devices to display. There are three different categories of devices: .Pp .Bl -tag -width indent -compact .It device type: .Bl -tag -width 9n -compact .It da Direct Access devices .It sa Sequential Access devices .It printer Printers .It proc Processor devices .It worm Write Once Read Multiple devices .It cd CD devices .It scanner Scanner devices .It optical Optical Memory devices .It changer Medium Changer devices .It comm Communication devices .It array Storage Array devices .It enclosure Enclosure Services devices .It floppy Floppy devices .El .Pp .It interface: .Bl -tag -width 9n -compact .It IDE Integrated Drive Electronics devices .It SCSI Small Computer System Interface devices .It other Any other device interface .El .Pp .It passthrough: .Bl -tag -width 9n -compact .It pass Passthrough devices .El .El .Pp The user must specify at least one device type, and may specify at most one device type from each category. Multiple device types in a single device type statement must be separated by commas. .Pp Any number of .Fl t arguments may be specified on the command line. All .Fl t arguments are ORed together to form a matching expression against which all devices in the system are compared. Any device that fully matches any .Fl t argument will be included in the .Nm output, up to the number of devices that can be displayed in 80 columns, or the maximum number of devices specified by the user. .It Fl T Display TTY statistics. This is on by default, unless .Fl d or .Fl x is specified. .It Fl w Pause .Ar wait seconds between each display. If no .Ar wait interval is specified, the default is 1 second. .Pp The .Nm command will accept and honor a non-integer number of seconds. Note that the interval only has millisecond granularity. Finer values will be truncated. E.g., .Dq Li -w1.0001 is the same as .Dq Li -w1.000 . The interval will also suffer from modifications to .Va kern.hz so your mileage may vary. .It Fl x Show extended disk statistics. Each disk is displayed on a line of its own with all available statistics. If this flag is turned on, only disk statistics will be displayed, unless .Fl C or .Fl T is also specified to enable the display of CPU or TTY statistics. .It Fl z If .Fl x is specified, omit lines for devices with no activity. .It Fl ?\& Display a usage statement and exit. .El .Pp The .Nm utility displays its information in the following format: .Bl -tag -width flag .It tty .Bl -tag -width indent -compact .It tin characters read from terminals .It tout characters written to terminals .El .It devices Device operations. The header of the field is the device name and unit number. The .Nm utility will display as many devices as will fit in a standard 80 column screen, or the maximum number of devices in the system, whichever is smaller. If .Fl n is specified on the command line, .Nm will display the smaller of the requested number of devices, and the maximum number of devices in the system. To force .Nm to display specific drives, their names may be supplied on the command line. The .Nm utility will not display more devices than will fit in an 80 column screen, unless the .Fl n argument is given on the command line to specify a maximum number of devices to display. If fewer devices are specified on the command line than will fit in an 80 column screen, .Nm will show only the specified devices. .Pp The standard .Nm device display shows the following statistics: .Pp .Bl -tag -width indent -compact .It KB/t kilobytes per transfer .It tps transfers per second .It MB/s megabytes per second .El .Pp The standard .Nm device display, with the .Fl I flag specified, shows the following statistics: .Pp .Bl -tag -width indent -compact .It KB/t kilobytes per transfer .It xfrs total number of transfers .It MB total number of megabytes transferred .El .Pp The extended .Nm device display, with the .Fl x flag specified, shows the following statistics: .Pp .Bl -tag -width indent -compact .It r/s read operations per second .It w/s write operations per second .It kr/s kilobytes read per second .It kw/s kilobytes write per second .It qlen transactions queue length .It svc_t average duration of transactions, in milliseconds .It %b % of time the device had one or more outstanding transactions .El .Pp The extended .Nm device display, with the .Fl x and .Fl I flags specified, shows the following statistics: .Pp .Bl -tag -width indent -compact .It r/i read operations per time period .It w/i write operations per time period .It kr/i kilobytes read per time period .It kw/i kilobytes write per time period .It qlen transactions queue length .It tsvc_t/i total duration of transactions per time period, in seconds .It sb/i total time the device had one or more outstanding transactions per time period, in seconds .El .Pp The old-style .Nm display (using .Fl o ) shows the following statistics: .Pp .Bl -tag -width indent -compact .It sps sectors transferred per second .It tps transfers per second .It msps average milliseconds per transaction .El .Pp The old-style .Nm display, with the .Fl I flag specified, shows the following statistics: .Pp .Bl -tag -width indent -compact .It blk total blocks/sectors transferred .It xfr total transfers .It msps average milliseconds per transaction .El .It cpu .Bl -tag -width indent -compact .It \&us % of cpu time in user mode .It \&ni % of cpu time in user mode running niced processes .It \&sy % of cpu time in system mode .It \&in % of cpu time in interrupt mode .It \&id % of cpu time in idle mode .El .El .Sh FILES .Bl -tag -width /boot/kernel/kernel -compact .It Pa /boot/kernel/kernel Default kernel namelist. .It Pa /dev/kmem Default memory file. .El .Sh EXAMPLES .Dl iostat -w 1 da0 da1 cd0 .Pp Display statistics for the first two Direct Access devices and the first CDROM device every second ad infinitum. .Pp .Dl iostat -c 2 .Pp Display the statistics for the first four devices in the system twice, with a one second display interval. .Pp .Dl iostat -t da -t cd -w 1 .Pp Display statistics for all CDROM and Direct Access devices every second ad infinitum. .Pp .Dl iostat -t da,scsi,pass -t cd,scsi,pass .Pp Display statistics once for all SCSI passthrough devices that provide access to either Direct Access or CDROM devices. .Pp .Dl iostat -h -n 8 -w 1 .Pp Display up to 8 devices with the most I/O every second ad infinitum. .Pp .Dl iostat -dh -t da -w 1 .Pp Omit the TTY and CPU displays, show devices in order of performance and show only Direct Access devices every second ad infinitum. .Pp .Dl iostat -Iw 3 .Pp Display total statistics every three seconds ad infinitum. .Pp .Dl iostat -odICTw 2 -c 9 .Pp Display total statistics using the old-style output format 9 times, with a two second interval between each measurement/display. The .Fl d flag generally disables the TTY and CPU displays, but since the .Fl T and .Fl C flags are given, the TTY and CPU displays will be displayed. .Sh SEE ALSO .Xr fstat 1 , .Xr netstat 1 , .Xr nfsstat 1 , .Xr ps 1 , .Xr systat 1 , .Xr devstat 3 , .Xr gstat 8 , .Xr pstat 8 , .Xr vmstat 8 .Pp The sections starting with ``Interpreting system activity'' in .%T "Installing and Operating 4.3BSD" . .Sh HISTORY This version of .Nm first appeared in .Fx 3.0 . .Sh AUTHORS -.An Kenneth Merry Aq ken@FreeBSD.org +.An Kenneth Merry Aq Mt ken@FreeBSD.org .Sh BUGS The use of .Nm as a debugging tool for crash dumps is probably limited because there is currently no way to get statistics that only cover the time immediately before the crash. Index: head/usr.sbin/ipfwpcap/ipfwpcap.8 =================================================================== --- head/usr.sbin/ipfwpcap/ipfwpcap.8 (revision 267667) +++ head/usr.sbin/ipfwpcap/ipfwpcap.8 (revision 267668) @@ -1,132 +1,132 @@ .\" Copyright (c) 2006 Niclas Zeising .\" 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 22, 2006 .Dt IPFWPCAP 8 .Os .Sh NAME .Nm ipfwpcap .Nd "copy diverted packets to a file in tcpdump format" .Sh SYNOPSIS .Nm .Op Fl dr .Op Fl b Ar maxbytes .Op Fl p Ar maxpkts .Op Fl P Ar pidfile .Ar portnum .Ar dumpfile .Sh DESCRIPTION The .Nm utility is used to copy diverted packets to a file in .Xr tcpdump 1 format. The interesting packets are diverted by .Xr ipfw 8 to a port on which .Nm listens. The packets are then dropped unless .Fl r is used. .Pp The options are as follows: .Bl -tag -width indent .It Fl d Turns on extra debugging messages. .It Fl r Writes packets back to the .Xr divert 4 socket. .It Fl rr Indicates that it is okay to quit if .Ar maxbytes or .Ar maxpkts are reached. Diverted packets will silently disappear if nothing is listening on the .Xr divert 4 socket. .It Fl b Ar maxbytes Stop dumping after .Ar maxbytes bytes. .It Fl p Ar maxpkts Stop dumping after .Ar maxpkt packets. .It Fl P Ar pidfile File to store PID number in. Default is .Pa /var/run/ipwfpcap.portnr.pid . .El .Pp The .Ar portnum argument specifies which .Xr divert 4 socket port to listen on. The .Ar dumpfile argument is the path to the file to write captured packets to. Specify .Sq Fl to write to stdout. .Sh EXIT STATUS .Ex -std .Sh EXAMPLES .Dl "ipfwpcap -r 8091 divt.log &" .Pp Starts .Nm as a background job listening to port 8091 and reflecting the packets back to the socket. .Pp .Dl "ipfw add 2864 divert 8091 ip from 192.0.2.101" .Pp Example .Xr ipfw 8 rule to divert all packets from 192.0.2.101 to port 8091. See .Xr ipfw 8 for details. .Sh SEE ALSO .Xr tcpdump 1 , .Xr pcap 3 , .Xr divert 4 , .Xr ipfw 8 .Sh HISTORY The .Nm utility first appeared in .Fx 7.0 . .Sh AUTHORS .An -nosplit .Nm was written by -.An P. Kern Aq pkern@cns.utoronto.ca . +.An P. Kern Aq Mt pkern@cns.utoronto.ca . This manual page was written by -.An Niclas Zeising Aq zeising@FreeBSD.org . +.An Niclas Zeising Aq Mt zeising@FreeBSD.org . Index: head/usr.sbin/iscsid/iscsid.8 =================================================================== --- head/usr.sbin/iscsid/iscsid.8 (revision 267667) +++ head/usr.sbin/iscsid/iscsid.8 (revision 267668) @@ -1,113 +1,113 @@ .\" Copyright (c) 2012 The FreeBSD Foundation .\" All rights reserved. .\" .\" This software was developed by Edward Tomasz Napierala under sponsorship .\" from the FreeBSD Foundation. .\" .\" 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 AUTHORS 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 AUTHORS 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 September 20, 2012 .Dt ISCSID 8 .Os .Sh NAME .Nm iscsid .Nd iSCSI initiator daemon .Sh SYNOPSIS .Nm .Op Fl P Ar pidfile .Op Fl d .Op Fl l Ar loglevel .Op Fl m Ar maxproc .Op Fl t Ar seconds .Sh DESCRIPTION The .Nm daemon is responsible for performing the Login Phase of iSCSI connections, as well as performing SendTargets discovery. .Pp Upon startup, the .Nm daemon opens the iSCSI initiator device file and waits for kernel requests. It doesn't use any configuration file; all the information it needs it gets from the kernel. .Pp When the .Nm damon is not running, already established iSCSI connections continue to work. However, establishing new connections, or recovering existing ones in case of connection error, is not possible. .Pp The following options are available: .Bl -tag -width ".Fl P Ar pidfile" .It Fl P Ar pidfile Specify alternative location of a file where main process PID will be stored. The default location is .Pa /var/run/iscsid.pid . .It Fl d Debug mode. The server sends verbose debug output to standard error, and does not put itself in the background. The server will also not fork and will exit after processing one connection. This option is only intended for debugging the initiator. .It Fl l Ar loglevel Specifies debug level. The default is 0. .It Fl m Ar maxproc Specifies limit for concurrently running child processes handling connections. The default is 30. Setting it to 0 disables the limit. .It Fl t Ar seconds Specifies timeout for login session, after which the connection will be forcibly terminated. The default is 60. Setting it to 0 disables the timeout. .El .Sh FILES .Bl -tag -width ".Pa /var/run/iscsid.pid" -compact .It Pa /dev/iscsi The iSCSI initiator device file. .It Pa /var/run/iscsid.pid The default location of the .Nm PID file. .El .Sh EXIT STATUS The .Nm utility exits 0 on success, and >0 if an error occurs. .Sh SEE ALSO .Xr iscsictl 8 .Sh HISTORY The .Nm command appeared in .Fx 10.0 . .Sh AUTHORS The .Nm was developed by -.An Edward Tomasz Napierala Aq trasz@FreeBSD.org +.An Edward Tomasz Napierala Aq Mt trasz@FreeBSD.org under sponsorship from the FreeBSD Foundation. Index: head/usr.sbin/kbdcontrol/kbdcontrol.1 =================================================================== --- head/usr.sbin/kbdcontrol/kbdcontrol.1 (revision 267667) +++ head/usr.sbin/kbdcontrol/kbdcontrol.1 (revision 267668) @@ -1,276 +1,276 @@ .\" .\" kbdcontrol - a utility for manipulating the syscons keyboard driver section .\" .\" 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. .\" .\" @(#)kbdcontrol.1 .\" $FreeBSD$ .\" .Dd January 29, 2008 .Dt KBDCONTROL 1 .Os .Sh NAME .Nm kbdcontrol .Nd keyboard control and configuration utility .Sh SYNOPSIS .Nm .Op Fl dFKix .Op Fl A Ar name .Op Fl a Ar name .Oo .Fl b .Ar duration . Ns Ar pitch | Ar belltype .Oc .Oo .Fl r .Ar delay . Ns Ar repeat | Ar speed .Oc .Op Fl l Ar keymap_file .Op Fl f Ar # Ar string .Op Fl k Ar keyboard_device .Op Fl L Ar keymap_file .Sh DESCRIPTION The .Nm command is used to set various keyboard related options for the .Xr syscons 4 console driver and the keyboard drivers, such as key map, keyboard repeat and delay rates, bell characteristics etc. .Pp Keyboard options may be automatically configured at system boot time by setting variables in .Pa /etc/rc.conf . See .Sx Boot Time Configuration below. .Pp The following command line options are supported: .Bl -tag -width indent .It Fl A Ar name Detach the keyboard, specified by the keyboard device name, from the keyboard multiplexer. When using this option, the standard input of the .Nm process should be redirected from the keyboard multiplexer keyboard device (if the keyboard multiplexer is not the active keyboard) or .Pa /dev/console (if the keyboard multiplexer is the active keyboard and you are not working on the system console). .It Fl a Ar name Attach the keyboard, specified by the keyboard device name, to the keyboard multiplexer. When using this option, the standard input of the .Nm process should be redirected from the keyboard multiplexer keyboard device (if the keyboard multiplexer is not the active keyboard) or .Pa /dev/console (if the keyboard multiplexer is the active keyboard and you are not working on the system console). .It Fl b Xo .Ar duration . Ns Ar pitch | Ar belltype .Xc Set the bell duration in milliseconds and pitch in hertz. If a .Ar belltype argument is specified, it may be one of .Cm normal which sets sound parameters back to normal values, .Cm off which disables the bell entirely, or .Cm visual which sets the bell to visual mode, i.e., flashes the screen instead. If .Ar belltype is preceded by the word .Cm quiet. , the bell will not be rung when the ringing process is in the background vty. The .Cm visual bell, when chosen, applies to all vtys; other bell types can be set individually for each vty. .It Fl r Xo .Ar delay . Ns Ar repeat | Ar speed .Xc Set keyboard .Ar delay (250, 500, 750, 1000) and .Ar repeat (34, 38, 42, 46, 50, 55, 59, 63, 68, 76, 84, 92, 100, 110, 118, 126, 136, 152, 168, 184, 200, 220, 236, 252, 272, 304, 336, 368, 400, 440, 472, 504) rates, or if a .Ar speed argument is specified, it may be one of .Cm slow (1000.504), .Cm fast (250.34) or .Cm normal (500.126). .It Fl l Ar keymap_file Install keyboard map file from .Ar keymap_file . You may load the keyboard map file from a menu-driven command, .Xr kbdmap 1 . The format of keyboard map files is documented in the .Xr kbdmap 5 manual page. .It Fl d Dump the current keyboard map onto stdout. The output may be redirected to a file and can be loaded back to the kernel later by the .Fl l option above. .It Fl f Ar # Ar string Set function key number .Ar # to send .Ar string . Refer to the man page for the keyboard driver (e.g.\& .Xr atkbd 4 ) for available function keys and their numbers. .It Fl F Set function keys back to the standard definitions. .It Fl x Use hexadecimal numbers in keyboard map dump. .It Fl i Print brief information about the keyboard. .It Fl K Disconnect the keyboard from the console. You need to use the .Fl k option below to associate a keyboard with the console again. .It Fl k Ar keyboard_device Use the specified device as the console keyboard. When using this option, the standard input of the .Nm process should be redirected from .Pa /dev/console if you are not working on the system console (see the .Sx EXAMPLES section). .It Fl L Ar keymap_file Load keyboard map file from .Ar keymap_file and write the .Ft "struct keymap" compiled from it to stdout. This option is primarily intended for programmers and is probably of little use under normal circumstances. .El .Sh ENVIRONMENT The environment variable .Ev KEYMAP_PATH can hold an alternative path to the keyboard map files. .Sh KEYBOARD CONFIGURATION .Ss Boot Time Configuration You may set variables in .Pa /etc/rc.conf or .Pa /etc/rc.conf.local in order to configure the keyboard at boot time. The following is the list of relevant variables. .Pp .Bl -tag -width foo_bar_var -compact .It Ar keymap Specifies a keyboard map file for the .Fl l option. .It Ar keyrate Sets the keyboard repeat rate for the .Fl r option. .It Ar keychange Lists function key strings for the .Fl f option. .El .Pp See .Xr rc.conf 5 for details. .Ss Driver Configuration The keyboard device driver may let you change default configuration options, such as the default keyboard map, so that you do not need to set up the options at boot time. See keyboard driver manuals (e.g.\& .Xr atkbd 4 , .Xr ukbd 4 ) for details. .Sh FILES .Bl -tag -width /usr/share/syscons/keymaps/foo_bar -compact .It Pa /usr/share/syscons/keymaps/* keyboard map files .El .Sh EXAMPLES The following command will load the keyboard map file .Pa /usr/share/syscons/keymaps/ru.koi8-r.kbd . .Pp .Dl kbdcontrol -l /usr/share/syscons/keymaps/ru.koi8-r.kbd .Pp So long as the keyboard map file resides in .Pa /usr/share/syscons/keymaps , you may abbreviate the file name as .Pa ru.koi8-r . .Pp .Dl kbdcontrol -l ru.koi8-r .Pp The following command will make the function key 10 emit "telnet myhost". .Pp .Dl kbdcontrol -f 10 \&"telnet myhost\&" .Pp In order to get the visual effect for bell, but prevent the screen from flashing if the bell is to ring in the background screen, run the following command. .Pp .Dl kbdcontrol -b quiet.visual .Pp To change the default console keyboard to another keyboard, for example the first USB keyboard (see .Xr ukbd 4 ) , use the following command. .Pp .Dl kbdcontrol -k /dev/ukbd0 < /dev/console .Pp To switch back to the default keyboard, use this command. .Pp .Dl kbdcontrol -k /dev/kbd0 .Pp To allow using both the second USB keyboard and the first AT keyboard at the same time on console via the .Xr kbdmux 4 driver, use the following sequence of commands. .Bd -literal -offset indent kbdcontrol -K < /dev/console kbdcontrol -a atkbd0 < /dev/kbdmux0 kbdcontrol -a ukbd1 < /dev/kbdmux0 kbdcontrol -k /dev/kbdmux0 < /dev/console .Ed .Sh SEE ALSO .Xr kbdmap 1 , .Xr vidcontrol 1 , .Xr atkbd 4 , .Xr kbdmux 4 , .Xr keyboard 4 , .Xr screen 4 , .Xr syscons 4 , .Xr ukbd 4 , .Xr kbdmap 5 , .Xr rc.conf 5 .Sh AUTHORS -.An S\(/oren Schmidt Aq sos@FreeBSD.org +.An S\(/oren Schmidt Aq Mt sos@FreeBSD.org .Sh BUGS Report when found. Index: head/usr.sbin/kbdmap/kbdmap.1 =================================================================== --- head/usr.sbin/kbdmap/kbdmap.1 (revision 267667) +++ head/usr.sbin/kbdmap/kbdmap.1 (revision 267668) @@ -1,153 +1,151 @@ .\" Copyright (c) March 1995 Wolfram Schneider . Berlin. .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" .\" $FreeBSD$ .Dd July 3, 2002 .Dt KBDMAP 1 .Os .Sh NAME .Nm kbdmap , .Nm vidfont .Nd front end for syscons .Sh SYNOPSIS .Nm .Op Fl K .Op Fl V .Op Fl d | default .Op Fl h | help .Op Fl l | lang Ar language .Op Fl p | print .Op Fl r | restore .Op Fl s | show .Op Fl v | verbose .Sh DESCRIPTION The .Nm utility allows easy setting of available keymaps. The .Nm vidfont command allows the setting of fonts. Both examine a database for the keymaps and fonts. Descriptions are in English by default, but may also be in other languages. These programs are interactive and expect to run in a terminal to get required input (e.g., a keymap selection) from the user. .Pp It is strongly recommended to not choose .Tn MSDOS codepage keymaps or fonts. Use the .Tn ISO standard version if available! .Tn X11 does not support .Tn MSDOS codepage. .Pp The following options are available: .Bl -tag -width indent .It Fl K Run as command .Nm . .It Fl V Run as command .Nm vidfont . .It Fl d , default Use default language. Ignore .Ev LANG environment variable. .It Fl h , help Print options and exit. .It Fl l , lang Ar language Use .Ar language for description and menu. .It Fl p , print Print description of available keymaps or fonts to stdout and exit. .It Fl r , restore Load default font from .Pa /etc/rc.conf . .It Fl s , show Show currently supported languages and exit. .It Fl v , verbose More warnings. .El .Sh ENVIRONMENT .Bl -tag -width LANG -compact .It Ev LANG preferred language .El .Sh FILES .Bl -tag -width ".Pa /usr/share/syscons/keymaps/INDEX.keymaps" -compact .It Pa /usr/share/syscons/keymaps/INDEX.keymaps database for keymaps .It Pa /usr/share/syscons/fonts/INDEX.fonts database for fonts .It Pa /etc/rc.conf default font .It Pa /usr/local/share/locale/locale.alias describe common .Ev LANG values .El .Sh SEE ALSO .Xr dialog 1 , .Xr kbdcontrol 1 , .Xr vidcontrol 1 , .Xr kbdmap 5 , .Xr rc.conf 5 .Sh HISTORY The .Nm and .Nm vidfont commands appeared in .Fx 2.1 . .Sh AUTHORS .An -nosplit -.An Wolfram Schneider -.Aq wosch@FreeBSD.org +.An Wolfram Schneider Aq Mt wosch@FreeBSD.org wrote the original Perl version. The current version was rewritten in C by -.An Jonathan Belson -.Aq jon@witchspace.com +.An Jonathan Belson Aq Mt jon@witchspace.com for .Fx 5.0 . .Sh BUGS .\" .Nm kbdmap/vidfont .\" does not know which font is in use. E.g. if the current font .\" is iso-8859-1 and you chose lang 'ru' (for Russian) .\" you get funny latin1 characters and not russkij shrift. .\" The .Nm and .Nm vidfont utilities work only on a (virtual) console and not with .Tn X11 . Index: head/usr.sbin/kgzip/kgzip.8 =================================================================== --- head/usr.sbin/kgzip/kgzip.8 (revision 267667) +++ head/usr.sbin/kgzip/kgzip.8 (revision 267668) @@ -1,143 +1,143 @@ .\" Copyright (c) 1999 Global Technology Associates, Inc. .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, .\" OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT .\" OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR .\" BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, .\" WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE .\" OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, .\" EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" .\" $FreeBSD$ .\" .Dd July 19, 1999 .Dt KGZIP 8 .Os .Sh NAME .Nm kgzip .Nd compress a kernel .Sh SYNOPSIS .Nm .Op Fl cv .Op Fl f Ar format .Op Fl l Ar loader .Op Fl o Ar output .Ar file .Sh DESCRIPTION The .Nm utility compresses a kernel or some other bootable binary. Operation is in two phases as follows: .Bl -enum .It A load image of the executable file is built which omits all but the .Sq text and .Sq data segments. This image is compressed using .Xr gzip 1 and output as data in relocatable object format. .It The object file is linked with a special self-hosting loader, producing an executable suitable for booting with either the second- or third-level bootstraps. .El .Pp Supported object formats are 32-bit ELF and a.out ZMAGIC. .Pp If the .Ar file operand has a .Sq .o suffix, input is assumed to be for the link phase, and the first phase is omitted. .Pp The options are: .Bl -tag -width Fl .It Fl c Omit the link phase. .It Fl v Display object file information. .It Fl f Ar format Use .Ar format as the output format, where .Ar format is .Sq aout or .Sq elf . The default format is ELF. .It Fl l Ar loader Link .Ar loader as the loader. .It Fl o Ar output Name the output file .Ar output . The default is to use the input name with the suffix .Sq .o (for relocatables) or .Sq .kgz (for executables). .El .Sh NOTES Global variables equivalent to the following are defined in the output: .Bd -literal struct kgz_hdr { char ident[4]; /* identification: "KGZ" */ uint32_t dload; /* decoded image load address */ uint32_t dsize; /* decoded image size */ uint32_t isize; /* image size in memory */ uint32_t entry; /* entry point */ uint32_t nsize; /* encoded image size */ } kgz; uint8_t kgz_ndata[]; /* encoded data */ .Ed .Pp The encoded data is simply .Xr gzip 1 output: a header (with no optional fields); compressed data; and 32-bit CRC and size values. .Sh FILES .Bl -tag -width /usr/lib/kgzldr.o -compact .It Pa /usr/lib/kgzldr.o The default loader .El .Sh EXIT STATUS .Ex -std .Sh SEE ALSO .Xr gzip 1 , .Xr ld 1 , .Xr a.out 5 , .Xr elf 5 , .Xr boot 8 , .Xr loader 8 .Sh AUTHORS -.An Robert Nordier Aq rnordier@FreeBSD.org . +.An Robert Nordier Aq Mt rnordier@FreeBSD.org .Sh BUGS As symbols are lost, the usefulness of this utility for compressing kernels is limited to situations where .Xr loader 8 cannot be used; otherwise the preferred method of compressing a kernel is simply to .Xr gzip 1 it. Index: head/usr.sbin/kldxref/kldxref.8 =================================================================== --- head/usr.sbin/kldxref/kldxref.8 (revision 267667) +++ head/usr.sbin/kldxref/kldxref.8 (revision 267668) @@ -1,95 +1,95 @@ .\"- .\" Copyright (c) 2001 Boris Popov .\" Copyright (c) 2001 Dag-Erling Coïdan Smørgrav .\" 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 October 9, 2001 .Dt KLDXREF 8 .Os .Sh NAME .Nm kldxref .Nd generate hints for the kernel loader .Sh SYNOPSIS .Nm .Op Fl Rdv .Op Fl f Ar hintsfile .Ar path ... .Sh DESCRIPTION The .Nm utility is used to generate hint files which list modules, their version numbers, and the files that contain them. These hints are used by the kernel loader to determine where to find a particular KLD module. .Pp A separate hint file is generated for each directory listed on the command line that contains modules. If no hint records are generated for a particular directory, no hint file is created, and the preexisting hint file (if there was one in that directory) is removed. .Pp The following options are available: .Bl -tag -width indent .It Fl R Recurse into subdirectories. .It Fl d Do not generate a hint file, but print module metadata on standard output. .It Fl f Ar hintsfile Specify a different name for the hints files than .Pa linker.hints . .It Fl v Operate in verbose mode. .El .Sh EXAMPLES To build hint files for both standard and add-on modules: .Pp .Dl "kldxref /boot/kernel /boot/modules" .Pp To build hint files for all installed kernels: .Pp .Dl "kldxref -R /boot" .Sh SEE ALSO .Xr kld 4 , .Xr kldconfig 8 , .Xr kldload 8 , .Xr kldstat 8 , .Xr kldunload 8 .Sh HISTORY The .Nm utility first appeared in .Fx 5.0 . .Sh AUTHORS .An -nosplit The .Nm utility was implemented by -.An Boris Popov Aq bp@FreeBSD.org . +.An Boris Popov Aq Mt bp@FreeBSD.org . This manual page was written by -.An Boris Popov Aq bp@FreeBSD.org +.An Boris Popov Aq Mt bp@FreeBSD.org and -.An Dag-Erling Sm\(/orgrav Aq des@FreeBSD.org . +.An Dag-Erling Sm\(/orgrav Aq Mt des@FreeBSD.org . Index: head/usr.sbin/lmcconfig/lmcconfig.8 =================================================================== --- head/usr.sbin/lmcconfig/lmcconfig.8 (revision 267667) +++ head/usr.sbin/lmcconfig/lmcconfig.8 (revision 267668) @@ -1,723 +1,723 @@ .\" Copyright (c) 2003 David Boggs. (boggs@boggs.palo-alto.ca.us) .\" All rights reserved. .\" .\" BSD License: .\" .\" 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. .\" .\" GNU General Public License: .\" .\" This program is free software; you can redistribute it and/or modify it .\" under the terms of the GNU General Public License as published by the Free .\" Software Foundation; either version 2 of the License, or (at your option) .\" any later version. .\" .\" This program is distributed in the hope that it will be useful, but WITHOUT .\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or .\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for .\" more details. .\" .\" You should have received a copy of the GNU General Public License along with .\" this program; if not, write to the Free Software Foundation, Inc., 59 .\" Temple Place - Suite 330, Boston, MA 02111-1307, USA. .\" .\" $FreeBSD$ .\" .Dd October 3, 2005 .Dt LMCCONFIG 8 .Os .Sh NAME .Nm lmcconfig .Nd configuration program for .Tn SBE (formerly .Tn LMC ) wide-area network interface cards .Sh SYNOPSIS .Nm .Ar interface .Op Fl abBcCdDeEfhLmMpPrsStTuwxXyYzZ? .Nm .Ar interface .Fl 1 .Op Fl aABceEfFgiIlLpPstTuUxX .Nm .Ar interface .Fl 3 .Op Fl aABcefFlLsSv .Sh DESCRIPTION The .Nm utility is the configuration program for the .Xr lmc 4 wide-area network device driver. It sets control values, such as T3 framing format, and it displays status, such as that of integrated modems, that are beyond the scope of .Xr ifconfig 8 . .Pp The .Nm utility displays the interface status when no parameters are specified; see example below. For this case only, if no .Ar interface is specified, it defaults to .Dq Li lmc0 . .Pp Only the super-user may modify the configuration of a network interface. .Pp The following options are available: .Bl -tag -width indent .It Ar interface This is the name of the interface; the default is .Dq Li lmc0 . If .Xr netgraph 4 is present and the interface name ends with a colon then Netgraph control messages are used, otherwise the .Xr ifnet 9 kernel interface and socket .Xr ioctl 2 system calls are used. .It Fl 1 All parameters after this apply to the T1E1 card. .It Fl 3 All parameters after this apply to the T3 card. .El .Ss Commands for all cards The following parameters apply to more than one card type. .Bl -tag -width indent .It Fl a Ar number Set Transmitter clock source to .Ar number . .Pp .Bl -column "1" "External connector" "T1E1, HSSIc" -offset 2m -compact .It "1" Ta "TxClk from modem" Ta "T1E1, HSSI" Ta "default" .It "2" Ta "Internal source" Ta "T1E1, HSSI" .It "3" Ta "RxClk from modem" Ta "T1E1, HSSIc" Ta "loop timed" .It "4" Ta "External connector" Ta "T1E1, HSSIc" .El .Pp An HSSI card normally takes its Tx clock from the modem connector (it is a DTE) but can use the PCI bus clock (typically 33 MHz) for loopback and null modem testing; values 3 and 4 are only applicable to a few rare CompactPCI/HSSI cards. .Pp A T1E1 card uses an on-board synthesized oscillator if the value is 1 or 2; it .Em loop times (uses the clock recovered by the receiver as the transmitter clock) if the value is 3; and it uses a clock from a header connector on the card if the value is 4. .Pp TxClk source is not applicable to other card types. .It Fl b Read BIOS ROM. Print the first 256 locations. The BIOS ROM is not used and not present on some cards. .It Fl B Write BIOS ROM. Write the first 256 locations with an address pattern. .It Fl c Use HDLC's 16-bit CRC polynomial: X^16+X^12+X^5+1 (default). .It Fl C Use HDLC's 32-bit CRC polynomial: X^32+X^26+X^23+X^22+X^16+X^12+X^11+X^10+X^8+X^7+X^5+X^4+X^2+X+1 .It Fl d Clear the driver-level debug flag. Non-critical log messages are suppressed. .It Fl D Set the driver-level debug flag. The driver generates more log messages. The driver also generates more log messages if the interface-level debug flag is set by .Xr ifconfig 8 . .It Fl e Set DTE (Data Terminal Equipment) mode (default). An SSI card transmitter uses the Tx clock signal from the modem connector and receives the Data Carrier Detect pin (DCD). DTE/DCE is not applicable to other card types except a few rare CompactPCI/HSSI cards. .It Fl E Set DCE (Data Communication Equipment) mode. An SSI card transmitter uses an on-board synthesized oscillator and drives the Data Carrier Detect pin (DCD). .It Fl f Ar number Set the frequency of the built-in synthesized oscillator to .Ar number bits/second. The nearest frequency that the synthesizer can generate will be used. Only SSI cards and a few rare CompactPCI/HSSI cards have synthesizers. .It Fl F Set SPPP line protocol to Frame-Relay. Only works for .Fx 5.4 and later. .It Fl h Print help (usage message). .It Fl i Set interface name (e.g.\& .Dq Li lmc0 ) . .It Fl L Ar number Set loopback mode to .Ar number . .Pp .Bl -column "99" "payload" "inward thru drvrs/rcvrsxxx" "HSSI, SSI" -offset 1m -compact .It "1" Ta "none" Ta "default" Ta \& .It "2" Ta "payload" Ta "outward thru framer" Ta "T1E1. T3" .It "3" Ta "line" Ta "outward thru line if" Ta "T1E1, T3, HSSIc" .It "4" Ta "other" Ta "inward thru line if" Ta "T1E1, T3" .It "5" Ta "inward" Ta "inward thru framer" Ta "T1E1, T3" .It "6" Ta "dual" Ta "inward and outward" Ta "T1E1, T3" .It "16" Ta "tulip" Ta "inward thru Tulip chip" Ta "all cards" .It "17" Ta "pins" Ta "inward thru drvrs/rcvrs" Ta "SSI" .It "18" Ta "LA/LL" Ta "assert LA/LL modem pin" Ta "HSSI, SSI" .It "19" Ta "LB/RL" Ta "assert LB/RL modem pin" Ta "HSSI, SSI" .El .It Fl m Read Tulip MII registers. Print the 32 16-bit registers in the Media Independent Interface. .It Fl M Ar addr Ar data Write Tulip MII register. Write .Ar data into register .Ar addr . .It Fl p Read Tulip PCI configuration registers. Print the first 16 32-bit registers in the PCI configuration space. .It Fl P Ar addr Ar data Write Tulip PCI configuration register. Write .Ar data into register .Ar addr . .It Fl s Read Tulip SROM. Print the 64 16-bit locations. The PCI subsystem vendor and device IDs are kept here. .It Fl S Ar number Write Tulip SROM. Initializes the Tulip SROM to card type .Ar number . .Pp .Bl -column "9" -offset 1m -compact .It 3 Ta HSSI .It 4 Ta T3 .It 5 Ta SSI .It 6 Ta T1E1 .It 7 Ta HSSIc .It 8 Ta SDSL .It 0 Ta auto-set from MII PHYID .El .Pp If .Ar number is zero, then the card type is computed from the gate array microcode version field in the MII PHYID register. .Em CAUTION : if the SROM is incorrect, the card will be unusable! This command is .Em so dangerous that .Nm must be edited and recompiled to enable it. .It Fl t Read Tulip CSRs. Print the 16 32-bit control and status registers. .It Fl T Ar addr Ar data Write Tulip CSR. Write .Ar data into CSR number .Ar addr . Note that .Ar addr is a CSR number (0-15) not a byte offset into CSR space. .It Fl u Reset event counters to zero. The driver counts events like packets in and out, errors, discards, etc. The time when the counters are reset is remembered. .It Fl U Reset gate array. Not needed during normal operation; just for testing. .It Fl v Set verbose mode: print more stuff. .It Fl V Print the card configuration \[em] see the .Sx EXAMPLES section. .It Fl w Load gate array from on-board ROM. Not needed during normal operation; just for testing. .It Fl W Ar filename Load gate array microcode from .Ar filename . .It Fl x Select RAWIP mode \[em] bypass line protocol code. .It Fl X Select line protocol code rather than RAWIP mode. .It Fl y Disable SPPP keep-alive packets. .It Fl Y Enable SPPP keep-alive packets. .It Fl z Set SPPP line protocol to Cisco-HDLC. .It Fl Z Set SPPP line protocol to PPP. .It Fl ?\& Print help (usage message). .El .Ss Commands for T1E1 cards The following parameters apply to the T1E1 card type: .Bl -tag -width indent .It Fl a Sm Cm y | a | b Sm Stop sending alarm signal. .Pp .Bl -column "y" "Yellow Alarm" "unframed all ones; aka AIS" -offset 1m -compact .It "y" Ta "Yellow Alarm" Ta "varies with framing" .It "a" Ta "Red Alarm" Ta "unframed all ones; aka AIS" .It "b" Ta "Blue Alarm" Ta "unframed all ones" .El .Pp Red alarm, also known as AIS (Alarm Indication Signal), and Blue alarm are identical in T1. .It Fl A Sm Cm y | a | b Sm Start sending alarm signal (see table above). .It Fl B Ar number Send a Bit Oriented Protocol (BOP) message with code .Ar number . BOP codes are six bits. .It Fl c Ar number Set cable length to .Ar number meters (default: 10 meters). This is used to set receiver sensitivity and transmitter line build-out. .It Fl d Print the status of the on-board DSU/CSU \[em] see the .Sx EXAMPLES section. .It Fl e Ar number Set the framing format to .Ar number : .Pp .Bl -column "99" -offset 1m -compact .It 9 Ta T1-SF/AMI .It 27 Ta T1-ESF/B8ZS (default) .It 0 Ta E1-FAS .It 8 Ta E1-FAS+CRC .It 16 Ta E1-FAS+CAS .It 24 Ta E1-FAS+CRC+CAS .It 32 Ta E1-NO-framing .El .It Fl E Ar number Enable 64Kb time slots (TSs) for the T1E1 card. The .Ar number argument is a 32-bit hex number (default 0xFFFFFFFF). The LSB is TS0 and the MSB is TS31. TS0 and TS25-31 are ignored in T1 mode. TS0 and TS16 are determined by the framing format in E1 mode. .It Fl f Read framer registers. Print the 512 8-bit registers in the framer chip. .It Fl F Ar addr Ar data Write framer register. Write .Ar data into register .Ar addr . .It Fl g Ar number Set receiver gain range to .Ar number : .Pp .Bl -column "0x00" "Medium" "auto-set based on cable length (default)" -offset 1m -compact .It "0x24" Ta "Short" Ta "0 to 20 dB of equalized gain" .It "0x2C" Ta "Medium" Ta "0 to 30 dB of equalized gain" .It "0x34" Ta "Long" Ta "0 to 40 dB of equalized gain" .It "0x3F" Ta "Extend" Ta "0 to 64 dB of equalized gain (wide open)" .It "0xFF" Ta "Auto" Ta "auto-set based on cable length (default)" .El .Pp This sets the level at which .Em Loss-Of-Signal is declared. .It Fl i Send a .Em CSU loopback deactivate inband command (T1-SF only). .It Fl I Send a .Em CSU loopback activate inband command (T1-SF only). .It Fl l Send a .Em line loopback deactivate BOP message (T1-ESF only). .It Fl L Send a .Em line loopback activate BOP message (T1-ESF only). .It Fl p Send a .Em payload loopback deactivate BOP message (T1-ESF only). .It Fl P Send a .Em payload loopback activate BOP message (T1-ESF only). .It Fl s Print the status of the on-board DSU/CSU \[em] see the .Sx EXAMPLES section. .It Fl t Stop sending test pattern. .It Fl T Ar number Start sending test pattern .Ar number : .Pp .Bl -column "99" -offset 1m -compact .It 0 Ta unframed X^11+X^9+1 .It 1 Ta unframed X^15+X^14+1 .It 2 Ta unframed X^20+X^17+1 .It 3 Ta unframed X^23+X^18+1 .It 4 Ta unframed X^11+X^9+1 with 7ZS .It 5 Ta unframed X^15+X^14+1 with 7ZS .It 6 Ta unframed X^20+X^17+1 with 14ZS (QRSS) .It 7 Ta unframed X^23+X^18+1 with 14ZS .It 8 Ta framed X^11+X^9+1 .It 9 Ta framed X^15+X^14+1 .It 10 Ta framed X^20+X^17+1 .It 11 Ta framed X^23+X^18+1 .It 12 Ta framed X^11+X^9+1 with 7ZS .It 13 Ta framed X^15+X^14+1 with 7ZS .It 14 Ta framed X^20+X^17+1 with 14ZS (QRSS) .It 15 Ta framed X^23+X^18+1 with 14ZS .El .It Fl u Ar number Set transmit pulse shape to .Ar number : .Pp .Bl -column "99" -offset 1m -compact .It 0 Ta T1 DSX 0 to 40 meters .It 2 Ta T1 DSX 40 to 80 meters .It 4 Ta T1 DSX 80 to 120 meters .It 6 Ta T1 DSX 120 to 160 meters .It 8 Ta T1 DSX 160 to 200 meters .It 10 Ta E1 75-ohm coax pair .It 12 Ta E1 120-ohm twisted pairs .It 14 Ta T1 CSU 200 to 2000 meters; set LBO .It 255 Ta auto-set based on cable length and framing format (default) .El .It Fl U Ar number Set transmit line build-out to .Ar number : .Pp .Bl -column "255" "22.5 dB" "FCC option A" -offset 1m -compact .It " 0" Ta "0 dB" Ta "FCC option A" .It " 16" Ta "7.5 dB" Ta "FCC option B" .It " 32" Ta "15 dB" Ta "FCC option C" .It " 48" Ta "22.5 dB" Ta "final span" .It "255" Ta "auto-set based on cable length (default)" Ta \& .El .Pp This is only applicable if the pulse shape is T1-CSU. .It Fl v Set verbose mode: print more stuff. .It Fl x Disable transmitter outputs. .It Fl X Enable transmitter outputs. .El .Ss Commands for T3 cards The following parameters apply to the T3 card type: .Bl -tag -width indent .It Fl a Sm Cm y | a | b | i Sm Stop sending alarm signal. .Pp .Bl -column "y" "Yellow Alarm" "framed 1010... aka AIS" -offset 1m -compact .It "y" Ta "Yellow Alarm" Ta "X-bits set to 0" .It "a" Ta "Red Alarm" Ta "framed 1010... aka AIS" .It "b" Ta "Blue Alarm" Ta "unframed all-ones" .It "i" Ta "Idle signal" Ta "framed 11001100..." .El .It Fl A Sm Cm y | a | b | i Sm Start sending alarm signal (see table above). .It Fl B Ar number Send a BOP (Bit Oriented Protocol) message with code .Ar number . BOP codes are six bits. .It Fl c Ar number Set cable length to .Ar number meters (default: 10 meters). This is used to set receiver sensitivity and transmitter line build-out. .It Fl d Print the status of the on-board T3 DSU \[em] see the .Sx EXAMPLES section. .It Fl e Ar number Set the framing format to .Ar number : .Pp .Bl -column "100" -offset 1m -compact .It 100 Ta T3-C-bit parity .It 101 Ta T3-M13 format .El .It Fl f Read framer registers. Print the 22 8-bit registers in the framer chip. .It Fl F Ar addr Ar data Write framer register. Write .Ar data into register .Ar addr . .It Fl l Send a .Em line loopback deactivate BOP message. .It Fl L Send a .Em line loopback activate BOP message. .It Fl s Print the status of the on-board T3 DSU \[em] see the .Sx EXAMPLES section. .It Fl S Ar number Set payload scrambler polynomial to .Ar number : .Pp .Bl -column "9" -offset 1m -compact .It 1 Ta payload scrambler disabled .It 2 Ta X^43+1: DigitalLink and Kentrox .It 3 Ta X^20+X^17+1 w/28ZS: Larscom .El Payload scrambler polynomials are not standardized. .It Fl v Set verbose mode: print more stuff. .It Fl V Ar number Set transmit frequency offset to .Ar number . Some T3 cards can offset the transmitter frequency from 44.736 MHz. .Ar Number is in the range (0..4095); 2048 is zero offset; step size is about 3 Hz. A .Ar number is written to a Digital-Analog Converter (DAC) which connects to a Voltage Controlled Crystal Oscillator (VCXO). .El .Ss Event Counters The device driver counts many interesting events such as packets in and out, errors and discards. The table below lists the event counters and describes what they count. .Bl -tag -width ".Va underruns" .It Va ibytes Bytes received in packets with good ending status. .It Va obytes Bytes transmitted. .It Va ipackets Packets received with good ending status. .It Va opackets Packets transmitted. .It Va ierrors Packets received with bad ending status. .It Va oerrors Packets transmitted with bad ending status. .It Va idiscards Packets received but discarded because the input queue was full or the interface was down. .It Va odiscards Packets presented for transmission but discarded because the output queue was full or the interface was down. .It Va txdma Packets presented for transmission but queued and retried later because no DMA descriptors were available. This can happen during normal operation and is not an indication of trouble. .It Va fifo-overrun Packets that started to arrive, but were aborted because the card was unable to DMA data to memory fast enough to prevent the receiver fifo from overflowing. .It Va fifo-underrun Packets that started to transmit but were aborted because the card was unable to DMA data from the memory fast enough to prevent the transmitter fifo from underflowing. When this happens, the transmitter threshold is increased, so that more bytes are required to be in the fifo before the transmitter is started. .It Va missed Packets that are missed because the receiver is stopped. .It Va overruns Packets that are missed because the receiver had no DMA descriptors available. .It Va fdl_pkts Packets received on the T1 Facility Data Link. .It Va crc-errs Cyclic Redundancy Checksum errors detected by the CRC-6 in T1 Extended SuperFrames (ESF) or the CRC-4 in E1 frames. .It Va lcv-errs Line Coding Violation errors: Alternate Mark Inversion (AMI) errors for T1-SF, Bipolar 8-Zero Substitution (B8ZS) errors for T1-ESF, or High Density Bipolar with 3-Zero Substitution (HDB3) errors for E1 or Bipolar 3-Zero Substitution (B3ZS) errors for T3. .It Va frm-errs T1 or T3 bit errors in the frame alignment signal. .It Va febe-errs Far End Block Errors: T1 or T3 bit errors detected by the device at the far end of the link. .It Va par-errs T3 bit errors detected by the hop-by-hop parity mechanism. .It Va cpar-errs T3 bit errors detected by the end-to-end parity mechanism. .It Va mfrm-errs T3 bit errors in the multi-frame alignment signal. .El .Ss Transmit Speed The hardware counts transmit clocks divided by 2048. The software computes .Dq "Tx speed" from this (see .Sx EXAMPLES below). The transmit clock is the bit rate of the circuit divided by two if the circuit is idle and divided by four if the circuit is carrying a packet. So an idle circuit reports a Tx speed equal to its bit rate, and a busy circuit reports a Tx speed equal to half its bit rate. .Pp This .Dq "bit rate" does not include circuit-level overhead bits (such as T1 or T3 frame bits) but does include HDLC stuff bits. An idle T1 circuit with a raw bit rate of 1544000 and a bit-rate-minus-overhead of 1536000 will report a .Dq "Tx speed" of ((1536000 bitand 4095) plus or minus 4096). Sometimes it will even get the correct answer of 1536000, and if the link is fully loaded it will report about 768000 bits/sec. .Pp It is not a perfect bit rate meter (the circuit must be idle), but it is a useful circuit utilization meter if you know the circuit bit rate and do some arithmetic. Software recalculates Tx speed once a second; the measurement period has some jitter. .Sh EXAMPLES When .Dq Li lmc0 is a T1E1 card, .Dq Li lmcconfig lmc0 generates the following output: .Bd -literal -offset 2m Card name: lmc0 Card type: SBE/LMC T1E1 card Link status: Up Tx Speed: 1548288 Line Prot/Pkg: Frame-Relay/SPPP SPPP Keep-alives: OFF CRC length: 16 bits Loopback: None Tx Clk src: Internal source Format-Frame/Code: T1-ESF/B8ZS TimeSlot [31-0]: 0x01FFFFFE Cable length: 10 meters Tx pulse shape: auto-set to T1-DSX: 0 to 40 meters Rx gain max: auto-set to 20.0 dB Current time: Thu Sep 29 21:48:51 2005 Cntrs reset: Thu Sep 29 16:21:05 2005 RX bytes: 15053836 RX packets: 23271 TX bytes: 1732169 TX packets: 20526 Rx fdl pkts: 5443 .Ed .Pp When .Dq Li lmc0 is a T1E1 card, .Dq Li "lmcconfig lmc0 -1 -d" generates the following output: .Bd -literal -offset 2m Format-Frame/Code: T1-ESF/B8ZS TimeSlot [31-0]: 0x01FFFFFE Tx Clk src: Internal source Tx Speed: 1548288 Tx pulse shape: T1-DSX: 0 to 40 meters Tx outputs: Enabled Line impedance: 100 ohms Max line loss: 20.0 dB Cur line loss: 3.1 dB Invert data: No Line loop: No Payload loop: No Framer loop: No Analog loop: No Tx AIS: No Rx AIS: No Tx BOP RAI: No Rx BOP RAI: No Rx LOS analog: No Rx LOS digital: No Rx LOF: No Tx QRS: No Rx QRS: No LCV errors: 0 CRC errors: 0 Frame errors: 0 Sev Err Frms: 0 Change of Frm align: 0 Loss of Frame events: 0 Last Tx BOP msg: 0x00 (Yellow Alarm (far end LOF)) Last Rx BOP msg: 0x00 (Yellow Alarm (far end LOF)) SNMP Near-end performance data: LCV=0 LOS=0 FE=0 CRC=0 AIS=0 SEF=0 OOF=0 RAI=0 ANSI Far-end performance reports: SEQ=1 CRC=0 SE=0 FE=0 LV=0 SL=0 LB=0 SEQ=0 CRC=0 SE=0 FE=0 LV=0 SL=0 LB=0 SEQ=3 CRC=0 SE=0 FE=0 LV=0 SL=0 LB=0 SEQ=2 CRC=0 SE=0 FE=0 LV=0 SL=0 LB=0 .Ed .Sh DIAGNOSTICS Messages indicating the specified interface does not exist, or the user is not privileged and tried to alter an interface's configuration. .Sh SEE ALSO .Xr ioctl 2 , .Xr lmc 4 , .Xr netgraph 4 , .Xr ifconfig 8 , .Xr ifnet 9 .Pp .Pa http://www.sbei.com/ .Sh HISTORY This is a total rewrite of the program .Nm lmcctl by -.An "Andrew Stanley-Jones" . +.An Andrew Stanley-Jones . .Sh AUTHORS -.An "David Boggs" Aq boggs@boggs.palo-alto.ca.us +.An David Boggs Aq Mt boggs@boggs.palo-alto.ca.us Index: head/usr.sbin/lpr/chkprintcap/chkprintcap.8 =================================================================== --- head/usr.sbin/lpr/chkprintcap/chkprintcap.8 (revision 267667) +++ head/usr.sbin/lpr/chkprintcap/chkprintcap.8 (revision 267668) @@ -1,99 +1,99 @@ .\" Copyright 1997 Massachusetts Institute of Technology .\" .\" Permission to use, copy, modify, and distribute this software and .\" its documentation for any purpose and without fee is hereby .\" granted, provided that both the above copyright notice and this .\" permission notice appear in all copies, that both the above .\" copyright notice and this permission notice appear in all .\" supporting documentation, and that the name of M.I.T. not be used .\" in advertising or publicity pertaining to distribution of the .\" software without specific, written prior permission. M.I.T. makes .\" no representations about the suitability of this software for any .\" purpose. It is provided "as is" without express or implied .\" warranty. .\" .\" THIS SOFTWARE IS PROVIDED BY M.I.T. ``AS IS''. M.I.T. DISCLAIMS .\" ALL EXPRESS OR IMPLIED WARRANTIES WITH REGARD TO THIS SOFTWARE, .\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF .\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT .\" SHALL M.I.T. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT .\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF .\" USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND .\" ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, .\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT .\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" .\" $FreeBSD$ .Dd November 30, 1997 .Dt CHKPRINTCAP 8 .Os .Sh NAME .Nm chkprintcap .Nd check validity of entries in the print spooler database .Sh SYNOPSIS .Nm .Op Fl d .Op Fl f Ar printcap .Sh DESCRIPTION The .Nm utility scans a .Xr printcap 5 database (named by the .Ar printcap argument, or by default .Pa /etc/printcap ) , looking for entries which are invalid in one way or another. The following checks are currently implemented: .Bl -enum -offset indent .It .Sq Li tc= references were properly expanded .It .Sq Li tc= references did not form a loop .It No two printers share the same spool directory .Sq ( Li sd= capability). .El .Pp The .Nm utility exits with a status equal to the number of errors encountered before processing stopped. (In some cases, processing can stop before the entire file is scanned.) .Pp If the .Fl d flag is given, .Nm will attempt to create any missing spool directories, giving them .Sq Li u=rwx,go=rx (0755) mode, group .Sq Li daemon , and the owner specified by the .Sq Li du= capability in the database (default 1, which corresponds to user .Sq Li daemon ) . .Sh SEE ALSO .Xr lpr 1 , .Xr printcap 5 , .Xr lpd 8 .Sh AUTHORS The .Nm utility was written by -.An Garrett A. Wollman Aq wollman@lcs.mit.edu . +.An Garrett A. Wollman Aq Mt wollman@lcs.mit.edu . .Sh BUGS Not enough sanity-checking is done. At a minimum, the ownership and mode of the spool directories should also be checked. Other parameters whose value could cause .Xr lpd 8 to fail should be diagnosed. Index: head/usr.sbin/mailwrapper/mailwrapper.8 =================================================================== --- head/usr.sbin/mailwrapper/mailwrapper.8 (revision 267667) +++ head/usr.sbin/mailwrapper/mailwrapper.8 (revision 267668) @@ -1,163 +1,163 @@ .\" $OpenBSD: mailwrapper.8,v 1.10 2009/02/07 16:58:23 martynas Exp $ .\" $NetBSD: mailwrapper.8,v 1.11 2002/02/08 01:38:50 ross Exp $ .\" $FreeBSD$ .\" .\" Copyright (c) 1998 .\" Perry E. Metzger. 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. All advertising materials mentioning features or use of this software .\" must display the following acknowledgment: .\" This product includes software developed for the NetBSD Project .\" by Perry E. Metzger. .\" 4. The name of the author may not be used to endorse or promote products .\" derived from this software without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" .Dd August 7, 2006 .Dt MAILWRAPPER 8 .Os .Sh NAME .Nm mailwrapper .Nd invoke appropriate MTA software based on configuration file .Sh SYNOPSIS Special. See below. .Sh DESCRIPTION At one time, the only Mail Transfer Agent (MTA) software easily available was .Xr sendmail 8 . As a result of this, most Mail User Agents (MUAs) such as .Xr mail 1 had the path and calling conventions expected by .Xr sendmail 8 compiled in. .Pp Times have changed, however. On a modern .Ux system, the administrator may wish to use one of several available MTAs. .Pp It would be difficult to modify all MUA software typically available on a system, so most of the authors of alternative MTAs have written their front end message submission programs so that they use the same calling conventions as .Xr sendmail 8 and may be put into place instead of .Xr sendmail 8 in .Pa /usr/sbin/sendmail . .Pp .Xr sendmail 8 also typically has aliases named .Xr mailq 1 and .Xr newaliases 1 linked to it. The program knows to behave differently when its .Va argv[0] is .Dq mailq or .Dq newaliases and behaves appropriately. Typically, replacement MTAs provide similar functionality, either through a program that also switches behavior based on calling name, or through a set of programs that provide similar functionality. .Pp Although having drop-in replacements for .Xr sendmail 8 helps in installing alternative MTAs, it essentially makes the configuration of the system depend on hand installing new programs in .Pa /usr . This leads to configuration problems for many administrators, since they may wish to install a new MTA without altering the system provided .Pa /usr . (This may be, for example, to avoid having upgrade problems when a new version of the system is installed over the old.) They may also have a shared .Pa /usr among several machines, and may wish to avoid placing implicit configuration information in a read-only .Pa /usr . .Pp The .Nm utility is designed to replace .Pa /usr/sbin/sendmail and to invoke an appropriate MTA instead of .Xr sendmail 8 based on configuration information placed in .Pa /etc/mail/mailer.conf . This permits the administrator to configure which MTA is to be invoked on the system at run time. .Pp Other configuration files may need to be altered when replacing .Xr sendmail 8 . For example, if the replacement MTA does not support the .Fl A option with .Xr mailq 1 , .Va daily_status_include_submit_mailq should be turned off in .Pa /etc/periodic.conf . .Sh FILES Configuration for .Nm is kept in .Pa /etc/mail/mailer.conf . .Pa /usr/sbin/sendmail is typically set up as a symbolic link to .Nm which is not usually invoked on its own. .Sh EXIT STATUS .Ex -std .Sh DIAGNOSTICS The .Nm will print a diagnostic if its configuration file is missing or malformed, or does not contain a mapping for the name under which it was invoked. .Sh SEE ALSO .Xr mail 1 , .Xr mailq 1 , .Xr newaliases 1 , .Xr mailer.conf 5 , .Xr periodic.conf 5 , .Xr sendmail 8 .Sh HISTORY The .Nm utility first appeared in .Nx 1.4 and then .Fx 4.0 . .Sh AUTHORS -.An Perry E. Metzger Aq perry@piermont.com +.An Perry E. Metzger Aq Mt perry@piermont.com .Sh BUGS The entire reason this program exists is a crock. Instead, a command for how to submit mail should be standardized, and all the "behave differently if invoked with a different name" behavior of things like .Xr mailq 1 should go away. Index: head/usr.sbin/makefs/makefs.8 =================================================================== --- head/usr.sbin/makefs/makefs.8 (revision 267667) +++ head/usr.sbin/makefs/makefs.8 (revision 267668) @@ -1,374 +1,373 @@ .\" $NetBSD: makefs.8,v 1.32 2009/01/20 20:47:25 bjh21 Exp $ .\" .\" Copyright (c) 2001-2003 Wasabi Systems, Inc. .\" All rights reserved. .\" .\" Written by Luke Mewburn for Wasabi Systems, Inc. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" 3. All advertising materials mentioning features or use of this software .\" must display the following acknowledgement: .\" This product includes software developed for the NetBSD Project by .\" Wasabi Systems, Inc. .\" 4. The name of Wasabi Systems, Inc. may not be used to endorse .\" or promote products derived from this software without specific prior .\" written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY WASABI SYSTEMS, INC. ``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 WASABI SYSTEMS, INC .\" 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 16, 2013 .Dt MAKEFS 8 .Os .Sh NAME .Nm makefs .Nd create a file system image from a directory tree or a mtree manifest .Sh SYNOPSIS .Nm .Op Fl DxZ .Op Fl B Ar byte-order .Op Fl b Ar free-blocks .Op Fl d Ar debug-mask .Op Fl F Ar specfile .Op Fl f Ar free-files .Op Fl M Ar minimum-size .Op Fl m Ar maximum-size .Op Fl N Ar userdb-dir .Op Fl o Ar fs-options .Op Fl S Ar sector-size .Op Fl s Ar image-size .Op Fl t Ar fs-type .Ar image-file .Ar directory | manifest .Op Ar extra-directory ... .Sh DESCRIPTION The utility .Nm creates a file system image into .Ar image-file from the directory tree .Ar directory or from the mtree manifest .Ar manifest . If optional directory tree .Ar extra-directory is passed, then the directory tree of each argument will be merged into the .Ar directory or .Ar manifest first before creating .Ar image-file . No special devices or privileges are required to perform this task. .Pp The options are as follows: .Bl -tag -width flag .It Fl B Ar byte-order Set the byte order of the image to .Ar byte-order . Valid byte orders are .Ql 4321 , .Ql big , or .Ql be for big endian, and .Ql 1234 , .Ql little , or .Ql le for little endian. Some file systems may have a fixed byte order; in those cases this argument will be ignored. .It Fl b Ar free-blocks Ensure that a minimum of .Ar free-blocks free blocks exist in the image. An optional .Ql % suffix may be provided to indicate that .Ar free-blocks indicates a percentage of the calculated image size. .It Fl D Treat duplicate paths in an mtree manifest as warnings not error. .It Fl d Ar debug-mask Enable various levels of debugging, depending upon which bits are set in .Ar debug-mask . XXX: document these .It Fl F Ar specfile Use .Ar specfile as an .Xr mtree 8 .Sq specfile specification. This option has no effect when the image is created from a mtree manifest rather than a directory. .Pp If a specfile entry exists in the underlying file system, its permissions and modification time will be used unless specifically overridden by the specfile. An error will be raised if the type of entry in the specfile conflicts with that of an existing entry. .Pp In the opposite case (where a specfile entry does not have an entry in the underlying file system) the following occurs: If the specfile entry is marked .Sy optional , the specfile entry is ignored. Otherwise, the entry will be created in the image, and it is necessary to specify at least the following parameters in the specfile: .Sy type , .Sy mode , .Sy gname , or .Sy gid , and .Sy uname or .Sy uid , and .Sy link (in the case of symbolic links). If .Sy time isn't provided, the current time will be used. If .Sy flags isn't provided, the current file flags will be used. Missing regular file entries will be created as zero-length files. .It Fl f Ar free-files Ensure that a minimum of .Ar free-files free files (inodes) exist in the image. An optional .Ql % suffix may be provided to indicate that .Ar free-files indicates a percentage of the calculated image size. .It Fl M Ar minimum-size Set the minimum size of the file system image to .Ar minimum-size . .It Fl m Ar maximum-size Set the maximum size of the file system image to .Ar maximum-size . An error will be raised if the target file system needs to be larger than this to accommodate the provided directory tree. .It Fl N Ar dbdir Use the user database text file .Pa master.passwd and group database text file .Pa group from .Ar dbdir , rather than using the results from the system's .Xr getpwnam 3 and .Xr getgrnam 3 (and related) library calls. .It Fl o Ar fs-options Set file system specific options. .Ar fs-options is a comma separated list of options. Valid file system specific options are detailed below. .It Fl p Deprecated. See the .Fl Z flag. .It Fl S Ar sector-size Set the file system sector size to .Ar sector-size . .\" XXX: next line also true for cd9660? Defaults to 512. .It Fl s Ar image-size Set the size of the file system image to .Ar image-size . .It Fl t Ar fs-type Create an .Ar fs-type file system image. The following file system types are supported: .Bl -tag -width cd9660 -offset indent .It Sy ffs BSD fast file system (default). .It Sy cd9660 ISO 9660 file system. .El .It Fl x Exclude file system nodes not explicitly listed in the specfile. .It Fl Z Create the image as a sparse file. .El .Pp Where sizes are specified, a decimal number of bytes is expected. Two or more numbers may be separated by an .Dq x to indicate a product. Each number may have one of the following optional suffixes: .Bl -tag -width 3n -offset indent -compact .It b Block; multiply by 512 .It k Kibi; multiply by 1024 (1 KiB) .It m Mebi; multiply by 1048576 (1 MiB) .It g Gibi; multiply by 1073741824 (1 GiB) .It t Tebi; multiply by 1099511627776 (1 TiB) .It w Word; multiply by the number of bytes in an integer .El .\" .\" .Ss FFS-specific options .Sy ffs images have ffs-specific optional parameters that may be provided. Each of the options consists of a keyword, an equal sign .Pq Ql = , and a value. The following keywords are supported: .Pp .Bl -tag -width optimization -offset indent -compact .It Sy avgfilesize Expected average file size. .It Sy avgfpdir Expected number of files per directory. .It Sy bsize Block size. .It Sy density Bytes per inode. .It Sy fsize Fragment size. .It Sy label Label name of the image. .It Sy maxbpg Maximum blocks per file in a cylinder group. .It Sy minfree Minimum % free. .It Sy optimization Optimization preference; one of .Ql space or .Ql time . .It Sy extent Maximum extent size. .It Sy maxbpcg Maximum total number of blocks in a cylinder group. .It Sy version UFS version. 1 for FFS (default), 2 for UFS2. .El .Ss CD9660-specific options .Sy cd9660 images have ISO9660-specific optional parameters that may be provided. The arguments consist of a keyword and, optionally, an equal sign .Pq Ql = , and a value. The following keywords are supported: .Pp .Bl -tag -width omit-trailing-period -offset indent -compact .It Sy allow-deep-trees Allow the directory structure to exceed the maximum specified in the spec. .\" .It Sy allow-illegal-chars .\" Unknown .\" .It Sy allow-lowercase .\" Unknown .It Sy allow-max-name Allow 37 instead of 33 characters for filenames by omitting the version id. .It Sy allow-multidot Allow multiple dots in a filename. .It Sy applicationid Application ID of the image. .It Sy archimedes Use the .Ql ARCHIMEDES extension to encode .Tn RISC OS metadata. .It Sy chrp-boot Write an MBR partition table to the image to allow older CHRP hardware to boot. .It Sy boot-load-segment Set load segment for the boot image. .It Sy bootimage Filename of a boot image in the format .Dq sysid;filename , where .Dq sysid is one of .Ql i386 , .Ql mac68k , .Ql macppc , or .Ql powerpc . .It Sy generic-bootimage Load a generic boot image into the first 32K of the cd9660 image. .It Sy hard-disk-boot Boot image is a hard disk image. .It Sy keep-bad-images Do not throw away images whose write was aborted due to an error. For debugging purposes. .It Sy label Label name of the image. .It Sy no-boot Boot image is not bootable. .It Sy no-emul-boot Boot image is a .Dq no emulation ElTorito image. .It Sy no-trailing-padding Do not pad the image (apparently Linux needs the padding). .\" .It Sy omit-trailing-period .\" Unknown .It Sy preparer Preparer ID of the image. .It Sy publisher Publisher ID of the image. .It Sy rockridge Use RockRidge extensions (for longer filenames, etc.). .It Sy volumeid Volume set identifier of the image. .El .Sh SEE ALSO .Xr mtree 5 , .Xr mtree 8 , .Xr newfs 8 .Sh HISTORY The .Nm utility appeared in .Nx 1.6 . .Sh AUTHORS -.An Luke Mewburn -.Aq lukem@NetBSD.org +.An Luke Mewburn Aq Mt lukem@NetBSD.org (original program) -.An Daniel Watt , -.An Walter Deignan , -.An Ryan Gabrys , -.An Alan Perez-Rathke , +.An Daniel Watt +.An Walter Deignan +.An Ryan Gabrys +.An Alan Perez-Rathke .An Ram Vedam (cd9660 support) Index: head/usr.sbin/mergemaster/mergemaster.8 =================================================================== --- head/usr.sbin/mergemaster/mergemaster.8 (revision 267667) +++ head/usr.sbin/mergemaster/mergemaster.8 (revision 267668) @@ -1,476 +1,476 @@ .\" Copyright (c) 1998-2011 Douglas Barton .\" 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 1, 2011 .Dt MERGEMASTER 8 .Os .Sh NAME .Nm mergemaster .Nd merge configuration files, et al during an upgrade .Sh SYNOPSIS .Nm .Op Fl scrvhpCP .Op Fl a|iFU .Op Fl -run-updates=[always|never] .Op Fl m Ar /path/to/sources .Op Fl t Ar /path/to/temp/root .Op Fl d .Op Fl u Ar N .Op Fl w Ar N .Op Fl A Ar Target architecture .Op Fl D Ar /destdir/path .Sh DESCRIPTION The .Nm utility is a Bourne shell script which is designed to aid you in updating the various configuration and other files associated with .Fx . It is .Sy HIGHLY recommended that you back up your .Pa /etc directory before beginning this process. .Pp The script uses .Pa /usr/src/Makefile to build a temporary root environment from .Pa / down, populating that environment with the various files. You can specify a different source directory with the .Fl m command line option, or specify the destination directory with the .Fl D option. It then compares each file in that environment to its installed counterpart. When the script finds a change in the new file, or there is no installed version of the new file it gives you four options to deal with it. You can install the new file as is, delete the new file, merge the old and new files (as appropriate) using .Xr sdiff 1 or leave the file in the temporary root environment to merge by hand later. .Pp By default it creates the temporary root in .Pa /var/tmp/temproot and compares the Version Control System (VCS) Id strings ($FreeBSD) for files that have them, deleting the temporary file if the strings match. If there is no Id string, or if the strings are different it compares the files themselves. You can also specify that the script ignore the Id strings and compare every file with the .Fl s option. Using the .Fl F option .Nm will install the new file for you if they differ only by VCS strings. .Pp The merge menu option is designed to let you easily combine your customizations from the old version of a file into the new one. While you can use the merge function to incorporate changes from files that you have not customized, it is not recommended. .Pp The .Nm utility checks your umask and issues a warning for anything other than 022. While it is not mandatory to grant world read permissions for most configuration files, you may run into problems without them. If you choose a umask other than 022 and experience trouble later this could be the cause. .Pa /etc/master.passwd is treated as a special case. If you choose to install this file or a merged version of it the file permissions are always 600 (rw-------) for security reasons. After installing an updated version of this file you should probably run .Xr pwd_mkdb 8 with the .Fl p option to rebuild your password databases and recreate .Pa /etc/passwd . .Pp The script uses the owner and group ids that the files are created with by .Pa /usr/src/etc/Makefile , and file permissions as specified by the umask. Unified diffs are used by default to display any differences unless you choose context diffs. .Pp The .Nm utility will source scripts that you specify right before it starts the comparison, and after it is done running. The easiest way to handle this is to place the path to the script(s) in the appropriate variables in your .Pa .mergemasterrc file. The script sourced before comparison is named in .Ev MM_PRE_COMPARE_SCRIPT , and the one sourced after the script is done is .Ev MM_EXIT_SCRIPT . This is the recommended way to specify local modifications, or files that you want to give special handling to. This includes files that you want to be deleted without being compared. Because the named scripts are sourced from within .Nm , all of the script's variables are available for use in your custom script. You can also use .Pa /etc/mergemaster.rc which will be read before .Pa .mergemasterrc . Options specified on the command line are updated last, and therefore can override both files. .Pp When the comparison is done if there are any files remaining in the temproot directory they will be listed, and if the .Fl a option is not in use the user will be given the option of deleting the temproot directory. If there are no files remaining in the temproot directory it will be deleted. .Pp The options are as follows: .Bl -tag -width Fl .It Fl s Perform a strict comparison, diffing every pair of files. This comparison is performed line by line, without regard to VCS Ids. .It Fl c Use context diffs instead of unified diffs. .It Fl r Re-run .Nm on a previously cleaned directory, skipping the creation of the temporary root environment. This option is compatible with all other options. .It Fl v Be more verbose about the process. You should probably use this option the first time you run .Nm . This option also gives you a list of files that exist only in the installed version of .Pa /etc . .It Fl a Run automatically. This option will leave all the files that differ from the installed versions in the temporary directory to be dealt with by hand. If the .Pa temproot directory exists, it creates a new one in a previously non-existent directory. This option unsets the verbose flag, and is not compatible with .Fl i , .Fl F , or .Fl U . Setting .Fl a makes .Fl w superfluous. .It Fl h Display usage and help information. .It Fl i Automatically install any files that do not exist in the destination directory. .It Fl p Pre-buildworld mode. Compares only files known to be essential to the success of {build|install}world, including .Pa /etc/make.conf . .It Fl F If the files differ only by VCS Id ($FreeBSD) install the new file. .It Fl C After a standard .Nm run, compares your rc.conf[.local] options to the defaults. .It Fl P Preserve files that you replace in .Pa /var/tmp/mergemaster/preserved-files- , or another directory you specify in your .Nm rc file. .It Fl U Attempt to auto upgrade files that have not been user modified. This option can be dangerous when there are critical changes in the new versions that affect your running system. .It Fl -run-updates=[always|never] Specify always or never to run newaliases, pwd_mkdb, etc. at the end of the comparison run. If this option is omitted the default is to prompt the user for each update as necessary. .It Fl m Ar /path/to/sources Specify the path to the directory where you want to do the .Xr make 1 . (In other words, where your sources are, but -s was already taken.) In previous versions of .Nm you needed to specify the path all the way to .Pa src/etc . Starting with r186678 you only need to specify the path to .Pa src . .Nm will convert the path for you if you use the old method. .It Fl t Ar /path/to/temp/root Create the temporary root environment in .Pa /path/to/temp/root instead of the default .Pa /var/tmp/temproot . .It Fl d Add the date and time to the name of the temporary root directory. If .Fl t is specified, this option must follow it if you want the date added too. .It Fl u Ar N Specify a numeric umask. The default is 022. .It Fl w Ar N Supply an alternate screen width to the .Xr sdiff 1 command in numbers of columns. The default is 80. .It Fl A Ar Target architecture Specify an alternative .Ev TARGET_ARCH architecture name. .It Fl D Ar /path Specify the destination directory for the installed files. .El .Sh ENVIRONMENT The .Nm utility uses the .Ev PAGER environment variable if set. Otherwise it uses .Xr more 1 . If .Ev PAGER specifies a program outside its limited .Ev PATH without specifying the full path, .Nm prompts you with options on how to proceed. The .Ev MM_PRE_COMPARE_SCRIPT and .Ev MM_EXIT_SCRIPT variables are used as described above. Other variables that are used by the script internally can be specified in .Pa .mergemasterrc as described in more detail below. .Sh FILES .Bl -tag -width $HOME/.mergemasterrc -compact .It Pa /etc/mergemaster.rc .It Pa $HOME/.mergemasterrc .El .Pp The .Nm utility will .Ic .\& (source) these files if they exist. Command line options will override rc file options. .Pa $HOME/.mergemasterrc overrides .Pa /etc/mergemaster.rc . Here is an example with all values commented out: .Bd -literal # These are options for mergemaster, with their default values listed # The following options have command line overrides # # The target architecture (-A, unset by default) #ARCHSTRING='TARGET_ARCH=' # # Sourcedir is the directory to do the 'make' in (-m) #SOURCEDIR='/usr/src' # # Directory to install the temporary root environment into (-t) #TEMPROOT='/var/tmp/temproot' # # Specify the destination directory for the installed files (-D) #DESTDIR= # # Strict comparison skips the VCS Id test and compares every file (-s) #STRICT=no # # Type of diff, such as unified, context, etc. (-c) #DIFF_FLAG='-u' # # Install the new file if it differs only by VCS Id ($FreeBSD, -F) #FREEBSD_ID= # # Verbose mode includes more details and additional checks (-v) #VERBOSE= # # Automatically install files that do not exist on the system already (-i) #AUTO_INSTALL= # # Automatically upgrade files that have not been user modified (-U) # ***DANGEROUS*** #AUTO_UPGRADE= # # Either always or never run newaliases, pwd_mkdb at the end (--run-updates) #RUN_UPDATES= # # Compare /etc/rc.conf[.local] to /etc/defaults/rc.conf (-C) #COMP_CONFS= # # Preserve files that you replace (-P) #PRESERVE_FILES= #PRESERVE_FILES_DIR=/var/tmp/mergemaster/preserved-files-`date +%y%m%d-%H%M%S` # # The umask for mergemaster to compare the default file's modes to (-u) #NEW_UMASK=022 # # The following options have no command line overrides # # Files to always avoid comparing #IGNORE_FILES='/etc/motd /etc/printcap foo bar' # # Additional options for diff. This will get unset when using -s. #DIFF_OPTIONS='-Bb' # Ignore changes in whitespace # # Location to store the list of mtree values for AUTO_UPGRADE purposes #MTREEDB='/var/db' # # For those who just cannot stand including the full path to PAGER #DONT_CHECK_PAGER= # # If you set 'yes' above, make sure to include the PATH to your pager #PATH=/bin:/usr/bin:/usr/sbin # # Delete stale files in /etc/rc.d without prompting #DELETE_STALE_RC_FILES= # # Specify the path to scripts to run before the comparison starts, # and/or after the script has finished its work #MM_PRE_COMPARE_SCRIPT= #MM_EXIT_SCRIPT= .Ed .Sh EXIT STATUS Exit status is 0 on successful completion, or if the user bails out manually at some point during execution. .Pp Exit status is 1 if it fails for one of the following reasons: .Pp Invalid command line option .Pp Failure to create the temporary root environment .Pp Failure to populate the temporary root .Pp Presence of the 'nodev' option in .Pa /etc/fstab .Pp Failure to install a file .Sh EXAMPLES Typically all you will need to do is type .Nm at the prompt and the script will do all the work for you. .Pp To use context diffs and have .Nm explain more things as it goes along, use: .Pp .Dl # mergemaster -cv .Pp To specify that .Nm put the temporary root environment in .Pa /usr/tmp/root , use: .Pp .Dl # mergemaster -t /usr/tmp/root .Pp To specify a 110 column screen with a strict comparison, use: .Pp .Dl # mergemaster -sw 110 .Sh SEE ALSO .Xr diff 1 , .Xr make 1 , .Xr more 1 , .Xr sdiff 1 , .Xr pwd_mkdb 8 .Pp .Pa /usr/src/etc/Makefile .Rs .%U http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html .%T The Cutting Edge (using make world) .%A Nik Clayton .Re .Sh HISTORY The .Nm utility was first publicly available on one of my web pages in a much simpler form under the name .Pa comproot on 13 March 1998. The idea for creating the temporary root environment comes from Nik Clayton's make world tutorial which is referenced above. .Sh AUTHORS This manual page and the script itself were written by -.An Douglas Barton Aq dougb@FreeBSD.org . +.An Douglas Barton Aq Mt dougb@FreeBSD.org . Index: head/usr.sbin/mixer/mixer.8 =================================================================== --- head/usr.sbin/mixer/mixer.8 (revision 267667) +++ head/usr.sbin/mixer/mixer.8 (revision 267668) @@ -1,181 +1,181 @@ .\" Copyright (c) 1997 .\" Mike Pritchard . 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 author 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 MIKE PRITCHARD 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 June 2, 2014 .Dt MIXER 8 .Os .Sh NAME .Nm mixer .Nd set/display soundcard mixer values .Sh SYNOPSIS .Nm .Op Fl f Ar device .Op Fl s | S .Oo .Ar dev .Sm off .Oo .Op Cm + | - .Ar lvol .Op : Oo Cm + | - Oc Ar rvol .Oc .Oc .Sm on .Ar ... .Nm .Op Fl f Ar device .Op Fl s | S .Cm recsrc .Ar ... .Nm .Op Fl f Ar device .Op Fl s | S .Sm off .Bro .Cm ^ | + | - | = .Brc .Cm rec .Sm on .Ar rdev ... .Sh DESCRIPTION The .Nm utility is used to set and display soundcard mixer device levels. It may also be used to start and stop recording from the soundcard. The list of mixer devices that may be modified are: .Bd -ragged -offset indent vol, bass, treble, synth, pcm, speaker, line, mic, cd, mix, pcm2, rec, igain, ogain, line1, line2, line3, dig1, dig2, dig3, phin, phout, video, radio, and monitor. .Ed .Pp Not all mixer devices are available. .Pp Without any arguments, .Nm displays the current settings for all supported devices, followed by information about the current recording input devices. If the .Ar dev argument is specified, .Nm displays only the value for that .Ar dev . .Pp To modify the mixer value .Ar dev , the optional left and right channel settings of .Ar lvol Ns Op : Ns Ar rvol may be specified. The .Ar lvol and .Ar rvol arguments may be from 0 - 100. Omitting .Ar dev and including only the channel settings will change the main volume level. .Pp If the left or right channel settings are prefixed with .Cm + or .Cm - , the value following will be used as a relative adjustment, modifying the current settings by the amount specified. .Pp If the .Fl s flag is used, the current mixer values will be displayed in a format suitable for use as the command-line arguments to a future invocation of .Nm (as above). .Pp The .Fl S flag provides the above output without mixing field separators. .Pp To change the recording device you use one of: .Bl -tag -width =rec -offset indent .It Cm ^rec toggles .Ar rdev of possible recording devices .It Cm +rec adds .Ar rdev to possible recording devices .It Cm -rec removes .Ar rdev from possible recording devices .It Cm =rec sets the recording device to .Ar rdev .El .Pp The above commands work on an internal mask. After all the options have been parsed, it will set then read the mask from the sound card. This will let you see EXACTLY what the soundcard is using for the recording device(s). .Pp The option recsrc will display the current recording devices. .Pp The option .Fl f .Ar device will open .Ar device as the mixer device. .Sh FILES .Bl -tag -width /dev/mixer -compact .It Pa /dev/mixer the default mixer device .El .Sh SEE ALSO .Xr cdcontrol 1 , .Xr sound 4 .Sh HISTORY The .Nm utility first appeared in .Fx 2.0.5 . .Sh AUTHORS .An -nosplit Original source by -.An Craig Metz Aq cmetz@thor.tjhsst.edu +.An Craig Metz Aq Mt cmetz@thor.tjhsst.edu and .An Hannu Savolainen . Mostly rewritten by -.An John-Mark Gurney Aq jmg@FreeBSD.org . +.An John-Mark Gurney Aq Mt jmg@FreeBSD.org . This manual page was written by -.An Mike Pritchard Aq mpp@FreeBSD.org . +.An Mike Pritchard Aq Mt mpp@FreeBSD.org . Index: head/usr.sbin/mlxcontrol/mlxcontrol.8 =================================================================== --- head/usr.sbin/mlxcontrol/mlxcontrol.8 (revision 267667) +++ head/usr.sbin/mlxcontrol/mlxcontrol.8 (revision 267668) @@ -1,147 +1,148 @@ .\" .\" Copyright (c) 2000 Michael Smith .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. The name of the author may not be used to endorse or promote products .\" derived from this software without specific prior written permission .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" .\" $FreeBSD$ .\" .Dd April 10, 2000 .Dt MLXCONTROL 8 .Os .Sh NAME .Nm mlxcontrol .Nd Mylex DAC-family RAID management utility .Sh SYNOPSIS .Nm .Aq command .Op args .Nm status .Op Fl qv .Op Ar drive .Nm rescan .Ar controller .Op Ar controller ... .Nm detach .Ar drive .Op Ar drive ... .Nm detach .Fl a .Nm check .Ar drive .Nm config .Ar controller .Nm help .Ar command .Sh DESCRIPTION The .Nm utility provides status monitoring and management functions for devices attached to the .Xr mlx 4 driver. .Pp Controller names are of the form "mlxN" where N is the unit number of the controller. Drive names are of the form "mlxdN" where N is the unit number of the drive. Do not specify the path to a device node. .Bl -tag -width rebuild .It status Print the status of controllers and system drives. If one or more drives are specified, only print information about these drives, otherwise print information about all controllers and drives in the system. With the .Fl v flag, display much more verbose information. With the .Fl q flag, do not print any output. This command returns 0 if all drives tested are online, 1 if one or more drives are critical and 2 if one or more are offline. .It rescan Rescan one or more controllers for non-attached system drives (e.g.\& drives that have been detached or created subsequent to driver initialisation). If the .Fl a flag is supplied, rescan all controllers in the system. .It detach Detach one or more system drives. Drives must be unmounted and not opened by any other utility for this command to succeed. If the .Fl a flag is supplied, detach all system drives from the nominated controller. .It check Initiate a consistency check and repair pass on a redundant system drive (e.g.\& RAID1 or RAID5). The controller will scan the system drive and repair any inconsistencies. This command returns immediately; use the .Ar status command to monitor the progress of the check. .It rebuild Requires two arguments, .Ar controller and .Ar physdrive as specified in the output of the .Ar status command. All system drives using space on the physical drive .Ar physdrive are rebuilt, reconstructing all data on the drive. Note that each controller can only perform one rebuild at a time. This command returns immediately; use the .Ar status command to monitor the progress of the rebuild. .It config Print the current configuration from the nominated controller. This command will be updated to allow addition/deletion of system drives from a configuration in a future release. .It help Print usage information for .Ar command . .El .Sh AUTHORS -The mlxcontrol utility was written by -.An Michael Smith -.Aq msmith@FreeBSD.org . +The +.Nm +utility was written by +.An Michael Smith Aq Mt msmith@FreeBSD.org . .Sh BUGS The .Ar config command does not yet support modifying system drive configuration. .Pp Error log extraction is not yet supported. Index: head/usr.sbin/moused/moused.8 =================================================================== --- head/usr.sbin/moused/moused.8 (revision 267667) +++ head/usr.sbin/moused/moused.8 (revision 267668) @@ -1,854 +1,854 @@ .\" Copyright (c) 1996 .\" Mike Pritchard . 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. All advertising materials mentioning features or use of this software .\" must display the following acknowledgement: .\" This product includes software developed by Mike Pritchard. .\" 4. Neither the name of the author 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 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 15, 2008 .Dt MOUSED 8 .Os .Sh NAME .Nm moused .Nd pass mouse data to the console driver .Sh SYNOPSIS .Nm .Op Fl DPRacdfs .Op Fl I Ar file .Op Fl F Ar rate .Op Fl r Ar resolution .Op Fl S Ar baudrate .Op Fl VH Op Fl U Ar distance Fl L Ar distance .Op Fl A Ar exp Ns Op , Ns Ar offset .Op Fl a Ar X Ns Op , Ns Ar Y .Op Fl C Ar threshold .Op Fl m Ar N=M .Op Fl w Ar N .Op Fl z Ar target .Op Fl t Ar mousetype .Op Fl l Ar level .Op Fl 3 Op Fl E Ar timeout .Op Fl T Ar distance Ns Op , Ns Ar time Ns Op , Ns Ar after .Fl p Ar port .Pp .Nm .Op Fl Pd .Fl p Ar port .Fl i Ar info .Sh DESCRIPTION The .Nm utility and the console driver work together to support mouse operation in the text console and user programs. They virtualize the mouse and provide user programs with mouse data in the standard format (see .Xr sysmouse 4 ) . .Pp The mouse daemon listens to the specified port for mouse data, interprets and then passes it via ioctls to the console driver. The mouse daemon reports translation movement, button press/release events and movement of the roller or the wheel if available. The roller/wheel movement is reported as .Dq Z axis movement. .Pp The console driver will display the mouse pointer on the screen and provide cut and paste functions if the mouse pointer is enabled in the virtual console via .Xr vidcontrol 1 . If .Xr sysmouse 4 is opened by the user program, the console driver also passes the mouse data to the device so that the user program will see it. .Pp If the mouse daemon receives the signal .Dv SIGHUP , it will reopen the mouse port and reinitialize itself. Useful if the mouse is attached/detached while the system is suspended. .Pp If the mouse daemon receives the signal .Dv SIGUSR1 , it will stop passing mouse events. Sending the signal .Dv SIGUSR1 again will resume passing mouse events. Useful if your typing on a laptop is interrupted by accidentally touching the mouse pad. .Pp The following options are available: .Bl -tag -width indent .It Fl 3 Emulate the third (middle) button for 2-button mice. It is emulated by pressing the left and right physical buttons simultaneously. .It Fl C Ar threshold Set double click speed as the maximum interval in msec between button clicks. Without this option, the default value of 500 msec will be assumed. This option will have effect only on the cut and paste operations in the text mode console. The user program which is reading mouse data via .Xr sysmouse 4 will not be affected. .It Fl D Lower DTR on the serial port. This option is valid only if .Ar mousesystems is selected as the protocol type. The DTR line may need to be dropped for a 3-button mouse to operate in the .Ar mousesystems mode. .It Fl E Ar timeout When the third button emulation is enabled (see above), the .Nm utility waits .Ar timeout msec at most before deciding whether two buttons are being pressed simultaneously. The default timeout is 100 msec. .It Fl F Ar rate Set the report rate (reports/sec) of the device if supported. .It Fl L Ar distance When .Dq Virtual Scrolling is enabled, the .Fl L option can be used to set the .Ar distance (in pixels) that the mouse must move before a scroll event is generated. This effectively controls the scrolling speed. The default .Ar distance is 2 pixels. .It Fl H Enable .Dq Horizontal Virtual Scrolling . With this option set, holding the middle mouse button down will cause motion to be interpreted as horizontal scrolling. Use the .Fl U option to set the distance the mouse must move before the scrolling mode is activated and the .Fl L option to set the scrolling speed. This option may be used with or without the .Fl V option. .It Fl I Ar file Write the process id of the .Nm utility in the specified file. Without this option, the process id will be stored in .Pa /var/run/moused.pid . .It Fl P Do not start the Plug and Play COM device enumeration procedure when identifying the serial mouse. If this option is given together with the .Fl i option, the .Nm utility will not be able to print useful information for the serial mouse. .It Fl R Lower RTS on the serial port. This option is valid only if .Ar mousesystems is selected as the protocol type by the .Fl t option below. It is often used with the .Fl D option above. Both RTS and DTR lines may need to be dropped for a 3-button mouse to operate in the .Ar mousesystems mode. .It Fl S Ar baudrate Select the baudrate for the serial port (1200 to 9600). Not all serial mice support this option. .It Fl T Ar distance Ns Op , Ns Ar time Ns Op , Ns Ar after Terminate drift. Use this option if mouse pointer slowly wanders when mouse is not moved. Movements up to .Ar distance (for example 4) pixels (X+Y) in .Ar time msec (default 500) are ignored, except during .Ar after msec (default 4000) since last real mouse movement. .It Fl V Enable .Dq Virtual Scrolling . With this option set, holding the middle mouse button down will cause motion to be interpreted as scrolling. Use the .Fl U option to set the distance the mouse must move before the scrolling mode is activated and the .Fl L option to set the scrolling speed. .It Fl U Ar distance When .Dq Virtual Scrolling is enabled, the .Fl U option can be used to set the .Ar distance (in pixels) that the mouse must move before the scrolling mode is activated. The default .Ar distance is 3 pixels. .It Fl A Ar exp Ns Op , Ns Ar offset Apply exponential (dynamic) acceleration to mouse movements: the faster you move the mouse, the more it will be accelerated. That means that small mouse movements are not accelerated, so they are still very accurate, while a faster movement will drive the pointer quickly across the screen. .Pp The .Ar exp value specifies the exponent, which is basically the amount of acceleration. Useful values are in the range 1.1 to 2.0, but it depends on your mouse hardware and your personal preference. A value of 1.0 means no exponential acceleration. A value of 2.0 means squared acceleration (i.e. if you move the mouse twice as fast, the pointer will move four times as fast on the screen). Values beyond 2.0 are possible but not recommended. A good value to start is probably 1.5. .Pp The optional .Ar offset value specifies the distance at which the acceleration begins. The default is 1.0, which means that the acceleration is applied to movements larger than one unit. If you specify a larger value, it takes more speed for the acceleration to kick in, i.e. the speed range for small and accurate movements is wider. Usually the default should be sufficient, but if you're not satisfied with the behaviour, try a value of 2.0. .Pp Note that the .Fl A option interacts badly with the X server's own acceleration, which doesn't work very well anyway. Therefore it is recommended to switch it off if necessary: .Dq xset m 1 . .It Fl a Ar X Ns Op , Ns Ar Y Accelerate or decelerate the mouse input. This is a linear acceleration only. Values less than 1.0 slow down movement, values greater than 1.0 speed it up. Specifying only one value sets the acceleration for both axes. .Pp You can use the .Fl a and .Fl A options at the same time to have the combined effect of linear and exponential acceleration. .It Fl c Some mice report middle button down events as if the left and right buttons are being pressed. This option handles this. .It Fl d Enable debugging messages. .It Fl f Do not become a daemon and instead run as a foreground process. Useful for testing and debugging. .It Fl i Ar info Print specified information and quit. Available pieces of information are: .Pp .Bl -tag -compact -width modelxxx .It Ar port Port (device file) name, i.e.\& .Pa /dev/cuau0 , .Pa /dev/mse0 and .Pa /dev/psm0 . .It Ar if Interface type: serial, bus, inport or ps/2. .It Ar type Protocol type. It is one of the types listed under the .Fl t option below or .Ar sysmouse if the driver supports the .Ar sysmouse data format standard. .It Ar model Mouse model. The .Nm utility may not always be able to identify the model. .It Ar all All of the above items. Print port, interface, type and model in this order in one line. .El .Pp If the .Nm utility cannot determine the requested information, it prints .Dq Li unknown or .Dq Li generic . .It Fl l Ar level Specifies at which level .Nm should operate the mouse driver. Refer to .Sx Operation Levels in .Xr psm 4 for more information on this. .It Fl m Ar N=M Assign the physical button .Ar M to the logical button .Ar N . You may specify as many instances of this option as you like. More than one physical button may be assigned to a logical button at the same time. In this case the logical button will be down, if either of the assigned physical buttons is held down. Do not put space around .Ql = . .It Fl p Ar port Use .Ar port to communicate with the mouse. .It Fl r Ar resolution Set the resolution of the device; in Dots Per Inch, or .Ar low , .Ar medium-low , .Ar medium-high or .Ar high . This option may not be supported by all the device. .It Fl s Select a baudrate of 9600 for the serial line. Not all serial mice support this option. .It Fl t Ar type Specify the protocol type of the mouse attached to the port. You may explicitly specify a type listed below, or use .Ar auto to let the .Nm utility automatically select an appropriate protocol for the given mouse. If you entirely omit this option in the command line, .Fl t Ar auto is assumed. Under normal circumstances, you need to use this option only if the .Nm utility is not able to detect the protocol automatically (see .Sx "Configuring Mouse Daemon" ) . .Pp Note that if a protocol type is specified with this option, the .Fl P option above is implied and Plug and Play COM device enumeration procedure will be disabled. .Pp Also note that if your mouse is attached to the PS/2 mouse port, you should always choose .Ar auto or .Ar ps/2 , regardless of the brand and model of the mouse. Likewise, if your mouse is attached to the bus mouse port, choose .Ar auto or .Ar busmouse . Serial mouse protocols will not work with these mice. .Pp For the USB mouse, the protocol must be .Ar auto . No other protocol will work with the USB mouse. .Pp Valid types for this option are listed below. .Pp For the serial mouse: .Bl -tag -compact -width mousesystemsxxx .It Ar microsoft Microsoft serial mouse protocol. Most 2-button serial mice use this protocol. .It Ar intellimouse Microsoft IntelliMouse protocol. Genius NetMouse, .Tn ASCII Mie Mouse, Logitech MouseMan+ and FirstMouse+ use this protocol too. Other mice with a roller/wheel may be compatible with this protocol. .It Ar mousesystems MouseSystems 5-byte protocol. 3-button mice may use this protocol. .It Ar mmseries MM Series mouse protocol. .It Ar logitech Logitech mouse protocol. Note that this is for old Logitech models. .Ar mouseman or .Ar intellimouse should be specified for newer models. .It Ar mouseman Logitech MouseMan and TrackMan protocol. Some 3-button mice may be compatible with this protocol. Note that MouseMan+ and FirstMouse+ use .Ar intellimouse protocol rather than this one. .It Ar glidepoint ALPS GlidePoint protocol. .It Ar thinkingmouse Kensington ThinkingMouse protocol. .It Ar mmhitab Hitachi tablet protocol. .It Ar x10mouseremote X10 MouseRemote. .It Ar kidspad Genius Kidspad and Easypad protocol. .It Ar versapad Interlink VersaPad protocol. .It Ar gtco_digipad GTCO Digipad protocol. .El .Pp For the bus and InPort mouse: .Bl -tag -compact -width mousesystemsxxx .It Ar busmouse This is the only protocol type available for the bus and InPort mouse and should be specified for any bus mice and InPort mice, regardless of the brand. .El .Pp For the PS/2 mouse: .Bl -tag -compact -width mousesystemsxxx .It Ar ps/2 This is the only protocol type available for the PS/2 mouse and should be specified for any PS/2 mice, regardless of the brand. .El .Pp For the USB mouse, .Ar auto is the only protocol type available for the USB mouse and should be specified for any USB mice, regardless of the brand. .It Fl w Ar N Make the physical button .Ar N act as the wheel mode button. While this button is pressed, X and Y axis movement is reported to be zero and the Y axis movement is mapped to Z axis. You may further map the Z axis movement to virtual buttons by the .Fl z option below. .It Fl z Ar target Map Z axis (roller/wheel) movement to another axis or to virtual buttons. Valid .Ar target maybe: .Bl -tag -compact -width x__ .It Ar x .It Ar y X or Y axis movement will be reported when the Z axis movement is detected. .It Ar N Report down events for the virtual buttons .Ar N and .Ar N+1 respectively when negative and positive Z axis movement is detected. There do not need to be physical buttons .Ar N and .Ar N+1 . Note that mapping to logical buttons is carried out after mapping from the Z axis movement to the virtual buttons is done. .It Ar N1 N2 Report down events for the virtual buttons .Ar N1 and .Ar N2 respectively when negative and positive Z axis movement is detected. .It Ar N1 N2 N3 N4 This is useful for the mouse with two wheels of which the second wheel is used to generate horizontal scroll action, and for the mouse which has a knob or a stick which can detect the horizontal force applied by the user. .Pp The motion of the second wheel will be mapped to the buttons .Ar N3 , for the negative direction, and .Ar N4 , for the positive direction. If the buttons .Ar N3 and .Ar N4 actually exist in this mouse, their actions will not be detected. .Pp Note that horizontal movement or second roller/wheel movement may not always be detected, because there appears to be no accepted standard as to how it is encoded. .Pp Note also that some mice think left is the negative horizontal direction; others may think otherwise. Moreover, there are some mice whose two wheels are both mounted vertically, and the direction of the second vertical wheel does not match the first one. .El .El .Ss Configuring Mouse Daemon The first thing you need to know is the interface type of the mouse you are going to use. It can be determined by looking at the connector of the mouse. The serial mouse has a D-Sub female 9- or 25-pin connector. The bus and InPort mice have either a D-Sub male 9-pin connector or a round DIN 9-pin connector. The PS/2 mouse is equipped with a small, round DIN 6-pin connector. Some mice come with adapters with which the connector can be converted to another. If you are to use such an adapter, remember the connector at the very end of the mouse/adapter pair is what matters. The USB mouse has a flat rectangular connector. .Pp The next thing to decide is a port to use for the given interface. For the bus, InPort and PS/2 mice, there is little choice: the bus and InPort mice always use .Pa /dev/mse0 , and the PS/2 mouse is always at .Pa /dev/psm0 . There may be more than one serial port to which the serial mouse can be attached. Many people often assign the first, built-in serial port .Pa /dev/cuau0 to the mouse. You can attach multiple USB mice to your system or to your USB hub. They are accessible as .Pa /dev/ums0 , /dev/ums1 , and so on. .Pp You may want to create a symbolic link .Pa /dev/mouse pointing to the real port to which the mouse is connected, so that you can easily distinguish which is your .Dq mouse port later. .Pp The next step is to guess the appropriate protocol type for the mouse. The .Nm utility may be able to automatically determine the protocol type. Run the .Nm utility with the .Fl i option and see what it says. If the command can identify the protocol type, no further investigation is necessary on your part. You may start the daemon without explicitly specifying a protocol type (see .Sx EXAMPLES ) . .Pp The command may print .Ar sysmouse if the mouse driver supports this protocol type. .Pp Note that the .Dv type and .Dv model printed by the .Fl i option do not necessarily match the product name of the pointing device in question, but they may give the name of the device with which it is compatible. .Pp If the .Fl i option yields nothing, you need to specify a protocol type to the .Nm utility by the .Fl t option. You have to make a guess and try. There is rule of thumb: .Pp .Bl -enum -compact -width 1.X .It The bus and InPort mice always use .Ar busmouse protocol regardless of the brand of the mouse. .It The .Ar ps/2 protocol should always be specified for the PS/2 mouse regardless of the brand of the mouse. .It You must specify the .Ar auto protocol for the USB mouse. .It Most 2-button serial mice support the .Ar microsoft protocol. .It 3-button serial mice may work with the .Ar mousesystems protocol. If it does not, it may work with the .Ar microsoft protocol although the third (middle) button will not function. 3-button serial mice may also work with the .Ar mouseman protocol under which the third button may function as expected. .It 3-button serial mice may have a small switch to choose between .Dq MS and .Dq PC , or .Dq 2 and .Dq 3 . .Dq MS or .Dq 2 usually mean the .Ar microsoft protocol. .Dq PC or .Dq 3 will choose the .Ar mousesystems protocol. .It If the mouse has a roller or a wheel, it may be compatible with the .Ar intellimouse protocol. .El .Pp To test if the selected protocol type is correct for the given mouse, enable the mouse pointer in the current virtual console, .Pp .Dl "vidcontrol -m on" .Pp start the mouse daemon in the foreground mode, .Pp .Dl "moused -f -p -t " .Pp and see if the mouse pointer travels correctly according to the mouse movement. Then try cut & paste features by clicking the left, right and middle buttons. Type ^C to stop the command. .Ss Multiple Mice As many instances of the mouse daemon as the number of mice attached to the system may be run simultaneously; one instance for each mouse. This is useful if the user wants to use the built-in PS/2 pointing device of a laptop computer while on the road, but wants to use a serial mouse when s/he attaches the system to the docking station in the office. Run two mouse daemons and tell the application program (such as the .Tn "X\ Window System" ) to use .Xr sysmouse 4 , then the application program will always see mouse data from either mouse. When the serial mouse is not attached, the corresponding mouse daemon will not detect any movement or button state change and the application program will only see mouse data coming from the daemon for the PS/2 mouse. In contrast when both mice are attached and both of them are moved at the same time in this configuration, the mouse pointer will travel across the screen just as if movement of the mice is combined all together. .Sh FILES .Bl -tag -width /dev/consolectl -compact .It Pa /dev/consolectl device to control the console .It Pa /dev/mse%d bus and InPort mouse driver .It Pa /dev/psm%d PS/2 mouse driver .It Pa /dev/sysmouse virtualized mouse driver .It Pa /dev/ttyv%d virtual consoles .It Pa /dev/ums%d USB mouse driver .It Pa /var/run/moused.pid process id of the currently running .Nm utility .It Pa /var/run/MouseRemote UNIX-domain stream socket for X10 MouseRemote events .El .Sh EXAMPLES .Dl "moused -p /dev/cuau0 -i type" .Pp Let the .Nm utility determine the protocol type of the mouse at the serial port .Pa /dev/cuau0 . If successful, the command will print the type, otherwise it will say .Dq Li unknown . .Bd -literal -offset indent moused -p /dev/cuau0 vidcontrol -m on .Ed .Pp If the .Nm utility is able to identify the protocol type of the mouse at the specified port automatically, you can start the daemon without the .Fl t option and enable the mouse pointer in the text console as above. .Bd -literal -offset indent moused -p /dev/mouse -t microsoft vidcontrol -m on .Ed .Pp Start the mouse daemon on the serial port .Pa /dev/mouse . The protocol type .Ar microsoft is explicitly specified by the .Fl t option. .Pp .Dl "moused -p /dev/mouse -m 1=3 -m 3=1" .Pp Assign the physical button 3 (right button) to the logical button 1 (logical left) and the physical button 1 (left) to the logical button 3 (logical right). This will effectively swap the left and right buttons. .Pp .Dl "moused -p /dev/mouse -t intellimouse -z 4" .Pp Report negative Z axis movement (i.e., mouse wheel) as the button 4 pressed and positive Z axis movement (i.e., mouse wheel) as the button 5 pressed. .Pp If you add .Pp .Dl "ALL ALL = NOPASSWD: /usr/bin/killall -USR1 moused" .Pp to your .Pa /usr/local/etc/sudoers file, and bind .Pp .Dl "killall -USR1 moused" .Pp to a key in your window manager, you can suspend mouse events on your laptop if you keep brushing over the mouse pad while typing. .Sh SEE ALSO .Xr kill 1 , .Xr vidcontrol 1 , .Xr xset 1 , .Xr keyboard 4 , .Xr mse 4 , .Xr psm 4 , .Xr screen 4 , .Xr sysmouse 4 , .Xr ums 4 .Sh STANDARDS The .Nm utility partially supports .Dq Plug and Play External COM Device Specification in order to support PnP serial mice. However, due to various degrees of conformance to the specification by existing serial mice, it does not strictly follow the version 1.0 of the standard. Even with this less strict approach, it may not always determine an appropriate protocol type for the given serial mouse. .Sh HISTORY The .Nm utility first appeared in .Fx 2.2 . .Sh AUTHORS .An -nosplit The .Nm utility was written by -.An Michael Smith Aq msmith@FreeBSD.org . +.An Michael Smith Aq Mt msmith@FreeBSD.org . This manual page was written by -.An Mike Pritchard Aq mpp@FreeBSD.org . +.An Mike Pritchard Aq Mt mpp@FreeBSD.org . The command and manual page have since been updated by -.An Kazutaka Yokota Aq yokota@FreeBSD.org . +.An Kazutaka Yokota Aq Mt yokota@FreeBSD.org . .Sh CAVEATS Many pad devices behave as if the first (left) button were pressed if the user .Dq taps the surface of the pad. In contrast, some ALPS GlidePoint and Interlink VersaPad models treat the tapping action as fourth button events. Use the option .Dq Fl m Li 1=4 for these models to obtain the same effect as the other pad devices. .Pp Cut and paste functions in the virtual console assume that there are three buttons on the mouse. The logical button 1 (logical left) selects a region of text in the console and copies it to the cut buffer. The logical button 3 (logical right) extends the selected region. The logical button 2 (logical middle) pastes the selected text at the text cursor position. If the mouse has only two buttons, the middle, `paste' button is not available. To obtain the paste function, use the .Fl 3 option to emulate the middle button, or use the .Fl m option to assign the physical right button to the logical middle button: .Dq Fl m Li 2=3 . Index: head/usr.sbin/mptable/mptable.1 =================================================================== --- head/usr.sbin/mptable/mptable.1 (revision 267667) +++ head/usr.sbin/mptable/mptable.1 (revision 267668) @@ -1,69 +1,69 @@ .\" Copyright (c) 1996 .\" Steve Passe . 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. The name of the developer may NOT be used to endorse or promote products .\" derived from this software without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 28, 1997 .Dt MPTABLE 1 .Os .Sh NAME .Nm mptable .Nd display MP configuration table .Sh SYNOPSIS .Nm .Op Fl dmesg .Op Fl verbose .Op Fl grope .Op Fl help .Sh DESCRIPTION The .Nm command finds and analyzes the MP configuration table on an Intel(tm) MP spec capable motherboard. It is useful for debugging an SMP kernel that will not boot, as well as examining the configuration of a system. It can be run with a UniProcessor kernel. .Pp It must be run with gid kmem privileges. .Pp The following options are available: .Bl -tag -width indent .It Fl dmesg Include a dmesg dump. .It Fl grope Look in areas it should not NEED to, use ONLY as a last resort. .It Fl help Print a usage message and exits. .It Fl verbose Print extra info. .El .Sh SEE ALSO .Xr smp 4 , .Xr dmesg 8 .Sh HISTORY The .Nm command first appeared in .Fx 3.0 . .Sh AUTHORS -.An Steve Passe Aq fsmp@FreeBSD.org +.An Steve Passe Aq Mt fsmp@FreeBSD.org Index: head/usr.sbin/nandsim/nandsim.8 =================================================================== --- head/usr.sbin/nandsim/nandsim.8 (revision 267667) +++ head/usr.sbin/nandsim/nandsim.8 (revision 267668) @@ -1,229 +1,229 @@ .\" Copyright (c) 2010 Semihalf .\" 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 10, 2010 .Dt NANDSIM 8 .Os .Sh NAME .Nm nandsim .Nd NAND simulator control program .Sh SYNOPSIS .Nm .Ic status .Aq ctrl_no | Fl -all | Fl a .Op Fl v .Nm .Ic conf .Aq filename .Nm .Ic start .Aq ctrl_no .Nm .Ic mod .Aq ctrl_no:cs_no | Fl l Aq loglevel .Op Fl p Aq prog_time .Op Fl e Aq erase_time .Op Fl r Aq read_time .Op Fl E Aq error_ratio .Op Fl h .Nm .Ic stop .Aq ctrl_no .Nm .Ic error .Aq ctrl_no:cs_no .Aq page_num .Aq column .Aq length .Aq pattern .Nm .Ic bb .Aq ctrl_no:cs_no .Op blk_num,blk_num2,... .Op Fl U .Op Fl L .Nm .Ic freeze .Op ctrl_no .Nm .Ic log .Aq ctrl_no | Fl -all | Fl a .Nm .Ic stats .Aq ctrl_no:cs_no .Aq page_num .Nm .Ic dump .Aq ctrl_no:cs_no .Aq filename .Nm .Ic restore .Aq ctrl_no:chip_no .Aq filename .Nm .Ic destroy .Aq ctrl_no[:cs_no] | Fl -all | Fl a .Nm .Ic help .Op Fl v .Sh COMMAND DESCRIPTION Controllers and chips are arranged into a simple hierarchy. There can be up to 4 controllers configured, each with 4 chip select (CS) lines. A given chip is connected to one of the chip selects. .Pp Controllers are specified as .Aq ctrl_no ; chip selects are specified as .Aq cs_no . .Bl -tag -width periphlist .It Ic status Gets controller(s) status. If .Fl a or .Fl -all flag is specified - command will print status of every controller currently available. Optional flag .Fl v causes printing complete information about the controller, and all chips attached to it. .It Ic conf Reads simulator configuration from a specified file (this includes the simulation "layout" i.e. controllers-chips assignments). Configuration changes for an already started simulation require a full stop-start cycle in order to take effect i.e.: .Bl -column .It nandsim stop ... .It nandsim destroy ... .Pp .It << edit config file >> .Pp .It nandsim conf ... .It nandsim start ... .El .It Ic mod Alters simulator parameters on-the-fly. If controller number and CS pair is not specified, the general simulator parameters (not specific to a controller or a chip) will be modified. Changing chip's parameters requires specifying both controller number and CS to which the given chip is connected. Parameters which can be altered: .Pp General simulator related: .Bl -tag -width flag .It Fl l Aq log_level change logging level to .Aq log_level .El .Pp Chip related: .Bl -tag -width flag .It Fl p Aq prog_time change prog time for specified chip to .Aq prog_time .It Fl e Aq erase_time change erase time for specified chip to .Aq erase_time .It Fl r Aq read_time change read time for specified chip to .Aq read_time .It Fl E Aq error_ratio change error ratio for specified chip to .Aq error_ratio . Error ratio is a number of errors per million read/write bytes. .El .Pp Additionally, flag .Fl h will list parameters which can be altered. .El .Bl -tag -width periphlist .It Ic bb Marks/unmarks a specified block as bad. To mark/unmark the bad condition an a block, the following parameters have to be supplied: controller number, CS number, and at least one block number. It is possible to specify multiple blocks, by separating blocks numbers with a comma. The following options can be used for the 'bb' command: .Bl -tag -width flag .It Fl U unmark the bad previously marked block as bad. .It Fl L list all blocks marked as bad on a given chip. .El .It Ic log Prints activity log of the specified controller to stdout; if controller number is not specifed, logs for all available controllers are printed. .It Ic stats Print statistics of the selected controller, chip and page. Statistics includes read count, write count, raw read count, raw write count, ECC stats (succeeded corrections, failed correction). .It Ic dump Dumps a snaphot of a single chip (including data and bad blocks information, wearout level) into the file. .It Ic restore Restores chip state from a dump-file snapshot (produced previously with the 'dump' command). .It Ic start Starts a controller i.e. the simulation. .It Ic stop Stops an already started controller; if the controller number is not supplied, attempts to stop all currently working controllers. .It Ic destroy Removes existing active chip/controller and its configuration from memory and releases the resources. Specifying flag .Fl a or .Fl -all causes removal of every chip and controller. Controller must be stopped in order to be destroyed. .It Ic error Directly overwrites a certain number of bytes in the specified page at a given offset with a supplied pattern (which mimics the corruption of flash contents). .It Ic help Prints synopsis, .Fl v gives more verbose output. .It Ic freeze Stops simulation of given controller (simulates power-loss). All commands issues to any chip on this controller are ignored. .El .Sh SEE ALSO .Xr nand 4 , .Xr nandsim 4 .Xr nandsim.conf 5 .Sh HISTORY The .Nm utility first appeared in .Fx 10.0 . -.Sh AUTHOR +.Sh AUTHORS This utility was written by .An Lukasz Wojcik . Index: head/usr.sbin/ndiscvt/ndiscvt.8 =================================================================== --- head/usr.sbin/ndiscvt/ndiscvt.8 (revision 267667) +++ head/usr.sbin/ndiscvt/ndiscvt.8 (revision 267668) @@ -1,283 +1,283 @@ .\" Copyright (c) 2003 .\" Bill Paul 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. All advertising materials mentioning features or use of this software .\" must display the following acknowledgement: .\" This product includes software developed by Bill Paul. .\" 4. Neither the name of the author nor the names of any co-contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY Bill Paul 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 Bill Paul OR THE VOICES IN HIS HEAD .\" 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, 2003 .Dt NDISCVT 8 .Os .Sh NAME .Nm ndiscvt .Nd convert .Tn Windows\[rg] NDIS drivers for use with FreeBSD .Sh SYNOPSIS .Nm .Op Fl O .Op Fl i Ar inffile .Fl s Ar sysfile .Op Fl n Ar devname .Op Fl o Ar outfile .Nm .Op Fl f Ar firmfile .Sh DESCRIPTION The .Nm utility transforms a .Tn Windows\[rg] NDIS driver into a data file which is used to build an .Xr ndis 4 compatibility driver module. .Tn Windows\[rg] drivers consist of two main parts: a .Pa .SYS file, which contains the actual driver executable code, and an .Pa .INF file, which provides the .Tn Windows\[rg] installer with device identifier information and a list of driver-specific registry keys. The .Nm utility can convert these files into a header file that is compiled into .Pa if_ndis.c to create an object code module that can be linked into the .Fx kernel. .Pp The .Pa .INF file is typically required since only it contains device identification data such as PCI vendor and device IDs or PCMCIA identifier strings. The .Pa .INF file may be optionally omitted however, in which case the .Nm utility will only perform the conversion of the .Pa .SYS file. This is useful for debugging purposes only. .Sh OPTIONS The options are as follows: .Bl -tag -width indent .It Fl i Ar inffile Open and parse the specified .Pa .INF file when performing conversion. The .Nm utility will parse this file and emit a device identification structure and registry key configuration structures which will be used by the .Xr ndis 4 driver and .Xr ndisapi 9 kernel subsystem. If this is omitted, .Nm will emit a dummy configuration structure only. .It Fl s Ar sysfile Open and parse the specified .Pa .SYS file. This file must contain a .Tn Windows\[rg] driver image. The .Nm utility will perform some manipulation of the sections within the executable file to make runtime linking within the kernel a little easier and then convert the image into a data array. .It Fl n Ar devname Specify an alternate name for the network device/interface which will be created when the driver is instantiated. If you need to load more than one NDIS driver into your system (i.e., if you have two different network cards in your system which require NDIS driver support), each module you create must have a unique name. Device can not be larger than .Dv IFNAMSIZ . If no name is specified, the driver will use the default a default name .Pq Dq Li ndis . .It Fl o Ar outfile Specify the output file in which to place the resulting data. This can be any file pathname. If .Ar outfile is a single dash .Pq Sq Fl , the data will be written to the standard output. The .Pa if_ndis.c module expects to find the driver data in a file called .Pa ndis_driver_data.h , so it is recommended that this name be used. .It Fl O Generate both an .Pa ndis_driver_data.h file and an .Pa ndis_driver.data.o file. The latter file will contain a copy of the .Tn Windows\[rg] .Pa .SYS driver image encoded as a .Fx ELF object file (created with .Xr objcopy 1 ) . Turning the .Tn Windows\[rg] driver image directly into an object code file saves disk space and compilation time. .It Fl f Ar firmfile A few NDIS drivers come with additional files that the core driver module will load during initialization time. Typically, these files contain firmware which the driver will transfer to the device in order to make it fully operational. In .Tn Windows\[rg] , these files are usually just copied into one of the system directories along with the driver itself. .Pp In .Fx there are two mechanism for loading these files. If the driver is built as a loadable kernel module which is loaded after the kernel has finished booting (and after the root file system has been mounted), the extra files can simply be copied to the .Pa /compat/ndis directory, and they will be loaded into the kernel on demand when the driver needs them. .Pp If however the driver is required to bootstrap the system (i.e., if the NDIS-based network interface is to be used for diskless/PXE booting), the files need to be pre-loaded by the bootstrap loader in order to be accessible, since the driver will need them before the root file system has been mounted. However, the bootstrap loader is only able to load files that are shared .Fx binary objects. .Pp The .Fl f flag can be used to convert an arbitrary file .Ar firmfile into shared object format (the actual conversion is done using the .Xr objcopy 1 and .Xr ld 1 commands). The resulting files can then be copied to the .Pa /boot/kernel directory, and can be pre-loaded directly from the boot loader prompt, or automatically by editing the .Xr loader.conf 5 file. If desired, the files can also be loaded into memory at runtime using the .Xr kldload 8 command. .Pp When an NDIS driver tries to open an external file, the .Xr ndisapi 9 code will first search for a loaded kernel module that matches the name specified in the open request, and if that fails, it will then try to open the file from the .Pa /compat/ndis directory as well. Note that during kernel bootstrap, the ability to open files from .Pa /compat/ndis is disabled: only the module search will be performed. .Pp When using the .Fl f flag, .Nm will generate both a relocatable object file (with a .Pa .o extension) and a shared object file (with a .Pa .ko extension). The shared object is the one that should be placed in the .Pa /boot/kernel directory. The relocatable object file is useful if the user wishes to create a completely static kernel image: the object file can be linked into the kernel directly along with the driver itself. Some editing of the kernel configuration files will be necessary in order to have the extra object included in the build. .El .Sh SEE ALSO .Xr ld 1 , .Xr objcopy 1 , .Xr ndis 4 , .Xr kldload 8 .Sh HISTORY The .Nm utility first appeared in .Fx 5.3 . .Sh AUTHORS .An -nosplit The .Nm utility was written by -.An Bill Paul Aq wpaul@windriver.com . +.An Bill Paul Aq Mt wpaul@windriver.com . The .Xr lex 1 and .Xr yacc 1 .Pa INF file parser was written by -.An Matthew Dodd Aq mdodd@FreeBSD.org . +.An Matthew Dodd Aq Mt mdodd@FreeBSD.org . Index: head/usr.sbin/ndiscvt/ndisgen.8 =================================================================== --- head/usr.sbin/ndiscvt/ndisgen.8 (revision 267667) +++ head/usr.sbin/ndiscvt/ndisgen.8 (revision 267668) @@ -1,86 +1,86 @@ .\" Copyright (c) 2005 .\" Bill Paul 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. All advertising materials mentioning features or use of this software .\" must display the following acknowledgement: .\" This product includes software developed by Bill Paul. .\" 4. Neither the name of the author nor the names of any co-contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY Bill Paul 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 Bill Paul OR THE VOICES IN HIS HEAD .\" 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 24, 2005 .Dt NDISGEN 8 .Os .Sh NAME .Nm ndisgen .Nd generate a FreeBSD driver module from a .Tn Windows\[rg] NDIS driver distribution .Sh SYNOPSIS .Nm .Op Ar /path/to/INF /path/to/SYS .Sh DESCRIPTION The .Nm script uses the .Xr ndiscvt 8 utility and other tools to generate a .Fx loadable driver module and a static ELF object module from a .Tn Windows\[rg] NDIS driver, for use with the .Xr ndis 4 compatibility module. .Pp The .Nm script is interactive and contains its own help section. Unless the paths to both files are supplied on the command line, the script will prompt the user for the .Pa .INF and .Pa .SYS files needed to generate the .Fx driver module. The script will also prompt for any firmware or other external files needed. .Sh SEE ALSO .Xr ld 1 , .Xr objcopy 1 , .Xr ndis 4 , .Xr kldload 8 , .Xr ndiscvt 8 .Sh HISTORY The .Nm utility first appeared in .Fx 6.0 . .Sh AUTHORS The .Nm utility was written by -.An Bill Paul Aq wpaul@windriver.com . +.An Bill Paul Aq Mt wpaul@windriver.com . Index: head/usr.sbin/ngctl/ngctl.8 =================================================================== --- head/usr.sbin/ngctl/ngctl.8 (revision 267667) +++ head/usr.sbin/ngctl/ngctl.8 (revision 267668) @@ -1,141 +1,141 @@ .\" Copyright (c) 1996-1999 Whistle Communications, Inc. .\" All rights reserved. .\" .\" Subject to the following obligations and disclaimer of warranty, use and .\" redistribution of this software, in source or object code forms, with or .\" without modifications are expressly permitted by Whistle Communications; .\" provided, however, that: .\" 1. Any and all reproductions of the source or object code must include the .\" copyright notice above and the following disclaimer of warranties; and .\" 2. No rights are granted, in any manner or form, to use Whistle .\" Communications, Inc. trademarks, including the mark "WHISTLE .\" COMMUNICATIONS" on advertising, endorsements, or otherwise except as .\" such appears in the above copyright notice or in the software. .\" .\" THIS SOFTWARE IS BEING PROVIDED BY WHISTLE COMMUNICATIONS "AS IS", AND .\" TO THE MAXIMUM EXTENT PERMITTED BY LAW, WHISTLE COMMUNICATIONS MAKES NO .\" REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING THIS SOFTWARE, .\" INCLUDING WITHOUT LIMITATION, ANY AND ALL IMPLIED WARRANTIES OF .\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. .\" WHISTLE COMMUNICATIONS DOES NOT WARRANT, GUARANTEE, OR MAKE ANY .\" REPRESENTATIONS REGARDING THE USE OF, OR THE RESULTS OF THE USE OF THIS .\" SOFTWARE IN TERMS OF ITS CORRECTNESS, ACCURACY, RELIABILITY OR OTHERWISE. .\" IN NO EVENT SHALL WHISTLE COMMUNICATIONS BE LIABLE FOR ANY DAMAGES .\" RESULTING FROM OR ARISING OUT OF ANY USE OF THIS SOFTWARE, INCLUDING .\" WITHOUT LIMITATION, ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, .\" PUNITIVE, OR CONSEQUENTIAL DAMAGES, PROCUREMENT OF SUBSTITUTE GOODS OR .\" SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER 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 WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY .\" OF SUCH DAMAGE. .\" .\" $FreeBSD$ .\" $Whistle: ngctl.8,v 1.6 1999/01/20 03:19:44 archie Exp $ .\" .Dd January 19, 1999 .Dt NGCTL 8 .Os .Sh NAME .Nm ngctl .Nd netgraph control utility .Sh SYNOPSIS .Nm .Op Fl d .Op Fl f Ar filename .Op Fl n Ar nodename .Op Ar command ... .Sh DESCRIPTION The .Nm utility creates a new netgraph node of type .Em socket which can be used to issue netgraph commands. If no .Fl f flag is given, no command is supplied on the command line, and standard input is a tty, .Nm will enter interactive mode. Otherwise .Nm will execute the supplied command(s) and exit immediately. .Pp Nodes can be created, removed, joined together, etc. .Tn ASCII formatted control messages can be sent to any node if that node supports binary/ASCII control message conversion. .Pp In interactive mode, .Nm will display any control messages and data packets received by the socket node. In the case of control messages, the message arguments are displayed in .Tn ASCII form if the originating node supports conversion. .Pp The options are as follows: .Bl -tag -width indent .It Fl f Ar nodeinfo Read commands from the named file. A single dash represents the standard input. Blank lines and lines starting with a .Dq # are ignored. .It Fl n Ar nodename Assign .Em nodename to the newly created netgraph node. The default name is .Em ngctlXXX where XXX is the process ID number. .It Fl d Increase the debugging verbosity level. .El .Sh COMMANDS The currently supported commands in .Nm are: .Pp .Bd -literal -offset indent -compact config get or set configuration of node at connect Connects hook of the node at to debug Get/set debugging verbosity level dot Produce a GraphViz (.dot) of the entire netgraph. help Show command summary or get more help on a specific command list Show information about all nodes mkpeer Create and connect a new node to the node at "path" msg Send a netgraph control message to the node at "path" name Assign name to the node at read Read and execute commands from a file rmhook Disconnect hook "hook" of the node at "path" show Show information about the node at shutdown Shutdown the node at status Get human readable status information from the node at types Show information about all installed node types write Send a data packet down the hook named by "hook". quit Exit program .Ed .Pp Some commands have aliases, e.g., .Dq ls is the same as .Dq list . The .Dq help command displays the available commands, their usage and aliases, and a brief description. .Sh EXIT STATUS .Ex -std .Sh SEE ALSO .Xr netgraph 3 , .Xr netgraph 4 , .Xr nghook 8 .Sh HISTORY The .Nm netgraph system was designed and first implemented at Whistle Communications, Inc.\& in a version of .Fx 2.2 customized for the Whistle InterJet. .Sh AUTHORS -.An Archie Cobbs Aq archie@whistle.com +.An Archie Cobbs Aq Mt archie@whistle.com Index: head/usr.sbin/nghook/nghook.8 =================================================================== --- head/usr.sbin/nghook/nghook.8 (revision 267667) +++ head/usr.sbin/nghook/nghook.8 (revision 267668) @@ -1,145 +1,145 @@ .\" Copyright (c) 1996-1999 Whistle Communications, Inc. .\" All rights reserved. .\" .\" Subject to the following obligations and disclaimer of warranty, use and .\" redistribution of this software, in source or object code forms, with or .\" without modifications are expressly permitted by Whistle Communications; .\" provided, however, that: .\" 1. Any and all reproductions of the source or object code must include the .\" copyright notice above and the following disclaimer of warranties; and .\" 2. No rights are granted, in any manner or form, to use Whistle .\" Communications, Inc. trademarks, including the mark "WHISTLE .\" COMMUNICATIONS" on advertising, endorsements, or otherwise except as .\" such appears in the above copyright notice or in the software. .\" .\" THIS SOFTWARE IS BEING PROVIDED BY WHISTLE COMMUNICATIONS "AS IS", AND .\" TO THE MAXIMUM EXTENT PERMITTED BY LAW, WHISTLE COMMUNICATIONS MAKES NO .\" REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING THIS SOFTWARE, .\" INCLUDING WITHOUT LIMITATION, ANY AND ALL IMPLIED WARRANTIES OF .\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. .\" WHISTLE COMMUNICATIONS DOES NOT WARRANT, GUARANTEE, OR MAKE ANY .\" REPRESENTATIONS REGARDING THE USE OF, OR THE RESULTS OF THE USE OF THIS .\" SOFTWARE IN TERMS OF ITS CORRECTNESS, ACCURACY, RELIABILITY OR OTHERWISE. .\" IN NO EVENT SHALL WHISTLE COMMUNICATIONS BE LIABLE FOR ANY DAMAGES .\" RESULTING FROM OR ARISING OUT OF ANY USE OF THIS SOFTWARE, INCLUDING .\" WITHOUT LIMITATION, ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, .\" PUNITIVE, OR CONSEQUENTIAL DAMAGES, PROCUREMENT OF SUBSTITUTE GOODS OR .\" SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER 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 WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY .\" OF SUCH DAMAGE. .\" .\" $FreeBSD$ .\" $Whistle: nghook.8,v 1.4 1999/01/20 03:19:45 archie Exp $ .\" .Dd October 24, 2003 .Dt NGHOOK 8 .Os .Sh NAME .Nm nghook .Nd connect to a .Xr netgraph 4 node .Sh SYNOPSIS .Nm .Op Fl adlnSs .Op Fl m Ar msg .Ar path .Op Ar hookname .Nm .Fl e .Op Fl n .Op Fl m Ar msg .Ar path .Ar hookname .Ar program .Op Ar args ... .Sh DESCRIPTION The .Nm utility creates a .Xr ng_socket 4 socket type node and connects it to hook .Ar hookname of the node found at .Ar path . If .Ar hookname is omitted, .Dq Li debug is assumed. .Pp If the .Fl e option is given, the third argument is interpreted as the path to a program, and this program is executed with the remaining arguments as its arguments. Before executing, the program Netgraph messages (specified by the .Fl m option) are sent to the node. The program is executed with its standard input (unless closed by .Fl n ) and output connected to the hook. .Pp If the .Fl e option is not given, all data written to standard input is sent to the node, and all data received from the node is relayed to standard output. Messages specified with .Fl m are sent to the node before the loop is entered. The .Nm utility exits when .Dv EOF is detected on standard input in this case. .Pp The options are as follows: .Bl -tag -width indent .It Fl a Output each packet read in human-readable decoded .Tn ASCII form instead of raw binary. .It Fl d Increase the debugging verbosity level. .It Fl e Execute the program specified by the third argument. .It Fl l Loops all received data back to the hook in addition to writing it to standard output. .It Fl m Ar msg Before executing the program (in .Fl e mode) send the given ASCII control message to the node. This option may be given more than once. .It Fl n Do not attempt to read any data from standard input. The .Nm utility will continue reading from the node until stopped by a signal. .It Fl S Use file descriptor 0 for output instead of the default 1. .It Fl s Use file descriptor 1 for input instead of the default 0. .El .Sh SEE ALSO .Xr netgraph 3 , .Xr netgraph 4 , .Xr ngctl 8 .Sh HISTORY The .Nm netgraph system was designed and first implemented at Whistle Communications, Inc.\& in a version of .Fx 2.2 customized for the Whistle InterJet. .Sh AUTHORS -.An Archie Cobbs Aq archie@whistle.com +.An Archie Cobbs Aq Mt archie@whistle.com .Sh BUGS Although all input is read in unbuffered mode, there is no way to control the packetization of the input. .Pp If the node sends a response to a message (specified by .Fl m ) , this response is lost. Index: head/usr.sbin/nscd/nscd.8 =================================================================== --- head/usr.sbin/nscd/nscd.8 (revision 267667) +++ head/usr.sbin/nscd/nscd.8 (revision 267668) @@ -1,165 +1,165 @@ .\" Copyright (c) 2005 Michael Bushkov .\" 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 October 20, 2005 .Dt NSCD 8 .Os .Sh NAME .Nm nscd .Nd "name service caching daemon" .Sh SYNOPSIS .Nm .Op Fl dnst .Op Fl i Ar cachename .Op Fl I Ar cachename .Sh DESCRIPTION The .Nm utility is the system caching daemon. It can cache almost all types of data and is basically intended to be used with the .Nm nsswitch subsystem. The cache is actually per-user. This means that each user can work only with the cached data that were cached by themselves, and cannot poison the cache of other users. The .Nm utility supports two types of caching: .Bl -tag -width ".Sy Type" .It Sy Type .Sy Description .It Common caching Each cached element is the key+value pair. This type of caching supports policies which are applied when maximum number of cached elements is exceeded. Three policies are available: .Cm FIFO (first in - first out), .Cm LRU (least recently used) and .Cm LFU (least frequently used). This type of caching is used with the .Fn getXXXbyname family of functions. .It Multipart caching Each cached element is the part of the elements sequence. This type of caching is intended to be used with the .Fn getXXXent family of functions. .El .Pp The .Nm utility is able not only to cache elements, but to perform the actual nsswitch lookups by itself. To enable this feature, use the .Va perform-actual-lookups parameter in .Xr nscd.conf 5 . .Pp The .Nm utility recognizes the following runtime options: .Bl -tag -width indent .\" .It Fl d .\" XXX Document me! .It Fl n Do not daemonize; .Nm will not fork or disconnect itself from the terminal. .It Fl s Single-threaded mode. Forces using only one thread for all processing purposes (it overrides the .Va threads parameter in the .Xr nscd.conf 5 file). .It Fl t Trace mode. All trace messages will be written to stdout. This mode is usually used with .Fl n and .Fl s flags are used for debugging purposes. .It Fl i Ar cachename Invalidates personal cache. When specified, .Nm acts as the administration tool. It asks the already running .Nm to invalidate the specified part of the cache of the calling user. For example, sometimes you may want to invalidate your .Dq Li hosts cache. You can specify .Dq Li all as the .Ar cachename to invalidate your personal cache as a whole. You cannot use this option for the .Ar cachename for which the .Va perform-actual-lookups option is enabled. .It Fl I Ar cachename Invalidates the cache for every user. When specified, .Nm acts as the administration tool. It asks the already running .Nm to invalidate the specified part of the cache for every user. You can specify .Dq Li all as the .Ar cachename to invalidate the whole cache. Only the root can use this option. .El .Sh FILES .Bl -tag -width ".Pa /etc/nscd.conf" -compact .It Pa /etc/nscd.conf The default configuration file. .El .Sh SEE ALSO .Xr nsdispatch 3 , .Xr nscd.conf 5 , .Xr nsswitch.conf 5 .Sh AUTHORS -.An Michael Bushkov Aq bushman@FreeBSD.org +.An Michael Bushkov Aq Mt bushman@FreeBSD.org .Sh BUGS Please send bug reports and suggestions to -.Aq bushman@FreeBSD.org . +.Aq Mt bushman@FreeBSD.org . Index: head/usr.sbin/nscd/nscd.conf.5 =================================================================== --- head/usr.sbin/nscd/nscd.conf.5 (revision 267667) +++ head/usr.sbin/nscd/nscd.conf.5 (revision 267668) @@ -1,159 +1,158 @@ .\" Copyright (c) 2005 Michael Bushkov .\" 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 30, 2006 .Dt NSCD.CONF 5 .Os .Sh NAME .Nm nscd.conf .Nd "nscd configuration file" .Sh DESCRIPTION The .Nm file is used by the .Xr nscd 8 daemon and is read on its startup. Its syntax is mostly similar to the .Pa nscd.conf syntax in .Tn Linux and .Tn Solaris . It has some differences, though \[em] see them below. .Pp Each line specifies either an attribute and a .Ar value , or an attribute, a .Ar cachename and a .Ar value . Usual cachenames are .Dq Li passwd , .Dq Li group , .Dq Li hosts , .Dq Li services , .Dq Li protocols and .Dq Li rpc . You can also use any other .Ar cachename (for example, if some third-party application uses nsswitch). .Bl -tag -width indent .It Va threads Op Ar value Number of threads, which would listen for connections and process requests. The minimum is 1. The default value is 8. .It Va enable-cache Oo Ar cachename Oc Op Cm yes | no Enables or disables the cache for specified .Ar cachename . .It Va positive-time-to-live Oo Ar cachename Oc Op Ar value Sets the TTL (time-to-live) for the specified cache in seconds. Larger values can increase system's performance, but they also can affect the cache coherence. The default value is 3600. .It Va positive-policy Oo Ar cachename Oc Op Cm fifo | lru | lfu The policy that is applied to erase some of the cache elements, when the size limit of the given .Ar cachename is exceeded. Possible policies are: .Cm fifo (first-in-first-out), .Cm lru (least-recently-used), and .Cm lfu (least-frequently-used). The default policy is .Cm lru . .It Va negative-time-to-live Oo Ar cachename Oc Op Ar value The TTL of the negative cached elements in seconds. The larger values can significantly increase system performance in some environments (when dealing with files with UIDs, which are not in system databases, for example). This number should be kept low to avoid the cache coherence problems. The default value is 60. .It Va negative-policy Oo Ar cachename Oc Op Cm fifo | lru | lfu The same as the positive-policy, but this one is applied to the negative elements of the given .Ar cachename . The default policy is fifo. .It Va negative-confidence-threshold Oo Ar cachename Oc Op Ar value The number of times a query must have failed before the cache accepts that the element can not be found. At the default value of 1 each negative query result is cached and immediately returned from the cache on further queries. Higher numbers cause queries to be retried at the configured data sources the given number of times, before the negative result is returned from the cache on further queries. This allows to probe for the existence of an entry, and then to create it if it did not exist, without the negative probe result preventing access to the new entry for the duration of the negative TTL. .It Va suggested-size Oo Ar cachename Oc Op Ar value This is the internal hash table size. The value should be a prime number for optimum performance. You should only change this value when the number of cached elements is significantly (5-10 times) greater than the default hash table size (257). .It Va keep-hot-count Oo Ar cachename Oc Op Ar value The size limit of the cache with the given .Ar cachename . When it is exceeded, the policy will be applied. The default value is 2048. .It Va perform-actual-lookups Oo Ar cachename Oc Op Cm yes | no If enabled, the .Xr nscd 8 does not simply receive and cache the NSS-requests results, but performs all the lookups by itself and only returns the responses. If this feature is enabled, then for the given .Ar cachename .Xr nscd 8 will act similarly to the NSCD. .Pp .Sy NOTE : this feature is currently experimental \[em] it supports only .Dq Li passwd , .Dq Li group and .Dq Li services cachenames. .El .Sh NOTES You can use the .Ql # symbol at the beginning of the line for comments. .Sh FILES .Bl -tag -width ".Pa /etc/nscd.conf" -compact .It Pa /etc/nscd.conf .El .Sh SEE ALSO .Xr nscd 8 .Sh AUTHORS -.An Michael Bushkov -.Aq bushman@FreeBSD.org +.An Michael Bushkov Aq Mt bushman@FreeBSD.org .Sh BUGS Please send bug reports and suggestions to -.Aq bushman@FreeBSD.org . +.Aq Mt bushman@FreeBSD.org . Index: head/usr.sbin/nvram/nvram.8 =================================================================== --- head/usr.sbin/nvram/nvram.8 (revision 267667) +++ head/usr.sbin/nvram/nvram.8 (revision 267668) @@ -1,118 +1,118 @@ .\"- .\" Copyright (c) 2006 Maxim Sobolev .\" 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 August 1, 2006 .Dt NVRAM 8 powerpc .Os .Sh NAME .Nm nvram .Nd "display or modify contents of the EEPROM or NVRAM" .Sh SYNOPSIS .Nm .Fl p .Nm .Oo Fl d Ar name Oc Ar ... .Op Ar name Ns = Ns Ar value ... .Sh DESCRIPTION The .Nm utility provides an interface for displaying and changing the system's configuration variables contained in EEPROM or NVRAM. In the first synopsis form, all available configuration variables and their current values are printed. In the second form, the variable selected by .Ar name is either removed or its value is changed to the .Ar value following by .Ql = sign. .Pp The following options are available: .Bl -tag -width indent .It Fl d Ar name Delete the variable selected by .Ar name from the EEPROM or NVRAM. The .Fl d flag can be specified multiple times, in which case multiple variables will be removed. .It Fl p Print all available configuration variables and their current values. .El .Sh EXAMPLES Print all available configuration variables and their current values: .Pp .Dl "nvram -p" .Pp Remove the variable named .Va local-mac-address? : .Pp .Dl "nvram -d local-mac-address\e?" .Pp Set the value of the .Va local-mac-address? variable to .Dq Li true : .Pp .Dl "nvram local-mac-address\e?=true" .Pp Note that the .Ql \e in the above examples is used to keep the shell from interpreting the .Ql \&? . .Pp Remove variables named .Va foo and .Va bar and set variable named .Va baz to .Dq Li 100 : .Pp .Dl "nvram -d foo -d bar baz=100" .Sh SEE ALSO .Xr powermac_nvram 4 , .Xr eeprom 8 .Sh HISTORY The .Nm utility first appeared in .Fx 7.0 . It is inspired by the Darwin/Mac OS X .Nm utility. .Sh AUTHORS -.An Maxim Sobolev Aq sobomax@FreeBSD.org +.An Maxim Sobolev Aq Mt sobomax@FreeBSD.org .Sh BUGS Currently, .Nm only supports systems equipped with AMD flash and is only tested on Apple G4-based Mac Mini machines. Index: head/usr.sbin/ofwdump/ofwdump.8 =================================================================== --- head/usr.sbin/ofwdump/ofwdump.8 (revision 267667) +++ head/usr.sbin/ofwdump/ofwdump.8 (revision 267668) @@ -1,107 +1,107 @@ .\" Copyright (c) 2002 by Thomas Moestl . .\" 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 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 October 18, 2002 .Dt OFWDUMP 8 .Os .Sh NAME .Nm ofwdump .Nd examine the Open Firmware device tree .Sh SYNOPSIS .Nm .Fl a .Op Fl p | P Ar property .Op Fl R | S .Nm .Op Fl p | P Ar property .Op Fl r .Op Fl R | S .Op Fl - .Ar nodes .Sh DESCRIPTION The .Nm utility is used to examine the Open Firmware device tree. In the first synopsis form, the complete device tree is printed; in the second form, only the selected .Ar nodes will be examined. .Pp The following options are available: .Bl -tag -width ".Fl P Ar property" .It Fl a Print the complete device tree. .It Fl p Print all available properties. .It Fl P Ar property Only print properties of the given name. .It Fl R Print properties in .Dq raw format, i.e., omit all headings and indentation and just write the property values unaltered to the standard output. This is intended to be used with the .Fl P option to extract the value of a single property. .It Fl S Print properties as strings; this is analogous to the .Fl R option, except that each property is only output to the first .Dv NUL character, and that newline is appended to each. .It Fl r Recursively print all children of the specified nodes. .El .Sh EXAMPLES Print the complete device tree: .Pp .Dl "ofwdump -a" .Pp Print the complete device subtree of the .Dq Li /pci node, including all available properties: .Pp .Dl "ofwdump -pr /pci" .Pp Print the .Dq Li compatible property of the .Dq Li /pci node as plain string: .Pp .Dl "ofwdump -P compatible -S /pci" .Sh SEE ALSO .Xr eeprom 8 .Sh HISTORY The .Nm utility first appeared in .Fx 5.0 . .Sh AUTHORS The .Nm utility was written by -.An Thomas Moestl Aq tmm@FreeBSD.org . +.An Thomas Moestl Aq Mt tmm@FreeBSD.org . Index: head/usr.sbin/pc-sysinstall/pc-sysinstall/pc-sysinstall.8 =================================================================== --- head/usr.sbin/pc-sysinstall/pc-sysinstall/pc-sysinstall.8 (revision 267667) +++ head/usr.sbin/pc-sysinstall/pc-sysinstall/pc-sysinstall.8 (revision 267668) @@ -1,120 +1,120 @@ .\" Copyright (c) 2010 .\" iXsystems, Inc. All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL Jordan Hubbard 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 June 24, 2010 .Dt PC-SYSINSTALL 8 .Os .Sh NAME .Nm pc-sysinstall .Nd System installer backend .Sh SYNOPSIS .Nm .Op Fl c Ar file .Op Ar command .Sh DESCRIPTION The .Nm utility is a hybrid backend for installing FreeBSD. When run in install mode it takes a configuration file and performs an installation according to the parameters specified in the configuration file. When called with one of the system query commands it provides information about the system to aid a front end in building an appropriate configuration file. .Pp The following options are available: .Bl -tag -width indent .It Fl c Ar file Perform an installation as directed by .Ar file. .El .Sh COMMANDS The .Cm command can be any one of the following: .Bl -tag -width indent .It help Display a list of all commands. .It help Ar command Display the help data for the specified command. .It disk-list Provide a listing of the storage devices detected on this system. .It disk-part Ar disk Queries the specified storage device and returns information about its partitions. .It disk-info Ar disk Returns information about a storage device's size, cylinders, heads, and sectors. .It detect-laptop Tests to see if this system is a laptop or desktop. .It detect-emulation Tests to see if this system is running in an emulator .It detect-nics Returns a listing of the detected network cards on this system. .It list-components Returns a listing of the available components which can be installed. .It list-rsync-backups Ar user Ar host Ar port Returns a listing of available rsync-backups on the target server in the life-preserver/ directory. .It list-tzones Returns a listing of available timezones. .It query-langs Returns a list of languages that the installer supports. .It sys-mem Returns the size of installed system RAM in MegaBytes. .It test-netup test if an internet connection is available. .It update-part-list Returns a list of PC-BSD and FreeBSD installs on this system for updates. .It xkeyboard-layouts Returns a list of keyboard layouts that xorg supports. .It xkeyboard-models Returns a list of keyboard models that xorg supports. .It xkeyboard-variants Returns a list of keyboard variants that xorg supports. .It create-part Ar disk Ar size Create a new MBR primary slice on the target disk using size MB. .It delete-part Ar partition Delete the disk partition specified. If this is the last partition, the disk partition layout will also be scrubbed, leaving a clean disk ready for MBR or GPT file system layouts. .It start-autoinstall Ar file Start an automated installation with the specified file. Normally only used by automated install scripts. .It setup-ssh-keys Ar user Ar host Ar port Setup SSH without a password for the target host, user, and port. Used to prompt the user to log into a server before doing a rsync + ssh restore. .El .Sh HISTORY This version of .Nm first appeared in .Fx 9.0 . .Sh AUTHORS -.An Kris Moore Aq kmoore@FreeBSD.org +.An Kris Moore Aq Mt kmoore@FreeBSD.org .Sh BUGS This utility was written to install PC-BSD and has seen limited use as an installer for FreeBSD. It's likely that usage to install FreeBSD will expose edge cases that PC-BSD doesn't, as well as generate feature requests based on unforeseen needs. Index: head/usr.sbin/periodic/periodic.8 =================================================================== --- head/usr.sbin/periodic/periodic.8 (revision 267667) +++ head/usr.sbin/periodic/periodic.8 (revision 267668) @@ -1,258 +1,258 @@ .\" Copyright (c) 1997 FreeBSD, Inc. .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL 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 30, 2007 .Dt PERIODIC 8 .Os .Sh NAME .Nm periodic .Nd run periodic system functions .Sh SYNOPSIS .Nm .Ar directory ... .Sh DESCRIPTION The .Nm utility is intended to be called by .Xr cron 8 to execute shell scripts located in the specified directory. .Pp One or more of the following arguments must be specified: .Bl -tag -width ".Pa monthly" .It Pa daily Perform the standard daily periodic executable run. This usually occurs early in the morning (local time). .It Pa weekly Perform the standard weekly periodic executable run. This usually occurs very early on Saturday mornings. .It Pa monthly Perform the standard monthly periodic executable run. This usually occurs on the first day of the month. .It Pa security Perform the standard daily security checks. This is usually spawned by the .Pa daily run. .It Ar path An arbitrary directory containing a set of executables to be run. .El .Pp If an argument is an absolute directory name it is used as is, otherwise it is searched for under .Pa /etc/periodic and any other directories specified by the .Va local_periodic setting in .Xr periodic.conf 5 (see below). .Pp The .Nm utility will run each executable file in the directory or directories specified. If a file does not have the executable bit set, it is silently ignored. .Pp Each script is required to exit with one of the following values: .Bl -tag -width 4n .It 0 The script has produced nothing notable in its output. The .Ao Ar basedir Ac Ns Va _show_success variable controls the masking of this output. .It 1 The script has produced some notable information in its output. The .Ao Ar basedir Ac Ns Va _show_info variable controls the masking of this output. .It 2 The script has produced some warnings due to invalid configuration settings. The .Ao Ar basedir Ac Ns Va _show_badconfig variable controls the masking of this output. .It >2 The script has produced output that must not be masked. .El .Pp If the relevant variable (where .Aq Ar basedir is the base directory in which the script resides) is set to .Dq Li NO in .Pa periodic.conf , .Nm will mask the script output. If the variable is not set to either .Dq Li YES or .Dq Li NO , it will be given a default value as described in .Xr periodic.conf 5 . .Pp All remaining script output is delivered based on the value of the .Ao Ar basedir Ac Ns Va _output setting. .Pp If this is set to a path name (beginning with a .Ql / character), output is simply logged to that file. .Xr newsyslog 8 knows about the files .Pa /var/log/daily.log , /var/log/weekly.log and .Pa /var/log/monthly.log , and if they exist, it will rotate them at the appropriate times. These are therefore good values if you wish to log .Nm output. .Pp If the .Ao Ar basedir Ac Ns Va _output value does not begin with a .Ql / and is not empty, it is assumed to contain a list of email addresses, and the output is mailed to them. If .Ao Ar basedir Ac Ns Va _show_empty_output is set to .Dq Li NO , then no mail will be sent if the output was empty. .Pp If .Ao Ar basedir Ac Ns Va _output is not set or is empty, output is sent to standard output. .Sh ENVIRONMENT The .Nm utility sets the .Ev PATH environment to include all standard system directories, but no additional directories, such as .Pa /usr/local/bin . If executables are added which depend upon other path components, each executable must be responsible for configuring its own appropriate environment. .Sh FILES .Bl -tag -width ".Pa /etc/defaults/periodic.conf" .It Pa /etc/crontab the .Nm utility is typically called via entries in the system default .Xr cron 8 table .It Pa /etc/periodic the top level directory containing .Pa daily , .Pa weekly , and .Pa monthly subdirectories which contain standard system periodic executables .It Pa /etc/defaults/periodic.conf the .Pa periodic.conf system registry contains variables that control the behaviour of .Nm and the standard .Pa daily , weekly , and .Pa monthly scripts .It Pa /etc/periodic.conf this file contains local overrides for the default .Nm configuration .El .Sh EXIT STATUS Exit status is 0 on success and 1 if the command fails. .Sh EXAMPLES The system crontab should have entries for .Nm similar to the following example: .Bd -literal -offset indent # do daily/weekly/monthly maintenance 0 2 * * * root periodic daily 0 3 * * 6 root periodic weekly 0 5 1 * * root periodic monthly .Ed .Pp The .Pa /etc/defaults/periodic.conf system registry will typically have a .Va local_periodic variable reading: .Pp .Dl local_periodic="/usr/local/etc/periodic" .Pp To log .Nm output instead of receiving it as email, add the following lines to .Pa /etc/periodic.conf : .Bd -literal -offset indent daily_output=/var/log/daily.log weekly_output=/var/log/weekly.log monthly_output=/var/log/monthly.log .Ed .Pp To only see important information from daily periodic jobs, add the following lines to .Pa /etc/periodic.conf : .Bd -literal -offset indent daily_show_success=NO daily_show_info=NO daily_show_badconfig=NO .Ed .Sh DIAGNOSTICS The command may fail for one of the following reasons: .Bl -diag .It usage: periodic No directory path argument was passed to .Nm to specify where the script fragments reside. .It not found Self explanatory. .El .Sh SEE ALSO .Xr sh 1 , .Xr crontab 5 , .Xr periodic.conf 5 , .Xr cron 8 , .Xr newsyslog 8 .Sh HISTORY The .Nm utility first appeared in .Fx 3.0 . .Sh AUTHORS -.An Paul Traina Aq pst@FreeBSD.org -.An Brian Somers Aq brian@Awfulhak.org +.An Paul Traina Aq Mt pst@FreeBSD.org +.An Brian Somers Aq Mt brian@Awfulhak.org .Sh BUGS Since one specifies information about a directory using shell variables containing the string, .Aq Ar basedir , .Aq Ar basedir must only contain characters that are valid within a .Xr sh 1 variable name, alphanumerics and underscores, and the first character may not be numeric. Index: head/usr.sbin/pmcannotate/pmcannotate.8 =================================================================== --- head/usr.sbin/pmcannotate/pmcannotate.8 (revision 267667) +++ head/usr.sbin/pmcannotate/pmcannotate.8 (revision 267668) @@ -1,109 +1,109 @@ .\" Copyright (c) 2008 Nokia Corporation .\" All rights reserved. .\" .\" This software was developed by Attilio Rao for the IPSO project under .\" contract to Nokia Corporation. .\" .\" 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 authors ``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 authors 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 20, 2008 .Dt PMCANNOTATE 8 .Os .Sh NAME .Nm pmcannotate .Nd "sources printout with inlined profiling" .Sh SYNOPSIS .Nm .Op Fl a .Op Fl h .Op Fl k Ar pathname .Op Fl l Ar level .Ar pmcout.out binaryobj .Sh DESCRIPTION The .Nm utility can produce both C sources or assembly sources of a program with a line-by-line based profiling. The profiling information is retrieved through a .Xr pmcstat 8 raw output while the program operations are retrieved through the .Xr objdump 1 tool. .Pp When calling .Nm the raw output is passed through the .Ar pmcout.out argument, while the program is passed through the .Ar binaryobj argument. .Pp As long as .Nm relies on .Xr objdump 1 and .Xr pmcstat 8 to work, it will fail if one of them is not available. .Sh OPTIONS The following options are available: .Bl -tag -width indent .It Fl a Shows the program profiling inlined in the assembly code only. No C information involving C sources is provided. .It Fl h Prints out information about the usage of the tool. .It Fl l Ar level Changes the lower bound (expressed in percentage) for traced functions that will be printed out in the report. The default value is 0.5%. .It Fl k Ar kerneldir Set the pathname of the kernel directory to argument .Ar kerneldir . This directory specifies where .Nm should look for the kernel and its modules. The default is .Pa /boot/kernel . .El .Sh LIMITATIONS As long as .Nm relies on the .Xr objdump 1 utility to retrieve the C code, the program needs to be compiled with debugging options. Sometimes, in particular with heavy optimization levels, the .Xr objdump 1 utility embeds the code of inlining functions directly in the callers, making an output difficult to read. The x86 version reports the sampling from pmcstat collecting the following instruction in regard of the interrupted one. This means that the samples may be attributed to the line below the one of interest. .Sh SEE ALSO .Xr objdump 1 , .Xr pmcstat 8 .Sh AUTHORS -.An Attilio Rao Aq attilio@FreeBSD.org +.An Attilio Rao Aq Mt attilio@FreeBSD.org Index: head/usr.sbin/pmccontrol/pmccontrol.8 =================================================================== --- head/usr.sbin/pmccontrol/pmccontrol.8 (revision 267667) +++ head/usr.sbin/pmccontrol/pmccontrol.8 (revision 267668) @@ -1,127 +1,127 @@ .\" Copyright (c) 2003,2008 Joseph Koshy. 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 Joseph Koshy ``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 Joseph Koshy be liable .\" for any direct, indirect, incidental, special, exemplary, or consequential .\" damages (including, but not limited to, procurement of substitute goods .\" or services; loss of use, data, or profits; or business interruption) .\" however caused and on any theory of liability, whether in contract, strict .\" liability, or tort (including negligence or otherwise) arising in any way .\" out of the use of this software, even if advised of the possibility of .\" such damage. .\" .\" $FreeBSD$ .\" .Dd November 9, 2008 .Dt PMCCONTROL 8 .Os .Sh NAME .Nm pmccontrol .Nd "control hardware performance monitoring counters" .Sh SYNOPSIS .Nm .Oo Fl c Ar cpu | Fl d Ar pmc | Fl e Ar pmc Oc ... .Nm .Fl l .Nm .Fl L .Nm .Fl s .Sh DESCRIPTION The .Nm utility controls the operation of the system's hardware performance monitoring counters. .Sh OPTIONS The .Nm utility processes options in command line order, so later options modify the effect of earlier ones. The following options are available: .Bl -tag -width indent .It Fl c Ar cpu Subsequent enable and disable options affect the CPU denoted by argument .Ar cpu . The argument .Ar cpu is a number denoting a CPU in the system, or .Dq Li * , denoting all unhalted CPUs in the system. .It Fl d Ar pmc Disable PMC number .Ar pmc on the CPU specified by .Fl c , preventing it from being used till subsequently re-enabled. The argument .Ar pmc is a number denoting a specific PMC, or .Dq Li * denoting all the PMCs on the specified CPU. .Pp Only idle PMCs may be disabled. .\" XXX this probably needs to be fixed. .It Fl e Ar pmc Enable PMC number .Ar pmc , on the CPU specified by .Fl c , allowing it to be used in the future. The argument .Ar pmc is a number denoting a specific PMC, or .Dq Li * denoting all the PMCs on the specified CPU. If PMC .Ar pmc is already enabled, this option has no effect. .It Fl l List available hardware performance counters and their current disposition. .It Fl L List available hardware performance counter classes and their supported event names. .It Fl s Print driver statistics maintained by .Xr hwpmc 4 . .El .Sh EXAMPLES To disable all PMCs on all CPUs, use the command: .Dl "pmccontrol -d*" .Pp To enable all PMCs on all CPUs, use: .Dl "pmccontrol -e*" .Pp To disable PMCs 0 and 1 on CPU 2, use: .Dl "pmccontrol -c2 -d0 -d1" .Pp To disable PMC 0 of CPU 0 only, and enable all other PMCS on all other CPUs, use: .Dl "pmccontrol -c* -e* -c0 -d0" .Sh DIAGNOSTICS .Ex -std .Sh SEE ALSO .Xr pmc 3 , .Xr pmclog 3 , .Xr hwpmc 4 , .Xr pmcstat 8 , .Xr sysctl 8 .Sh HISTORY The .Nm utility first appeared in .Fx 6.0 . .Sh AUTHORS -.An Joseph Koshy Aq jkoshy@FreeBSD.org +.An Joseph Koshy Aq Mt jkoshy@FreeBSD.org Index: head/usr.sbin/pmcstat/pmcstat.8 =================================================================== --- head/usr.sbin/pmcstat/pmcstat.8 (revision 267667) +++ head/usr.sbin/pmcstat/pmcstat.8 (revision 267668) @@ -1,480 +1,480 @@ .\" Copyright (c) 2003-2008 Joseph Koshy .\" Copyright (c) 2007 The 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 Joseph Koshy ``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 Joseph Koshy 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 16, 2014 .Dt PMCSTAT 8 .Os .Sh NAME .Nm pmcstat .Nd "performance measurement with performance monitoring hardware" .Sh SYNOPSIS .Nm .Op Fl C .Op Fl D Ar pathname .Op Fl E .Op Fl F Ar pathname .Op Fl G Ar pathname .Op Fl M Ar mapfilename .Op Fl N .Op Fl O Ar logfilename .Op Fl P Ar event-spec .Op Fl R Ar logfilename .Op Fl S Ar event-spec .Op Fl T .Op Fl W .Op Fl a Ar pathname .Op Fl c Ar cpu-spec .Op Fl d .Op Fl f Ar pluginopt .Op Fl g .Op Fl k Ar kerneldir .Op Fl l Ar secs .Op Fl m Ar pathname .Op Fl n Ar rate .Op Fl o Ar outputfile .Op Fl p Ar event-spec .Op Fl q .Op Fl r Ar fsroot .Op Fl s Ar event-spec .Op Fl t Ar process-spec .Op Fl v .Op Fl w Ar secs .Op Fl z Ar graphdepth .Op Ar command Op Ar args .Sh DESCRIPTION The .Nm utility measures system performance using the facilities provided by .Xr hwpmc 4 . .Pp The .Nm utility can measure both hardware events seen by the system as a whole, and those seen when a specified set of processes are executing on the system's CPUs. If a specific set of processes is being targeted (for example, if the .Fl t Ar process-spec option is specified, or if a command line is specified using .Ar command ) , then measurement occurs till .Ar command exits, or till all target processes specified by the .Fl t Ar process-spec options exit, or till the .Nm utility is interrupted by the user. If a specific set of processes is not targeted for measurement, then .Nm will perform system-wide measurements till interrupted by the user. .Pp A given invocation of .Nm can mix allocations of system-mode and process-mode PMCs, of both counting and sampling flavors. The values of all counting PMCs are printed in human readable form at regular intervals by .Nm . The output of sampling PMCs may be configured to go to a log file for subsequent offline analysis, or, at the expense of greater overhead, may be configured to be printed in text form on the fly. .Pp Hardware events to measure are specified to .Nm using event specifier strings .Ar event-spec . The syntax of these event specifiers is machine dependent and is documented in .Xr pmc 3 . .Pp A process-mode PMC may be configured to be inheritable by the target process' current and future children. .Sh OPTIONS The following options are available: .Bl -tag -width indent .It Fl C Toggle between showing cumulative or incremental counts for subsequent counting mode PMCs specified on the command line. The default is to show incremental counts. .It Fl D Ar pathname Create files with per-program samples in the directory named by .Ar pathname . The default is to create these files in the current directory. .It Fl E Toggle showing per-process counts at the time a tracked process exits for subsequent process-mode PMCs specified on the command line. This option is useful for mapping the performance characteristics of a complex pipeline of processes when used in conjunction with the .Fl d option. The default is to not to enable per-process tracking. .It Fl F Ar pathname Print calltree (Kcachegrind) information to file .Ar pathname . If argument .Ar pathname is a .Dq Li - this information is sent to the output file specified by the .Fl o option. .It Fl G Ar pathname Print callchain information to file .Ar pathname . If argument .Ar pathname is a .Dq Li - this information is sent to the output file specified by the .Fl o option. .It Fl M Ar mapfilename Write the mapping between executable objects encountered in the event log and the abbreviated pathnames used for .Xr gprof 1 profiles to file .Ar mapfilename . If this option is not specified, mapping information is not written. Argument .Ar mapfilename may be a .Dq Li - in which case this mapping information is sent to the output file configured by the .Fl o option. .It Fl N Toggle capturing callchain information for subsequent sampling PMCs. The default is for sampling PMCs to capture callchain information. .It Fl O Ar logfilename Send logging output to file .Ar logfilename . If .Ar logfilename is of the form .Ar hostname Ns : Ns Ar port , where .Ar hostname does not start with a .Ql \&. or a .Ql / , then .Nm will open a network socket to host .Ar hostname on port .Ar port . .Pp If the .Fl O option is not specified and one of the logging options is requested, then .Nm will print a textual form of the logged events to the configured output file. .It Fl P Ar event-spec Allocate a process mode sampling PMC measuring hardware events specified in .Ar event-spec . .It Fl R Ar logfilename Perform offline analysis using sampling data in file .Ar logfilename . .It Fl S Ar event-spec Allocate a system mode sampling PMC measuring hardware events specified in .Ar event-spec . .It Fl T Use a top like mode for sampling PMCs. The following hotkeys can be used: 'c+a' switch to accumulative mode, 'c+d' switch to delta mode, 'm' merge PMCs, 'n' change view, 'p' show next PMC, ' ' pause, 'q' quit. calltree only: 'f' cost under threshold is seen as a dot. .It Fl W Toggle logging the incremental counts seen by the threads of a tracked process each time they are scheduled on a CPU. This is an experimental feature intended to help analyse the dynamic behaviour of processes in the system. It may incur substantial overhead if enabled. The default is for this feature to be disabled. .It Fl a Ar pathname Perform a symbol and file:line lookup for each address in each callgraph and save the output to .Ar pathname . Unlike .Fl m that only resolves the first symbol in the graph, this resolves every node in the callgraph, or prints out addresses if no lookup information is available. This option requires the .Fl R option to read in samples that were previously collected and saved with the .Fl o option. .It Fl c Ar cpu-spec Set the cpus for subsequent system mode PMCs specified on the command line to .Ar cpu-spec . Argument .Ar cpu-spec is a comma separated list of CPU numbers, or the literal .Sq * denoting all unhalted CPUs. The default is to allocate system mode PMCs on all unhalted CPUs. .It Fl d Toggle between process mode PMCs measuring events for the target process' current and future children or only measuring events for the target process. The default is to measure events for the target process alone. .It Fl f Ar pluginopt Pass option string to the active plugin. .br threshold= do not display cost under specified value (Top). .br skiplink=0|1 replace node with cost under threshold by a dot (Top). .It Fl g Produce profiles in a format compatible with .Xr gprof 1 . A separate profile file is generated for each executable object encountered. Profile files are placed in sub-directories named by their PMC event name. .It Fl k Ar kerneldir Set the pathname of the kernel directory to argument .Ar kerneldir . This directory specifies where .Nm should look for the kernel and its modules. The default is .Pa /boot/kernel . .It Fl l Ar secs Set system-wide performance measurement duration for .Ar secs seconds. The argument .Ar secs may be a fractional value. .It Fl m Ar pathname Print the sampled PCs with the name, the start and ending addresses of the function within they live. The .Ar pathname argument is mandatory and indicates where the information will be stored. If argument .Ar pathname is a .Dq Li - this information is sent to the output file specified by the .Fl o option. .It Fl n Ar rate Set the default sampling rate for subsequent sampling mode PMCs specified on the command line. The default is to configure PMCs to sample the CPU's instruction pointer every 65536 events. .It Fl o Ar outputfile Send counter readings and textual representations of logged data to file .Ar outputfile . The default is to send output to .Pa stderr when collecting live data and to .Pa stdout when processing a pre-existing logfile. .It Fl p Ar event-spec Allocate a process mode counting PMC measuring hardware events specified in .Ar event-spec . .It Fl q Decrease verbosity. .It Fl r Ar fsroot Set the top of the filesystem hierarchy under which executables are located to argument .Ar fsroot . The default is .Pa / . .It Fl s Ar event-spec Allocate a system mode counting PMC measuring hardware events specified in .Ar event-spec . .It Fl t Ar process-spec Attach process mode PMCs to the processes named by argument .Ar process-spec . Argument .Ar process-spec may be a non-negative integer denoting a specific process id, or a regular expression for selecting processes based on their command names. .It Fl v Increase verbosity. .It Fl w Ar secs Print the values of all counting mode PMCs or sampling mode PMCs for top mode every .Ar secs seconds. The argument .Ar secs may be a fractional value. The default interval is 5 seconds. .It Fl z Ar graphdepth When printing system-wide callgraphs, limit callgraphs to the depth specified by argument .Ar graphdepth . .El .Pp If .Ar command is specified, it is executed using .Xr execvp 3 . .Sh EXAMPLES To perform system-wide statistical sampling on an AMD Athlon CPU with samples taken every 32768 instruction retirals and data being sampled to file .Pa sample.stat , use: .Dl "pmcstat -O sample.stat -n 32768 -S k7-retired-instructions" .Pp To execute .Nm firefox and measure the number of data cache misses suffered by it and its children every 12 seconds on an AMD Athlon, use: .Dl "pmcstat -d -w 12 -p k7-dc-misses firefox" .Pp To measure instructions retired for all processes named .Dq emacs use: .Dl "pmcstat -t '^emacs$' -p instructions" .Pp To measure instructions retired for processes named .Dq emacs for a period of 10 seconds use: .Dl "pmcstat -t '^emacs$' -p instructions sleep 10" .Pp To count instruction tlb-misses on CPUs 0 and 2 on a Intel Pentium Pro/Pentium III SMP system use: .Dl "pmcstat -c 0,2 -s p6-itlb-miss" .Pp To collect profiling information for a specific process with pid 1234 based on instruction cache misses seen by it use: .Dl "pmcstat -P ic-misses -t 1234 -O /tmp/sample.out" .Pp To perform system-wide sampling on all configured processors based on processor instructions retired use: .Dl "pmcstat -S instructions -O /tmp/sample.out" If callgraph capture is not desired use: .Dl "pmcstat -N -S instructions -O /tmp/sample.out" .Pp To send the generated event log to a remote machine use: .Dl "pmcstat -S instructions -O remotehost:port" On the remote machine, the sample log can be collected using .Xr nc 1 : .Dl "nc -l remotehost port > /tmp/sample.out" .Pp To generate .Xr gprof 1 compatible profiles from a sample file use: .Dl "pmcstat -R /tmp/sample.out -g" .Pp To print a system-wide profile with callgraphs to file .Pa "foo.graph" use: .Dl "pmcstat -R /tmp/sample.out -G foo.graph" .Sh DIAGNOSTICS If option .Fl v is specified, .Nm may issue the following diagnostic messages: .Bl -diag .It "#callchain/dubious-frames" The number of callchain records that had an .Dq impossible value for a return address. .It "#exec handling errors" The number of .Xr exec 2 events in the log file that named executables that could not be analyzed. .It "#exec/elf" The number of .Xr exec 2 events that named ELF executables. .It "#exec/unknown" The number of .Xr exec 2 events that named executables with unrecognized formats. .It "#samples/total" The total number of samples in the log file. .It "#samples/unclaimed" The number of samples that could not be correlated to a known executable object (i.e., to an executable, shared library, the kernel or the runtime loader). .It "#samples/unknown-object" The number of samples that were associated with an executable with an unrecognized object format. .El .Pp .Ex -std .Sh COMPATIBILITY Due to the limitations of the .Pa gmon.out file format, .Xr gprof 1 compatible profiles generated by the .Fl g option do not contain information about calls that cross executable boundaries. The generated .Pa gmon.out files are also only meaningful for native executables. .Sh SEE ALSO .Xr gprof 1 , .Xr nc 1 , .Xr execvp 3 , .Xr pmc 3 , .Xr pmclog 3 , .Xr hwpmc 4 , .Xr pmccontrol 8 , .Xr sysctl 8 .Sh HISTORY The .Nm utility first appeared in .Fx 6.0 . It is .Ud .Sh AUTHORS -.An Joseph Koshy Aq jkoshy@FreeBSD.org +.An Joseph Koshy Aq Mt jkoshy@FreeBSD.org .Sh BUGS The .Nm utility cannot yet analyse .Xr hwpmc 4 logs generated by non-native architectures. Index: head/usr.sbin/portsnap/portsnap/portsnap.8 =================================================================== --- head/usr.sbin/portsnap/portsnap/portsnap.8 (revision 267667) +++ head/usr.sbin/portsnap/portsnap/portsnap.8 (revision 267668) @@ -1,277 +1,277 @@ .\"- .\" Copyright 2004-2005 Colin Percival .\" All rights reserved .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted providing 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 October 22, 2013 .Dt PORTSNAP 8 .Os FreeBSD .Sh NAME .Nm portsnap .Nd fetch and extract compressed snapshots of the ports tree .Sh SYNOPSIS .Nm .Op Fl I .Op Fl d Ar workdir .Op Fl f Ar conffile .Op Fl k Ar KEY .Op Fl l Ar descfile .Op Fl p Ar portsdir .Op Fl s Ar server .Cm command ... .Op Ar path .Sh DESCRIPTION The .Nm tool is used to fetch and update compressed snapshots of the .Fx ports tree, and extract and update an uncompressed ports tree. .Pp In a normal update operation, .Nm will routinely restore modified files to their unmodified state and delete unrecognized local files. .Sh OPTIONS The following options are supported: .Bl -tag -width "-f conffile" .It Fl d Ar workdir Store working files (e.g.\& downloaded updates) in .Ar workdir . (default: .Pa /var/db/portsnap , or as given in the configuration file.) .It Fl f Ar conffile Read the configuration from .Ar conffile . (default: .Pa /etc/portsnap.conf ) .It Fl I For the .Cm update command, update INDEX files, but not the rest of the ports tree. .It Fl k Ar KEY Expect a public key with given SHA256 hash. (default: read value from configuration file.) .It Fl l Ar descfile Merge the specified local describes file into the INDEX files being built. The .Ar descfile should be generated by running .Cm make describe in each of the local port directories. .It Fl p Ar portsdir When extracting or updating an uncompressed snapshot, operate on the directory .Ar portsdir . (default: .Pa /usr/ports/ , or as given in the configuration file.) .It Fl s Ar server Fetch files from the specified server or server pool. (default: portsnap.FreeBSD.org, or as given in the configuration file.) .It path For .Cm extract command only, operate only on parts of the ports tree starting with .Ar path . (e.g.\& .Nm .Cm extract .Ar sysutils/port would extract sysutils/portsman, sysutils/portsnap, sysutils/portupgrade, etc.) .It Fl Fl interactive override auto-detection of calling process. Only use this when calling portsnap from an .Sy interactive, non-terminal application. (Cron jobs are particularly bad since they cause load spikes on the Portsnap mirrors.) .El .Sh COMMANDS The .Cm command can be any one of the following: .Bl -tag -width "-f conffile" .It fetch Fetch a compressed snapshot of the ports tree, or update the existing snapshot. This command should only be used interactively; for non-interactive use, you should use the .Cm cron command. .It cron Sleep a random amount of time between 1 and 3600 seconds, then operate as if the .Cm fetch command was specified. As the name suggests, this command is designed for running from .Xr cron 8 ; the random delay serves to minimize the probability that a large number of machines will simultaneously attempt to fetch updates. .It extract Extract a ports tree, replacing existing files and directories. NOTE: This will remove anything occupying the location where files or directories are being extracted; in particular, any changes made locally to the ports tree (for example, adding new patches) will be silently obliterated. .Pp Only run this command to initialize your portsnap-maintained ports tree for the first time, if you wish to start over with a clean, completely unmodified tree, or if you wish to extract a specific part of the tree (using the .Ar path option). .It update Update a ports tree extracted using the .Cm extract command. You must run this command to apply changes to your ports tree after downloading updates via the .Cm fetch or .Cm cron commands. Again, note that in the parts of the ports tree which are being updated, any local changes or additions will be removed. .It auto Run .Cm fetch or .Cm cron depending on whether stdin is a terminal; then run .Cm update or .Cm extract depending on whether .Ar portsdir exists. .El .Sh TIPS .Bl -bullet .It If your clock is set to local time, adding the line .Pp .Dl 0 3 * * * root /usr/sbin/portsnap cron .Pp to .Pa /etc/crontab is a good way to make sure you always have an up-to-date snapshot of the ports tree available which can quickly be extracted into .Pa /usr/ports . If your clock is set to UTC, please pick a random time other than 3AM, to avoid overly imposing an uneven load on the server(s) hosting the snapshots. .Pp Note that running .Nm .Cm cron or .Nm .Cm fetch does not apply the changes that were received: they only download them. To apply the changes, you must follow these commands with .Nm .Cm update . The .Nm .Cm update command is normally run by hand at a time when you are sure that no one is manually working in the ports tree. .It Running .Nm .Cm update from .Xr cron 8 is a bad idea -- if you are ever installing or updating a port at the time the cron job runs, you will probably end up in a mess when .Nm updates or removes files which are being used by the port build. However, running .Nm .Fl I .Cm update is probably safe, and can be used together with .Xr portversion 1 to identify installed software which is out of date. .It If you wish to use .Nm to keep a large number of machines up to date, you may wish to set up a caching HTTP proxy. Since .Nm uses .Xr fetch 1 to download updates, setting the .Ev HTTP_PROXY environment variable will direct it to fetch updates from the given proxy. This is much more efficient than .Em mirroring the files on the portsnap server, since the vast majority of files are not needed by any particular client. .El .Sh PRIVACY NOTICE As an unavoidable part of its operation, a machine running .Nm will make its public IP address and the list of files it fetches available to the server from which it fetches updates. Using these it may be possible to recognize a machine over an extended period of time, determine when it is updated, and identify which portions of the FreeBSD ports tree, if any, are being ignored using "REFUSE" directives in .Pa portsnap.conf . In addition, the FreeBSD release level is transmitted to the server. .Pp Statistical data generated from information collected in this manner may be published, but only in aggregate and after anonymizing the individual systems. .Sh FILES .Bl -tag -width "/etc/portsnap.conf" .It Pa /etc/portsnap.conf Default location of the portsnap configuration file. .It Pa /var/db/portsnap Default location where compressed snapshots are stored. .It Pa /usr/ports Default location where the ports tree is extracted. .El .Sh SEE ALSO .Xr fetch 1 , .Xr sha256 1 , .Xr fetch 3 , .Xr portsnap.conf 5 .Sh AUTHORS -.An Colin Percival Aq cperciva@FreeBSD.org +.An Colin Percival Aq Mt cperciva@FreeBSD.org Index: head/usr.sbin/ppp/ppp.8 =================================================================== --- head/usr.sbin/ppp/ppp.8 (revision 267667) +++ head/usr.sbin/ppp/ppp.8 (revision 267668) @@ -1,6079 +1,6079 @@ .\" .\" Copyright (c) 2001 Brian Somers .\" 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 PPP 8 .Os .Sh NAME .Nm ppp .Nd Point to Point Protocol (a.k.a. user-ppp) .Sh SYNOPSIS .Nm .Op Fl Va mode .Op Fl nat .Op Fl quiet .Op Fl unit Ns Ar N .Op Ar system ... .Sh DESCRIPTION This is a user process .Em PPP software package. Sometimes, .Em PPP is implemented as a part of the kernel (e.g., as managed by .Nm pppd ) and it is thus somewhat hard to debug and/or modify its behaviour. However, in this implementation .Em PPP is done as a user process with the help of the tunnel device driver (tun). .Pp The .Fl nat flag does the equivalent of a .Dq nat enable yes , enabling .Nm Ns No 's network address translation features. This allows .Nm to act as a NAT or masquerading engine for all machines on an internal LAN. Refer to .Xr libalias 3 for details on the technical side of the NAT engine. Refer to the .Sx NETWORK ADDRESS TRANSLATION (PACKET ALIASING) section of this manual page for details on how to configure NAT in .Nm . .Pp The .Fl quiet flag tells .Nm to be silent at startup rather than displaying the mode and interface to standard output. .Pp The .Fl unit flag tells .Nm to only attempt to open .Pa /dev/tun Ns Ar N . Normally, .Nm will start with a value of 0 for .Ar N , and keep trying to open a tunnel device by incrementing the value of .Ar N by one each time until it succeeds. If it fails three times in a row because the device file is missing, it gives up. .Pp The following .Va mode Ns No s are understood by .Nm : .Bl -tag -width XXX -offset XXX .It Fl auto .Nm opens the tun interface, configures it then goes into the background. The link is not brought up until outgoing data is detected on the tun interface at which point .Nm attempts to bring up the link. Packets received (including the first one) while .Nm is trying to bring the link up will remain queued for a default of 2 minutes. See the .Dq set choked command below. .Pp In .Fl auto mode, at least one .Dq system must be given on the command line (see below) and a .Dq set ifaddr must be done in the system profile that specifies a peer IP address to use when configuring the interface. Something like .Dq 10.0.0.1/0 is usually appropriate. See the .Dq pmdemand system in .Pa /usr/share/examples/ppp/ppp.conf.sample for an example. .It Fl background Here, .Nm attempts to establish a connection with the peer immediately. If it succeeds, .Nm goes into the background and the parent process returns an exit code of 0. If it fails, .Nm exits with a non-zero result. .It Fl foreground In foreground mode, .Nm attempts to establish a connection with the peer immediately, but never becomes a daemon. The link is created in background mode. This is useful if you wish to control .Nm Ns No 's invocation from another process. .It Fl direct This is used for communicating over an already established connection, usually when receiving incoming connections accepted by .Xr getty 8 . .Nm ignores the .Dq set device line and uses descriptor 0 as the link. .Nm will also ignore any configured chat scripts unless the .Dq force-scripts option has been enabled. .Pp If callback is configured, .Nm will use the .Dq set device information when dialing back. .Pp When run in .Fl direct mode, .Nm will behave slightly differently if descriptor 0 was created by .Xr pipe 2 . As pipes are not bi-directional, ppp will redirect all writes to descriptor 1 (standard output), leaving only reads acting on descriptor 0. No special action is taken if descriptor 0 was created by .Xr socketpair 2 . .It Fl dedicated This option is designed for machines connected with a dedicated wire. .Nm will always keep the device open and will ignore any configured chat scripts unless the .Dq force-scripts option has been enabled. .It Fl ddial This mode is equivalent to .Fl auto mode except that .Nm will bring the link back up any time it is dropped for any reason. .It Fl interactive This is a no-op, and gives the same behaviour as if none of the above modes have been specified. .Nm loads any sections specified on the command line then provides an interactive prompt. .El .Pp One or more configuration entries or systems (as specified in .Pa /etc/ppp/ppp.conf ) may also be specified on the command line. .Nm will read the .Dq default system from .Pa /etc/ppp/ppp.conf at startup, followed by each of the systems specified on the command line. .Sh Major Features .Bl -diag .It Provides an interactive user interface. Using its command mode, the user can easily enter commands to establish the connection with the remote end, check the status of connection and close the connection. All functions can also be optionally password protected for security. .It Supports both manual and automatic dialing. Interactive mode has a .Dq term command which enables you to talk to the device directly. When you are connected to the remote peer and it starts to talk .Em PPP , .Nm detects it and switches to packet mode automatically. Once you have determined the proper sequence for connecting with the remote host, you can write a chat script to {define} the necessary dialing and login procedure for later convenience. .It Supports on-demand dialup capability. By using .Fl auto mode, .Nm will act as a daemon and wait for a packet to be sent over the .Em PPP link. When this happens, the daemon automatically dials and establishes the connection. In almost the same manner .Fl ddial mode (direct-dial mode) also automatically dials and establishes the connection. However, it differs in that it will dial the remote site any time it detects the link is down, even if there are no packets to be sent. This mode is useful for full-time connections where we worry less about line charges and more about being connected full time. A third .Fl dedicated mode is also available. This mode is targeted at a dedicated link between two machines. .Nm will never voluntarily quit from dedicated mode - you must send it the .Dq quit all command via its diagnostic socket. A .Dv SIGHUP will force an LCP renegotiation, and a .Dv SIGTERM will force it to exit. .It Supports client callback. .Nm can use either the standard LCP callback protocol or the Microsoft CallBack Control Protocol (ftp://ftp.microsoft.com/developr/rfc/cbcp.txt). .It Supports NAT or packet aliasing. Packet aliasing (a.k.a.\& IP masquerading) allows computers on a private, unregistered network to access the Internet. The .Em PPP host acts as a masquerading gateway. IP addresses as well as TCP and UDP port numbers are NAT'd for outgoing packets and de-NAT'd for returning packets. .It Supports background PPP connections. In background mode, if .Nm successfully establishes the connection, it will become a daemon. Otherwise, it will exit with an error. This allows the setup of scripts that wish to execute certain commands only if the connection is successfully established. .It Supports server-side PPP connections. In direct mode, .Nm acts as server which accepts incoming .Em PPP connections on stdin/stdout. .It Supports PAP and CHAP (rfc 1994, 2433 and 2759) authentication. With PAP or CHAP, it is possible to skip the Unix style .Xr login 1 procedure, and use the .Em PPP protocol for authentication instead. If the peer requests Microsoft CHAP authentication and .Nm is compiled with DES support, an appropriate MD4/DES response will be made. .It Supports RADIUS (rfc 2138 & 2548) authentication. An extension to PAP and CHAP, .Em \&R Ns No emote .Em \&A Ns No ccess .Em \&D Ns No ial .Em \&I Ns No n .Em \&U Ns No ser .Em \&S Ns No ervice allows authentication information to be stored in a central or distributed database along with various per-user framed connection characteristics. If .Xr libradius 3 is available at compile time, .Nm will use it to make .Em RADIUS requests when configured to do so. .It Supports Proxy Arp. .Nm can be configured to make one or more proxy arp entries on behalf of the peer. This allows routing from the peer to the LAN without configuring each machine on that LAN. .It Supports packet filtering. User can {define} four kinds of filters: the .Em in filter for incoming packets, the .Em out filter for outgoing packets, the .Em dial filter to {define} a dialing trigger packet and the .Em alive filter for keeping a connection alive with the trigger packet. .It Tunnel driver supports bpf. The user can use .Xr tcpdump 1 to check the packet flow over the .Em PPP link. .It Supports PPP over TCP and PPP over UDP. If a device name is specified as .Em host Ns No : Ns Em port Ns .Xo .Op / Ns tcp|udp , .Xc .Nm will open a TCP or UDP connection for transporting data rather than using a conventional serial device. UDP connections force .Nm into synchronous mode. .It Supports PPP over Ethernet (rfc 2516). If .Nm is given a device specification of the format .No PPPoE: Ns Ar iface Ns Xo .Op \&: Ns Ar provider Ns .Xc and if .Xr netgraph 4 is available, .Nm will attempt talk .Em PPP over Ethernet to .Ar provider using the .Ar iface network interface. .Pp On systems that do not support .Xr netgraph 4 , an external program such as .Xr pppoed 8 may be used. .It "Supports IETF draft Predictor-1 (rfc 1978) and DEFLATE (rfc 1979) compression." .Nm supports not only VJ-compression but also Predictor-1 and DEFLATE compression. Normally, a modem has built-in compression (e.g., v42.bis) and the system may receive higher data rates from it as a result of such compression. While this is generally a good thing in most other situations, this higher speed data imposes a penalty on the system by increasing the number of serial interrupts the system has to process in talking to the modem and also increases latency. Unlike VJ-compression, Predictor-1 and DEFLATE compression pre-compresses .Em all network traffic flowing through the link, thus reducing overheads to a minimum. .It Supports Microsoft's IPCP extensions (rfc 1877). Name Server Addresses and NetBIOS Name Server Addresses can be negotiated with clients using the Microsoft .Em PPP stack (i.e., Win95, WinNT) .It Supports Multi-link PPP (rfc 1990) It is possible to configure .Nm to open more than one physical connection to the peer, combining the bandwidth of all links for better throughput. .It Supports MPPE (draft-ietf-pppext-mppe) MPPE is Microsoft Point to Point Encryption scheme. It is possible to configure .Nm to participate in Microsoft's Windows VPN. For now, .Nm can only get encryption keys from CHAP 81 authentication. .Nm must be compiled with DES for MPPE to operate. .It Supports IPV6CP (rfc 2023). An IPv6 connection can be made in addition to or instead of the normal IPv4 connection. .El .Sh PERMISSIONS .Nm is installed as user .Dv root and group .Dv network , with permissions .Dv 04554 . By default, .Nm will not run if the invoking user id is not zero. This may be overridden by using the .Dq allow users command in .Pa /etc/ppp/ppp.conf . When running as a normal user, .Nm switches to user id 0 in order to alter the system routing table, set up system lock files and read the ppp configuration files. All external commands (executed via the "shell" or "!bg" commands) are executed as the user id that invoked .Nm . Refer to the .Sq ID0 logging facility if you are interested in what exactly is done as user id zero. .Sh GETTING STARTED When you first run .Nm you may need to deal with some initial configuration details. .Bl -bullet .It Make sure that your system has a group named .Dq network in the .Pa /etc/group file and that the group contains the names of all users expected to use .Nm . Refer to the .Xr group 5 manual page for details. Each of these users must also be given access using the .Dq allow users command in .Pa /etc/ppp/ppp.conf . .It Create a log file. .Nm uses .Xr syslog 3 to log information. A common log file name is .Pa /var/log/ppp.log . To make output go to this file, put the following lines in the .Pa /etc/syslog.conf file: .Bd -literal -offset indent !ppp *.*/var/log/ppp.log .Ed .Pp It is possible to have more than one .Em PPP log file by creating a link to the .Nm executable: .Pp .Dl # cd /usr/sbin .Dl # ln ppp ppp0 .Pp and using .Bd -literal -offset indent !ppp0 *.*/var/log/ppp0.log .Ed .Pp in .Pa /etc/syslog.conf . Do not forget to send a .Dv HUP signal to .Xr syslogd 8 after altering .Pa /etc/syslog.conf . .It Although not strictly relevant to .Nm Ns No 's operation, you should configure your resolver so that it works correctly. This can be done by configuring a local DNS (using .Xr named 8 ) or by adding the correct .Sq nameserver lines to the file .Pa /etc/resolv.conf . Refer to the .Xr resolv.conf 5 manual page for details. .Pp Alternatively, if the peer supports it, .Nm can be configured to ask the peer for the nameserver address(es) and to update .Pa /etc/resolv.conf automatically. Refer to the .Dq enable dns and .Dq resolv commands below for details. .El .Sh MANUAL DIALING In the following examples, we assume that your machine name is .Dv awfulhak . when you invoke .Nm (see .Sx PERMISSIONS above) with no arguments, you are presented with a prompt: .Bd -literal -offset indent ppp ON awfulhak> .Ed .Pp The .Sq ON part of your prompt should always be in upper case. If it is in lower case, it means that you must supply a password using the .Dq passwd command. This only ever happens if you connect to a running version of .Nm and have not authenticated yourself using the correct password. .Pp You can start by specifying the device name and speed: .Bd -literal -offset indent ppp ON awfulhak> set device /dev/cuau0 ppp ON awfulhak> set speed 38400 .Ed .Pp Normally, hardware flow control (CTS/RTS) is used. However, under certain circumstances (as may happen when you are connected directly to certain PPP-capable terminal servers), this may result in .Nm hanging as soon as it tries to write data to your communications link as it is waiting for the CTS (clear to send) signal - which will never come. Thus, if you have a direct line and cannot seem to make a connection, try turning CTS/RTS off with .Dq set ctsrts off . If you need to do this, check the .Dq set accmap description below too - you will probably need to .Dq set accmap 000a0000 . .Pp Usually, parity is set to .Dq none , and this is .Nm Ns No 's default. Parity is a rather archaic error checking mechanism that is no longer used because modern modems do their own error checking, and most link-layer protocols (that is what .Nm is) use much more reliable checking mechanisms. Parity has a relatively huge overhead (a 12.5% increase in traffic) and as a result, it is always disabled (set to .Dq none ) when .Dv PPP is opened. However, some ISPs (Internet Service Providers) may use specific parity settings at connection time (before .Dv PPP is opened). Notably, Compuserve insist on even parity when logging in: .Bd -literal -offset indent ppp ON awfulhak> set parity even .Ed .Pp You can now see what your current device settings look like: .Bd -literal -offset indent ppp ON awfulhak> show physical Name: deflink State: closed Device: N/A Link Type: interactive Connect Count: 0 Queued Packets: 0 Phone Number: N/A Defaults: Device List: /dev/cuau0 Characteristics: 38400bps, cs8, even parity, CTS/RTS on Connect time: 0 secs 0 octets in, 0 octets out Overall 0 bytes/sec ppp ON awfulhak> .Ed .Pp The term command can now be used to talk directly to the device: .Bd -literal -offset indent ppp ON awfulhak> term at OK atdt123456 CONNECT login: myispusername Password: myisppassword Protocol: ppp .Ed .Pp When the peer starts to talk in .Em PPP , .Nm detects this automatically and returns to command mode. .Bd -literal -offset indent ppp ON awfulhak> # No link has been established Ppp ON awfulhak> # We've connected & finished LCP PPp ON awfulhak> # We've authenticated PPP ON awfulhak> # We've agreed IP numbers .Ed .Pp If it does not, it is probable that the peer is waiting for your end to start negotiating. To force .Nm to start sending .Em PPP configuration packets to the peer, use the .Dq ~p command to drop out of terminal mode and enter packet mode. .Pp If you never even receive a login prompt, it is quite likely that the peer wants to use PAP or CHAP authentication instead of using Unix-style login/password authentication. To set things up properly, drop back to the prompt and set your authentication name and key, then reconnect: .Bd -literal -offset indent ~. ppp ON awfulhak> set authname myispusername ppp ON awfulhak> set authkey myisppassword ppp ON awfulhak> term at OK atdt123456 CONNECT .Ed .Pp You may need to tell ppp to initiate negotiations with the peer here too: .Bd -literal -offset indent ~p ppp ON awfulhak> # No link has been established Ppp ON awfulhak> # We've connected & finished LCP PPp ON awfulhak> # We've authenticated PPP ON awfulhak> # We've agreed IP numbers .Ed .Pp You are now connected! Note that .Sq PPP in the prompt has changed to capital letters to indicate that you have a peer connection. If only some of the three Ps go uppercase, wait until either everything is uppercase or lowercase. If they revert to lowercase, it means that .Nm could not successfully negotiate with the peer. A good first step for troubleshooting at this point would be to .Bd -literal -offset indent ppp ON awfulhak> set log local phase lcp ipcp .Ed .Pp and try again. Refer to the .Dq set log command description below for further details. If things fail at this point, it is quite important that you turn logging on and try again. It is also important that you note any prompt changes and report them to anyone trying to help you. .Pp When the link is established, the show command can be used to see how things are going: .Bd -literal -offset indent PPP ON awfulhak> show physical * Modem related information is shown here * PPP ON awfulhak> show ccp * CCP (compression) related information is shown here * PPP ON awfulhak> show lcp * LCP (line control) related information is shown here * PPP ON awfulhak> show ipcp * IPCP (IP) related information is shown here * PPP ON awfulhak> show ipv6cp * IPV6CP (IPv6) related information is shown here * PPP ON awfulhak> show link * Link (high level) related information is shown here * PPP ON awfulhak> show bundle * Logical (high level) connection related information is shown here * .Ed .Pp At this point, your machine has a host route to the peer. This means that you can only make a connection with the host on the other side of the link. If you want to add a default route entry (telling your machine to send all packets without another routing entry to the other side of the .Em PPP link), enter the following command: .Bd -literal -offset indent PPP ON awfulhak> add default HISADDR .Ed .Pp The string .Sq HISADDR represents the IP address of the connected peer. If the .Dq add command fails due to an existing route, you can overwrite the existing route using: .Bd -literal -offset indent PPP ON awfulhak> add! default HISADDR .Ed .Pp This command can also be executed before actually making the connection. If a new IP address is negotiated at connection time, .Nm will update your default route accordingly. .Pp You can now use your network applications (ping, telnet, ftp, etc.) in other windows or terminals on your machine. If you wish to reuse the current terminal, you can put .Nm into the background using your standard shell suspend and background commands (usually .Dq ^Z followed by .Dq bg ) . .Pp Refer to the .Sx PPP COMMAND LIST section for details on all available commands. .Sh AUTOMATIC DIALING To use automatic dialing, you must prepare some Dial and Login chat scripts. See the example definitions in .Pa /usr/share/examples/ppp/ppp.conf.sample (the format of .Pa /etc/ppp/ppp.conf is pretty simple). Each line contains one comment, inclusion, label or command: .Bl -bullet .It A line starting with a .Pq Dq # character is treated as a comment line. Leading whitespace are ignored when identifying comment lines. .It An inclusion is a line beginning with the word .Sq {!include} . It must have one argument - the file to {include}. You may wish to .Dq {!include} ~/.ppp.conf for compatibility with older versions of .Nm . .It A label name starts in the first column and is followed by a colon .Pq Dq \&: . .It A command line must contain a space or tab in the first column. .It A string starting with the .Dq $ character is substituted with the value of the environment variable by the same name. Likewise, a string starting with the .Dq ~ character is substituted with the full path to the home directory of the user account by the same name, and the .Dq ~ character by itself is substituted with the full path to the home directory of the current user. If you want to include a literal .Dq $ or .Dq ~ character in a command or argument, enclose them in double quotes, e.g., .Bd -literal -offset indent set password "pa$ss~word" .Ed .El .Pp The .Pa /etc/ppp/ppp.conf file should consist of at least a .Dq default section. This section is always executed. It should also contain one or more sections, named according to their purpose, for example, .Dq MyISP would represent your ISP, and .Dq ppp-in would represent an incoming .Nm configuration. You can now specify the destination label name when you invoke .Nm . Commands associated with the .Dq default label are executed, followed by those associated with the destination label provided. When .Nm is started with no arguments, the .Dq default section is still executed. The load command can be used to manually load a section from the .Pa /etc/ppp/ppp.conf file: .Bd -literal -offset indent ppp ON awfulhak> load MyISP .Ed .Pp Note, no action is taken by .Nm after a section is loaded, whether it is the result of passing a label on the command line or using the .Dq load command. Only the commands specified for that label in the configuration file are executed. However, when invoking .Nm with the .Fl background , .Fl ddial , or .Fl dedicated switches, the link mode tells .Nm to establish a connection. Refer to the .Dq set mode command below for further details. .Pp Once the connection is made, the .Sq ppp portion of the prompt will change to .Sq PPP : .Bd -literal -offset indent # ppp MyISP \&... ppp ON awfulhak> dial Ppp ON awfulhak> PPp ON awfulhak> PPP ON awfulhak> .Ed .Pp The Ppp prompt indicates that .Nm has entered the authentication phase. The PPp prompt indicates that .Nm has entered the network phase. The PPP prompt indicates that .Nm has successfully negotiated a network layer protocol and is in a usable state. .Pp If the .Pa /etc/ppp/ppp.linkup file is available, its contents are executed when the .Em PPP connection is established. See the provided .Dq pmdemand example in .Pa /usr/share/examples/ppp/ppp.conf.sample which runs a script in the background after the connection is established (refer to the .Dq shell and .Dq bg commands below for a description of possible substitution strings). Similarly, when a connection is closed, the contents of the .Pa /etc/ppp/ppp.linkdown file are executed. Both of these files have the same format as .Pa /etc/ppp/ppp.conf . .Pp In previous versions of .Nm , it was necessary to re-add routes such as the default route in the .Pa ppp.linkup file. .Nm supports .Sq sticky routes , where all routes that contain the .Dv HISADDR , .Dv MYADDR , .Dv HISADDR6 or .Dv MYADDR6 literals will automatically be updated when the values of these variables change. .Sh BACKGROUND DIALING If you want to establish a connection using .Nm non-interactively (such as from a .Xr crontab 5 entry or an .Xr at 1 job) you should use the .Fl background option. When .Fl background is specified, .Nm attempts to establish the connection immediately. If multiple phone numbers are specified, each phone number will be tried once. If the attempt fails, .Nm exits immediately with a non-zero exit code. If it succeeds, then .Nm becomes a daemon, and returns an exit status of zero to its caller. The daemon exits automatically if the connection is dropped by the remote system, or it receives a .Dv TERM signal. .Sh DIAL ON DEMAND Demand dialing is enabled with the .Fl auto or .Fl ddial options. You must also specify the destination label in .Pa /etc/ppp/ppp.conf to use. It must contain the .Dq set ifaddr command to {define} the remote peers IP address. (refer to .Pa /usr/share/examples/ppp/ppp.conf.sample ) .Bd -literal -offset indent # ppp -auto pmdemand .Ed .Pp When .Fl auto or .Fl ddial is specified, .Nm runs as a daemon but you can still configure or examine its configuration by using the .Dq set server command in .Pa /etc/ppp/ppp.conf , (for example, .Dq Li "set server +3000 mypasswd" ) and connecting to the diagnostic port as follows: .Bd -literal -offset indent # pppctl 3000 (assuming tun0) Password: PPP ON awfulhak> show who tcp (127.0.0.1:1028) * .Ed .Pp The .Dq show who command lists users that are currently connected to .Nm itself. If the diagnostic socket is closed or changed to a different socket, all connections are immediately dropped. .Pp In .Fl auto mode, when an outgoing packet is detected, .Nm will perform the dialing action (chat script) and try to connect with the peer. In .Fl ddial mode, the dialing action is performed any time the line is found to be down. If the connect fails, the default behaviour is to wait 30 seconds and then attempt to connect when another outgoing packet is detected. This behaviour can be changed using the .Dq set redial command: .Pp .No set redial Ar secs Ns .Oo + Ns Ar inc Ns .Oo - Ns Ar max Ns Oc Oc Ns .Op . Ns Ar next .Op Ar attempts .Pp .Bl -tag -width attempts -compact .It Ar secs is the number of seconds to wait before attempting to connect again. If the argument is the literal string .Sq Li random , the delay period is a random value between 1 and 30 seconds inclusive. .It Ar inc is the number of seconds that .Ar secs should be incremented each time a new dial attempt is made. The timeout reverts to .Ar secs only after a successful connection is established. The default value for .Ar inc is zero. .It Ar max is the maximum number of times .Nm should increment .Ar secs . The default value for .Ar max is 10. .It Ar next is the number of seconds to wait before attempting to dial the next number in a list of numbers (see the .Dq set phone command). The default is 3 seconds. Again, if the argument is the literal string .Sq Li random , the delay period is a random value between 1 and 30 seconds. .It Ar attempts is the maximum number of times to try to connect for each outgoing packet that triggers a dial. The previous value is unchanged if this parameter is omitted. If a value of zero is specified for .Ar attempts , .Nm will keep trying until a connection is made. .El .Pp So, for example: .Bd -literal -offset indent set redial 10.3 4 .Ed .Pp will attempt to connect 4 times for each outgoing packet that causes a dial attempt with a 3 second delay between each number and a 10 second delay after all numbers have been tried. If multiple phone numbers are specified, the total number of attempts is still 4 (it does not attempt each number 4 times). .Pp Alternatively, .Bd -literal -offset indent set redial 10+10-5.3 20 .Ed .Pp tells .Nm to attempt to connect 20 times. After the first attempt, .Nm pauses for 10 seconds. After the next attempt it pauses for 20 seconds and so on until after the sixth attempt it pauses for 1 minute. The next 14 pauses will also have a duration of one minute. If .Nm connects, disconnects and fails to connect again, the timeout starts again at 10 seconds. .Pp Modifying the dial delay is very useful when running .Nm in .Fl auto mode on both ends of the link. If each end has the same timeout, both ends wind up calling each other at the same time if the link drops and both ends have packets queued. At some locations, the serial link may not be reliable, and carrier may be lost at inappropriate times. It is possible to have .Nm redial should carrier be unexpectedly lost during a session. .Bd -literal -offset indent set reconnect timeout ntries .Ed .Pp This command tells .Nm to re-establish the connection .Ar ntries times on loss of carrier with a pause of .Ar timeout seconds before each try. For example, .Bd -literal -offset indent set reconnect 3 5 .Ed .Pp tells .Nm that on an unexpected loss of carrier, it should wait .Ar 3 seconds before attempting to reconnect. This may happen up to .Ar 5 times before .Nm gives up. The default value of ntries is zero (no reconnect). Care should be taken with this option. If the local timeout is slightly longer than the remote timeout, the reconnect feature will always be triggered (up to the given number of times) after the remote side times out and hangs up. NOTE: In this context, losing too many LQRs constitutes a loss of carrier and will trigger a reconnect. If the .Fl background flag is specified, all phone numbers are dialed at most once until a connection is made. The next number redial period specified with the .Dq set redial command is honoured, as is the reconnect tries value. If your redial value is less than the number of phone numbers specified, not all the specified numbers will be tried. To terminate the program, type .Bd -literal -offset indent PPP ON awfulhak> close ppp ON awfulhak> quit all .Ed .Pp A simple .Dq quit command will terminate the .Xr pppctl 8 or .Xr telnet 1 connection but not the .Nm program itself. You must use .Dq quit all to terminate .Nm as well. .Sh RECEIVING INCOMING PPP CONNECTIONS (Method 1) To handle an incoming .Em PPP connection request, follow these steps: .Bl -enum .It Make sure the modem and (optionally) .Pa /etc/rc.serial is configured correctly. .Bl -bullet -compact .It Use Hardware Handshake (CTS/RTS) for flow control. .It Modem should be set to NO echo back (ATE0) and NO results string (ATQ1). .El .It Edit .Pa /etc/ttys to enable a .Xr getty 8 on the port where the modem is attached. For example: .Pp .Dl ttyd1 Qo /usr/libexec/getty std.38400 Qc dialup on secure .Pp Do not forget to send a .Dv HUP signal to the .Xr init 8 process to start the .Xr getty 8 : .Pp .Dl # kill -HUP 1 .Pp It is usually also necessary to train your modem to the same DTR speed as the getty: .Bd -literal -offset indent # ppp ppp ON awfulhak> set device /dev/cuau1 ppp ON awfulhak> set speed 38400 ppp ON awfulhak> term deflink: Entering terminal mode on /dev/cuau1 Type `~?' for help at OK at OK atz OK at OK ~. ppp ON awfulhak> quit .Ed .It Create a .Pa /usr/local/bin/ppplogin file with the following contents: .Bd -literal -offset indent #! /bin/sh exec /usr/sbin/ppp -direct incoming .Ed .Pp Direct mode .Pq Fl direct lets .Nm work with stdin and stdout. You can also use .Xr pppctl 8 to connect to a configured diagnostic port, in the same manner as with client-side .Nm . .Pp Here, the .Ar incoming section must be set up in .Pa /etc/ppp/ppp.conf . .Pp Make sure that the .Ar incoming section contains the .Dq allow users command as appropriate. .It Prepare an account for the incoming user. .Bd -literal ppp:xxxx:66:66:PPP Login User:/home/ppp:/usr/local/bin/ppplogin .Ed .Pp Refer to the manual entries for .Xr adduser 8 and .Xr vipw 8 for details. .It Support for IPCP Domain Name Server and NetBIOS Name Server negotiation can be enabled using the .Dq accept dns and .Dq set nbns commands. Refer to their descriptions below. .El .Sh RECEIVING INCOMING PPP CONNECTIONS (Method 2) This method differs in that we use .Nm to authenticate the connection rather than .Xr login 1 : .Bl -enum .It Configure your default section in .Pa /etc/gettytab with automatic ppp recognition by specifying the .Dq pp capability: .Bd -literal default:\\ :pp=/usr/local/bin/ppplogin:\\ ..... .Ed .It Configure your serial device(s), enable a .Xr getty 8 and create .Pa /usr/local/bin/ppplogin as in the first three steps for method 1 above. .It Add either .Dq enable chap or .Dq enable pap (or both) to .Pa /etc/ppp/ppp.conf under the .Sq incoming label (or whatever label .Pa ppplogin uses). .It Create an entry in .Pa /etc/ppp/ppp.secret for each incoming user: .Bd -literal Pfredxxxx Pgeorgeyyyy .Ed .El .Pp Now, as soon as .Xr getty 8 detects a ppp connection (by recognising the HDLC frame headers), it runs .Dq /usr/local/bin/ppplogin . .Pp It is .Em VITAL that either PAP or CHAP are enabled as above. If they are not, you are allowing anybody to establish a ppp session with your machine .Em without a password, opening yourself up to all sorts of potential attacks. .Sh AUTHENTICATING INCOMING CONNECTIONS Normally, the receiver of a connection requires that the peer authenticates itself. This may be done using .Xr login 1 , but alternatively, you can use PAP or CHAP. CHAP is the more secure of the two, but some clients may not support it. Once you decide which you wish to use, add the command .Sq enable chap or .Sq enable pap to the relevant section of .Pa ppp.conf . .Pp You must then configure the .Pa /etc/ppp/ppp.secret file. This file contains one line per possible client, each line containing up to five fields: .Pp .Ar name Ar key Oo .Ar hisaddr Op Ar label Op Ar callback-number .Oc .Pp The .Ar name and .Ar key specify the client username and password. If .Ar key is .Dq \&* and PAP is being used, .Nm will look up the password database .Pq Xr passwd 5 when authenticating. If the client does not offer a suitable response based on any .Ar name Ns No / Ns Ar key combination in .Pa ppp.secret , authentication fails. .Pp If authentication is successful, .Ar hisaddr (if specified) is used when negotiating IP numbers. See the .Dq set ifaddr command for details. .Pp If authentication is successful and .Ar label is specified, the current system label is changed to match the given .Ar label . This will change the subsequent parsing of the .Pa ppp.linkup and .Pa ppp.linkdown files. .Pp If authentication is successful and .Ar callback-number is specified and .Dq set callback has been used in .Pa ppp.conf , the client will be called back on the given number. If CBCP is being used, .Ar callback-number may also contain a list of numbers or a .Dq \&* , as if passed to the .Dq set cbcp command. The value will be used in .Nm Ns No 's subsequent CBCP phase. .Sh PPP OVER TCP and UDP (a.k.a Tunnelling) Instead of running .Nm over a serial link, it is possible to use a TCP connection instead by specifying the host, port and protocol as the device: .Pp .Dl set device ui-gate:6669/tcp .Pp Instead of opening a serial device, .Nm will open a TCP connection to the given machine on the given socket. It should be noted however that .Nm does not use the telnet protocol and will be unable to negotiate with a telnet server. You should set up a port for receiving this .Em PPP connection on the receiving machine (ui-gate). This is done by first updating .Pa /etc/services to name the service: .Pp .Dl ppp-in 6669/tcp # Incoming PPP connections over TCP .Pp and updating .Pa /etc/inetd.conf to tell .Xr inetd 8 how to deal with incoming connections on that port: .Pp .Dl ppp-in stream tcp nowait root /usr/sbin/ppp ppp -direct ppp-in .Pp Do not forget to send a .Dv HUP signal to .Xr inetd 8 after you have updated .Pa /etc/inetd.conf . Here, we use a label named .Dq ppp-in . The entry in .Pa /etc/ppp/ppp.conf on ui-gate (the receiver) should contain the following: .Bd -literal -offset indent ppp-in: set timeout 0 set ifaddr 10.0.4.1 10.0.4.2 .Ed .Pp and the entry in .Pa /etc/ppp/ppp.linkup should contain: .Bd -literal -offset indent ppp-in: add 10.0.1.0/24 HISADDR .Ed .Pp It is necessary to put the .Dq add command in .Pa ppp.linkup to ensure that the route is only added after .Nm has negotiated and assigned addresses to its interface. .Pp You may also want to enable PAP or CHAP for security. To enable PAP, add the following line: .Bd -literal -offset indent enable PAP .Ed .Pp You will also need to create the following entry in .Pa /etc/ppp/ppp.secret : .Bd -literal -offset indent MyAuthName MyAuthPasswd .Ed .Pp If .Ar MyAuthPasswd is a .Dq * , the password is looked up in the .Xr passwd 5 database. .Pp The entry in .Pa /etc/ppp/ppp.conf on awfulhak (the initiator) should contain the following: .Bd -literal -offset indent ui-gate: set escape 0xff set device ui-gate:ppp-in/tcp set dial set timeout 30 set log Phase Chat Connect hdlc LCP IPCP IPV6CP CCP tun set ifaddr 10.0.4.2 10.0.4.1 .Ed .Pp with the route setup in .Pa /etc/ppp/ppp.linkup : .Bd -literal -offset indent ui-gate: add 10.0.2.0/24 HISADDR .Ed .Pp Again, if you are enabling PAP, you will also need this in the .Pa /etc/ppp/ppp.conf profile: .Bd -literal -offset indent set authname MyAuthName set authkey MyAuthKey .Ed .Pp We are assigning the address of 10.0.4.1 to ui-gate, and the address 10.0.4.2 to awfulhak. To open the connection, just type .Pp .Dl awfulhak # ppp -background ui-gate .Pp The result will be an additional "route" on awfulhak to the 10.0.2.0/24 network via the TCP connection, and an additional "route" on ui-gate to the 10.0.1.0/24 network. The networks are effectively bridged - the underlying TCP connection may be across a public network (such as the Internet), and the .Em PPP traffic is conceptually encapsulated (although not packet by packet) inside the TCP stream between the two gateways. .Pp The major disadvantage of this mechanism is that there are two "guaranteed delivery" mechanisms in place - the underlying TCP stream and whatever protocol is used over the .Em PPP link - probably TCP again. If packets are lost, both levels will get in each others way trying to negotiate sending of the missing packet. .Pp To avoid this overhead, it is also possible to do all this using UDP instead of TCP as the transport by simply changing the protocol from "tcp" to "udp". When using UDP as a transport, .Nm will operate in synchronous mode. This is another gain as the incoming data does not have to be rearranged into packets. .Pp Care should be taken when adding a default route through a tunneled setup like this. It is quite common for the default route (added in .Pa /etc/ppp/ppp.linkup ) to end up routing the link's TCP connection through the tunnel, effectively garrotting the connection. To avoid this, make sure you add a static route for the benefit of the link: .Bd -literal -offset indent ui-gate: set escape 0xff set device ui-gate:ppp-in/tcp add ui-gate x.x.x.x ..... .Ed .Pp where .Dq x.x.x.x is the IP number that your route to .Dq ui-gate would normally use. .Pp When routing your connection across a public network such as the Internet, it is preferable to encrypt the data. This can be done with the help of the MPPE protocol, although currently this means that you will not be able to also compress the traffic as MPPE is implemented as a compression layer (thank Microsoft for this). To enable MPPE encryption, add the following lines to .Pa /etc/ppp/ppp.conf on the server: .Bd -literal -offset indent enable MSCHAPv2 disable deflate pred1 deny deflate pred1 .Ed .Pp ensuring that you have put the requisite entry in .Pa /etc/ppp/ppp.secret (MSCHAPv2 is challenge based, so .Xr passwd 5 cannot be used) .Pp MSCHAPv2 and MPPE are accepted by default, so the client end should work without any additional changes (although ensure you have .Dq set authname and .Dq set authkey in your profile). .Sh NETWORK ADDRESS TRANSLATION (PACKET ALIASING) The .Fl nat command line option enables network address translation (a.k.a.\& packet aliasing). This allows the .Nm host to act as a masquerading gateway for other computers over a local area network. Outgoing IP packets are NAT'd so that they appear to come from the .Nm host, and incoming packets are de-NAT'd so that they are routed to the correct machine on the local area network. NAT allows computers on private, unregistered subnets to have Internet access, although they are invisible from the outside world. In general, correct .Nm operation should first be verified with network address translation disabled. Then, the .Fl nat option should be switched on, and network applications (web browser, .Xr telnet 1 , .Xr ftp 1 , .Xr ping 8 , .Xr traceroute 8 ) should be checked on the .Nm host. Finally, the same or similar applications should be checked on other computers in the LAN. If network applications work correctly on the .Nm host, but not on other machines in the LAN, then the masquerading software is working properly, but the host is either not forwarding or possibly receiving IP packets. Check that IP forwarding is enabled in .Pa /etc/rc.conf and that other machines have designated the .Nm host as the gateway for the LAN. .Sh PACKET FILTERING This implementation supports packet filtering. There are four kinds of filters: the .Em in filter, the .Em out filter, the .Em dial filter and the .Em alive filter. Here are the basics: .Bl -bullet .It A filter definition has the following syntax: .Pp set filter .Ar name .Ar rule-no .Ar action .Op !\& .Oo .Op host .Ar src_addr Ns Op / Ns Ar width .Op Ar dst_addr Ns Op / Ns Ar width .Oc .Ar [ proto Op src Ar cmp port .Op dst Ar cmp port .Op estab .Op syn .Op finrst .Op timeout Ar secs ] .Bl -enum .It .Ar Name should be one of .Sq in , .Sq out , .Sq dial or .Sq alive . .It .Ar Rule-no is a numeric value between .Sq 0 and .Sq 39 specifying the rule number. Rules are specified in numeric order according to .Ar rule-no , but only if rule .Sq 0 is defined. .It .Ar Action may be specified as .Sq permit or .Sq deny , in which case, if a given packet matches the rule, the associated action is taken immediately. .Ar Action can also be specified as .Sq clear to clear the action associated with that particular rule, or as a new rule number greater than the current rule. In this case, if a given packet matches the current rule, the packet will next be matched against the new rule number (rather than the next rule number). .Pp The .Ar action may optionally be followed with an exclamation mark .Pq Dq !\& , telling .Nm to reverse the sense of the following match. .It .Op Ar src_addr Ns Op / Ns Ar width and .Op Ar dst_addr Ns Op / Ns Ar width are the source and destination IP number specifications. If .Op / Ns Ar width is specified, it gives the number of relevant netmask bits, allowing the specification of an address range. .Pp Either .Ar src_addr or .Ar dst_addr may be given the values .Dv MYADDR , .Dv HISADDR , .Dv MYADDR6 or .Dv HISADDR6 (refer to the description of the .Dq bg command for a description of these values). When these values are used, the filters will be updated any time the values change. This is similar to the behaviour of the .Dq add command below. .It .Ar Proto may be any protocol from .Xr protocols 5 . .It .Ar Cmp is one of .Sq \< , .Sq \&eq or .Sq \> , meaning less-than, equal and greater-than respectively. .Ar Port can be specified as a numeric port or by service name from .Pa /etc/services . .It The .Sq estab , .Sq syn , and .Sq finrst flags are only allowed when .Ar proto is set to .Sq tcp , and represent the TH_ACK, TH_SYN and TH_FIN or TH_RST TCP flags respectively. .It The timeout value adjusts the current idle timeout to at least .Ar secs seconds. If a timeout is given in the alive filter as well as in the in/out filter, the in/out value is used. If no timeout is given, the default timeout (set using .Ic set timeout and defaulting to 180 seconds) is used. .El .It Each filter can hold up to 40 rules, starting from rule 0. The entire rule set is not effective until rule 0 is defined, i.e., the default is to allow everything through. .It If no rule in a defined set of rules matches a packet, that packet will be discarded (blocked). If there are no rules in a given filter, the packet will be permitted. .It It is possible to filter based on the payload of UDP frames where those frames contain a .Em PROTO_IP .Em PPP frame header. See the .Ar filter-decapsulation option below for further details. .It Use .Dq set filter Ar name No -1 to flush all rules. .El .Pp See .Pa /usr/share/examples/ppp/ppp.conf.sample . .Sh SETTING THE IDLE TIMER To check/set the idle timer, use the .Dq show bundle and .Dq set timeout commands: .Bd -literal -offset indent ppp ON awfulhak> set timeout 600 .Ed .Pp The timeout period is measured in seconds, the default value for which is 180 seconds (or 3 min). To disable the idle timer function, use the command .Bd -literal -offset indent ppp ON awfulhak> set timeout 0 .Ed .Pp In .Fl ddial and .Fl dedicated modes, the idle timeout is ignored. In .Fl auto mode, when the idle timeout causes the .Em PPP session to be closed, the .Nm program itself remains running. Another trigger packet will cause it to attempt to re-establish the link. .Sh PREDICTOR-1 and DEFLATE COMPRESSION .Nm supports both Predictor type 1 and deflate compression. By default, .Nm will attempt to use (or be willing to accept) both compression protocols when the peer agrees (or requests them). The deflate protocol is preferred by .Nm . Refer to the .Dq disable and .Dq deny commands if you wish to disable this functionality. .Pp It is possible to use a different compression algorithm in each direction by using only one of .Dq disable deflate and .Dq deny deflate (assuming that the peer supports both algorithms). .Pp By default, when negotiating DEFLATE, .Nm will use a window size of 15. Refer to the .Dq set deflate command if you wish to change this behaviour. .Pp A special algorithm called DEFLATE24 is also available, and is disabled and denied by default. This is exactly the same as DEFLATE except that it uses CCP ID 24 to negotiate. This allows .Nm to successfully negotiate DEFLATE with .Nm pppd version 2.3.*. .Sh CONTROLLING IP ADDRESS For IPv4, .Nm uses IPCP to negotiate IP addresses. Each side of the connection specifies the IP address that it is willing to use, and if the requested IP address is acceptable then .Nm returns an ACK to the requester. Otherwise, .Nm returns NAK to suggest that the peer use a different IP address. When both sides of the connection agree to accept the received request (and send an ACK), IPCP is set to the open state and a network level connection is established. To control this IPCP behaviour, this implementation has the .Dq set ifaddr command for defining the local and remote IP address: .Bd -ragged -offset indent .No set ifaddr Oo Ar src_addr Ns .Op / Ns Ar \&nn .Oo Ar dst_addr Ns Op / Ns Ar \&nn .Oo Ar netmask .Op Ar trigger_addr .Oc .Oc .Oc .Ed .Pp where, .Sq src_addr is the IP address that the local side is willing to use, .Sq dst_addr is the IP address which the remote side should use and .Sq netmask is the netmask that should be used. .Sq Src_addr defaults to the current .Xr hostname 1 , .Sq dst_addr defaults to 0.0.0.0, and .Sq netmask defaults to whatever mask is appropriate for .Sq src_addr . It is only possible to make .Sq netmask smaller than the default. The usual value is 255.255.255.255, as most kernels ignore the netmask of a POINTOPOINT interface. .Pp Some incorrect .Em PPP implementations require that the peer negotiates a specific IP address instead of .Sq src_addr . If this is the case, .Sq trigger_addr may be used to specify this IP number. This will not affect the routing table unless the other side agrees with this proposed number. .Bd -literal -offset indent set ifaddr 192.244.177.38 192.244.177.2 255.255.255.255 0.0.0.0 .Ed .Pp The above specification means: .Pp .Bl -bullet -compact .It I will first suggest that my IP address should be 0.0.0.0, but I will only accept an address of 192.244.177.38. .It I strongly insist that the peer uses 192.244.177.2 as his own address and will not permit the use of any IP address but 192.244.177.2. When the peer requests another IP address, I will always suggest that it uses 192.244.177.2. .It The routing table entry will have a netmask of 0xffffffff. .El .Pp This is all fine when each side has a pre-determined IP address, however it is often the case that one side is acting as a server which controls all IP addresses and the other side should go along with it. In order to allow more flexible behaviour, the .Dq set ifaddr command allows the user to specify IP addresses more loosely: .Pp .Dl set ifaddr 192.244.177.38/24 192.244.177.2/20 .Pp A number followed by a slash .Pq Dq / represents the number of bits significant in the IP address. The above example means: .Pp .Bl -bullet -compact .It I would like to use 192.244.177.38 as my address if it is possible, but I will also accept any IP address between 192.244.177.0 and 192.244.177.255. .It I would like to make him use 192.244.177.2 as his own address, but I will also permit him to use any IP address between 192.244.176.0 and 192.244.191.255. .It As you may have already noticed, 192.244.177.2 is equivalent to saying 192.244.177.2/32. .It As an exception, 0 is equivalent to 0.0.0.0/0, meaning that I have no preferred IP address and will obey the remote peers selection. When using zero, no routing table entries will be made until a connection is established. .It 192.244.177.2/0 means that I will accept/permit any IP address but I will suggest that 192.244.177.2 be used first. .El .Pp When negotiating IPv6 addresses, no control is given to the user. IPV6CP negotiation is fully automatic. .Sh CONNECTING WITH YOUR INTERNET SERVICE PROVIDER The following steps should be taken when connecting to your ISP: .Bl -enum .It Describe your providers phone number(s) in the dial script using the .Dq set phone command. This command allows you to set multiple phone numbers for dialing and redialing separated by either a pipe .Pq Dq \&| or a colon .Pq Dq \&: : .Bd -ragged -offset indent .No set phone Ar telno Ns .Oo \&| Ns Ar backupnumber Oc Ns ... Ns Oo : Ns Ar nextnumber Oc Ns ... .Ed .Pp Numbers after the first in a pipe-separated list are only used if the previous number was used in a failed dial or login script. Numbers separated by a colon are used sequentially, irrespective of what happened as a result of using the previous number. For example: .Bd -literal -offset indent set phone "1234567|2345678:3456789|4567890" .Ed .Pp Here, the 1234567 number is attempted. If the dial or login script fails, the 2345678 number is used next time, but *only* if the dial or login script fails. On the dial after this, the 3456789 number is used. The 4567890 number is only used if the dial or login script using the 3456789 fails. If the login script of the 2345678 number fails, the next number is still the 3456789 number. As many pipes and colons can be used as are necessary (although a given site would usually prefer to use either the pipe or the colon, but not both). The next number redial timeout is used between all numbers. When the end of the list is reached, the normal redial period is used before starting at the beginning again. The selected phone number is substituted for the \\\\T string in the .Dq set dial command (see below). .It Set up your redial requirements using .Dq set redial . For example, if you have a bad telephone line or your provider is usually engaged (not so common these days), you may want to specify the following: .Bd -literal -offset indent set redial 10 4 .Ed .Pp This says that up to 4 phone calls should be attempted with a pause of 10 seconds before dialing the first number again. .It Describe your login procedure using the .Dq set dial and .Dq set login commands. The .Dq set dial command is used to talk to your modem and establish a link with your ISP, for example: .Bd -literal -offset indent set dial "ABORT BUSY ABORT NO\\\\sCARRIER TIMEOUT 4 \\"\\" \e ATZ OK-ATZ-OK ATDT\\\\T TIMEOUT 60 CONNECT" .Ed .Pp This modem "chat" string means: .Bl -bullet .It Abort if the string "BUSY" or "NO CARRIER" are received. .It Set the timeout to 4 seconds. .It Expect nothing. .It Send ATZ. .It Expect OK. If that is not received within the 4 second timeout, send ATZ and expect OK. .It Send ATDTxxxxxxx where xxxxxxx is the next number in the phone list from above. .It Set the timeout to 60. .It Wait for the CONNECT string. .El .Pp Once the connection is established, the login script is executed. This script is written in the same style as the dial script, but care should be taken to avoid having your password logged: .Bd -literal -offset indent set authkey MySecret set login "TIMEOUT 15 login:-\\\\r-login: awfulhak \e word: \\\\P ocol: PPP HELLO" .Ed .Pp This login "chat" string means: .Bl -bullet .It Set the timeout to 15 seconds. .It Expect "login:". If it is not received, send a carriage return and expect "login:" again. .It Send "awfulhak" .It Expect "word:" (the tail end of a "Password:" prompt). .It Send whatever our current .Ar authkey value is set to. .It Expect "ocol:" (the tail end of a "Protocol:" prompt). .It Send "PPP". .It Expect "HELLO". .El .Pp The .Dq set authkey command is logged specially. When .Ar command or .Ar chat logging is enabled, the actual password is not logged; .Sq ******** is logged instead. .Pp Login scripts vary greatly between ISPs. If you are setting one up for the first time, .Em ENABLE CHAT LOGGING so that you can see if your script is behaving as you expect. .It Use .Dq set device and .Dq set speed to specify your serial line and speed, for example: .Bd -literal -offset indent set device /dev/cuau0 set speed 115200 .Ed .Pp Cuad0 is the first serial port on .Fx . If you are running .Nm on .Ox , cua00 is the first. A speed of 115200 should be specified if you have a modem capable of bit rates of 28800 or more. In general, the serial speed should be about four times the modem speed. .It Use the .Dq set ifaddr command to {define} the IP address. .Bl -bullet .It If you know what IP address your provider uses, then use it as the remote address (dst_addr), otherwise choose something like 10.0.0.2/0 (see below). .It If your provider has assigned a particular IP address to you, then use it as your address (src_addr). .It If your provider assigns your address dynamically, choose a suitably unobtrusive and unspecific IP number as your address. 10.0.0.1/0 would be appropriate. The bit after the / specifies how many bits of the address you consider to be important, so if you wanted to insist on something in the class C network 1.2.3.0, you could specify 1.2.3.1/24. .It If you find that your ISP accepts the first IP number that you suggest, specify third and forth arguments of .Dq 0.0.0.0 . This will force your ISP to assign a number. (The third argument will be ignored as it is less restrictive than the default mask for your .Sq src_addr ) . .El .Pp An example for a connection where you do not know your IP number or your ISPs IP number would be: .Bd -literal -offset indent set ifaddr 10.0.0.1/0 10.0.0.2/0 0.0.0.0 0.0.0.0 .Ed .It In most cases, your ISP will also be your default router. If this is the case, add the line .Bd -literal -offset indent add default HISADDR .Ed .Pp to .Pa /etc/ppp/ppp.conf (or to .Pa /etc/ppp/ppp.linkup for setups that do not use .Fl auto mode). .Pp This tells .Nm to add a default route to whatever the peer address is (10.0.0.2 in this example). This route is .Sq sticky , meaning that should the value of .Dv HISADDR change, the route will be updated accordingly. .It If your provider requests that you use PAP/CHAP authentication methods, add the next lines to your .Pa /etc/ppp/ppp.conf file: .Bd -literal -offset indent set authname MyName set authkey MyPassword .Ed .Pp Both are accepted by default, so .Nm will provide whatever your ISP requires. .Pp It should be noted that a login script is rarely (if ever) required when PAP or CHAP are in use. .It Ask your ISP to authenticate your nameserver address(es) with the line .Bd -literal -offset indent enable dns .Ed .Pp Do .Em NOT do this if you are running a local DNS unless you also either use .Dq resolv readonly or have .Dq resolv restore in .Pa /etc/ppp/ppp.linkdown , as .Nm will simply circumvent its use by entering some nameserver lines in .Pa /etc/resolv.conf . .El .Pp Please refer to .Pa /usr/share/examples/ppp/ppp.conf.sample and .Pa /usr/share/examples/ppp/ppp.linkup.sample for some real examples. The pmdemand label should be appropriate for most ISPs. .Sh LOGGING FACILITY .Nm is able to generate the following log info either via .Xr syslog 3 or directly to the screen: .Pp .Bl -tag -width XXXXXXXXX -offset XXX -compact .It Li All Enable all logging facilities. This generates a lot of log. The most common use of 'all' is as a basis, where you remove some facilities after enabling 'all' ('debug' and 'timer' are usually best disabled.) .It Li Async Dump async level packet in hex. .It Li CBCP Generate CBCP (CallBack Control Protocol) logs. .It Li CCP Generate a CCP packet trace. .It Li Chat Generate .Sq dial , .Sq login , .Sq logout and .Sq hangup chat script trace logs. .It Li Command Log commands executed either from the command line or any of the configuration files. .It Li Connect Log Chat lines containing the string "CONNECT". .It Li Debug Log debug information. .It Li DNS Log DNS QUERY packets. .It Li Filter Log packets permitted by the dial filter and denied by any filter. .It Li HDLC Dump HDLC packet in hex. .It Li ID0 Log all function calls specifically made as user id 0. .It Li IPCP Generate an IPCP packet trace. .It Li LCP Generate an LCP packet trace. .It Li LQM Generate LQR reports. .It Li Phase Phase transition log output. .It Li Physical Dump physical level packet in hex. .It Li Radius Dump RADIUS information. RADIUS information resulting from the link coming up or down is logged at .Dq Phase level unless .Dq Radius logging is enabled. This log level is most useful for monitoring RADIUS alive information. .It Li Sync Dump sync level packet in hex. .It Li TCP/IP Dump all TCP/IP packets. .It Li Timer Log timer manipulation. .It Li TUN Include the tun device on each log line. .It Li Warning Output to the terminal device. If there is currently no terminal, output is sent to the log file using syslogs .Dv LOG_WARNING . .It Li Error Output to both the terminal device and the log file using syslogs .Dv LOG_ERROR . .It Li Alert Output to the log file using .Dv LOG_ALERT . .El .Pp The .Dq set log command allows you to set the logging output level. Multiple levels can be specified on a single command line. The default is equivalent to .Dq set log Phase . .Pp It is also possible to log directly to the screen. The syntax is the same except that the word .Dq local should immediately follow .Dq set log . The default is .Dq set log local (i.e., only the un-maskable warning, error and alert output). .Pp If The first argument to .Dq set log Op local begins with a .Sq + or a .Sq - character, the current log levels are not cleared, for example: .Bd -literal -offset indent PPP ON awfulhak> set log phase PPP ON awfulhak> show log Log: Phase Warning Error Alert Local: Warning Error Alert PPP ON awfulhak> set log +tcp/ip -warning PPP ON awfulhak> set log local +command PPP ON awfulhak> show log Log: Phase TCP/IP Warning Error Alert Local: Command Warning Error Alert .Ed .Pp Log messages of level Warning, Error and Alert are not controllable using .Dq set log Op local . .Pp The .Ar Warning level is special in that it will not be logged if it can be displayed locally. .Sh SIGNAL HANDLING .Nm deals with the following signals: .Bl -tag -width "USR2" .It INT Receipt of this signal causes the termination of the current connection (if any). This will cause .Nm to exit unless it is in .Fl auto or .Fl ddial mode. .It HUP, TERM & QUIT These signals tell .Nm to exit. .It USR1 This signal, tells .Nm to re-open any existing server socket, dropping all existing diagnostic connections. Sockets that could not previously be opened will be retried. .It USR2 This signal, tells .Nm to close any existing server socket, dropping all existing diagnostic connections. .Dv SIGUSR1 can still be used to re-open the socket. .El .Sh MULTI-LINK PPP If you wish to use more than one physical link to connect to a .Em PPP peer, that peer must also understand the .Em MULTI-LINK PPP protocol. Refer to RFC 1990 for specification details. .Pp The peer is identified using a combination of his .Dq endpoint discriminator and his .Dq authentication id . Either or both of these may be specified. It is recommended that at least one is specified, otherwise there is no way of ensuring that all links are actually connected to the same peer program, and some confusing lock-ups may result. Locally, these identification variables are specified using the .Dq set enddisc and .Dq set authname commands. The .Sq authname (and .Sq authkey ) must be agreed in advance with the peer. .Pp Multi-link capabilities are enabled using the .Dq set mrru command (set maximum reconstructed receive unit). Once multi-link is enabled, .Nm will attempt to negotiate a multi-link connection with the peer. .Pp By default, only one .Sq link is available (called .Sq deflink ) . To create more links, the .Dq clone command is used. This command will clone existing links, where all characteristics are the same except: .Bl -enum .It The new link has its own name as specified on the .Dq clone command line. .It The new link is an .Sq interactive link. Its mode may subsequently be changed using the .Dq set mode command. .It The new link is in a .Sq closed state. .El .Pp A summary of all available links can be seen using the .Dq show links command. .Pp Once a new link has been created, command usage varies. All link specific commands must be prefixed with the .Dq link Ar name command, specifying on which link the command is to be applied. When only a single link is available, .Nm is smart enough not to require the .Dq link Ar name prefix. .Pp Some commands can still be used without specifying a link - resulting in an operation at the .Sq bundle level. For example, once two or more links are available, the command .Dq show ccp will show CCP configuration and statistics at the multi-link level, and .Dq link deflink show ccp will show the same information at the .Dq deflink link level. .Pp Armed with this information, the following configuration might be used: .Bd -literal -offset indent mp: set timeout 0 set log phase chat set device /dev/cuau0 /dev/cuau1 /dev/cuau2 set phone "123456789" set dial "ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \\"\\" ATZ \e OK-AT-OK \\\\dATDT\\\\T TIMEOUT 45 CONNECT" set login set ifaddr 10.0.0.1/0 10.0.0.2/0 0.0.0.0 0.0.0.0 set authname ppp set authkey ppppassword set mrru 1500 clone 1,2,3 # Create 3 new links - duplicates of the default link deflink remove # Delete the default link (called ``deflink'') .Ed .Pp Note how all cloning is done at the end of the configuration. Usually, the link will be configured first, then cloned. If you wish all links to be up all the time, you can add the following line to the end of your configuration. .Bd -literal -offset indent link 1,2,3 set mode ddial .Ed .Pp If you want the links to dial on demand, this command could be used: .Bd -literal -offset indent link * set mode auto .Ed .Pp Links may be tied to specific names by removing the .Dq set device line above, and specifying the following after the .Dq clone command: .Bd -literal -offset indent link 1 set device /dev/cuau0 link 2 set device /dev/cuau1 link 3 set device /dev/cuau2 .Ed .Pp Use the .Dq help command to see which commands require context (using the .Dq link command), which have optional context and which should not have any context. .Pp When .Nm has negotiated .Em MULTI-LINK mode with the peer, it creates a local domain socket in the .Pa /var/run directory. This socket is used to pass link information (including the actual link file descriptor) between different .Nm invocations. This facilitates .Nm Ns No 's ability to be run from a .Xr getty 8 or directly from .Pa /etc/gettydefs (using the .Sq pp= capability), without needing to have initial control of the serial line. Once .Nm negotiates multi-link mode, it will pass its open link to any already running process. If there is no already running process, .Nm will act as the master, creating the socket and listening for new connections. .Sh PPP COMMAND LIST This section lists the available commands and their effect. They are usable either from an interactive .Nm session, from a configuration file or from a .Xr pppctl 8 or .Xr telnet 1 session. .Bl -tag -width 2n .It accept|deny|enable|disable Ar option.... These directives tell .Nm how to negotiate the initial connection with the peer. Each .Dq option has a default of either accept or deny and enable or disable. .Dq Accept means that the option will be ACK'd if the peer asks for it. .Dq Deny means that the option will be NAK'd if the peer asks for it. .Dq Enable means that the option will be requested by us. .Dq Disable means that the option will not be requested by us. .Pp .Dq Option may be one of the following: .Bl -tag -width 2n .It acfcomp Default: Enabled and Accepted. ACFComp stands for Address and Control Field Compression. Non LCP packets will usually have an address field of 0xff (the All-Stations address) and a control field of 0x03 (the Unnumbered Information command). If this option is negotiated, these two bytes are simply not sent, thus minimising traffic. .Pp See .Pa rfc1662 for details. .It chap Ns Op \&05 Default: Disabled and Accepted. CHAP stands for Challenge Handshake Authentication Protocol. Only one of CHAP and PAP (below) may be negotiated. With CHAP, the authenticator sends a "challenge" message to its peer. The peer uses a one-way hash function to encrypt the challenge and sends the result back. The authenticator does the same, and compares the results. The advantage of this mechanism is that no passwords are sent across the connection. A challenge is made when the connection is first made. Subsequent challenges may occur. If you want to have your peer authenticate itself, you must .Dq enable chap . in .Pa /etc/ppp/ppp.conf , and have an entry in .Pa /etc/ppp/ppp.secret for the peer. .Pp When using CHAP as the client, you need only specify .Dq AuthName and .Dq AuthKey in .Pa /etc/ppp/ppp.conf . CHAP is accepted by default. Some .Em PPP implementations use "MS-CHAP" rather than MD5 when encrypting the challenge. MS-CHAP is a combination of MD4 and DES. If .Nm was built on a machine with DES libraries available, it will respond to MS-CHAP authentication requests, but will never request them. .It deflate Default: Enabled and Accepted. This option decides if deflate compression will be used by the Compression Control Protocol (CCP). This is the same algorithm as used by the .Xr gzip 1 program. Note: There is a problem negotiating .Ar deflate capabilities with .Nm pppd - a .Em PPP implementation available under many operating systems. .Nm pppd (version 2.3.1) incorrectly attempts to negotiate .Ar deflate compression using type .Em 24 as the CCP configuration type rather than type .Em 26 as specified in .Pa rfc1979 . Type .Ar 24 is actually specified as .Dq PPP Magna-link Variable Resource Compression in .Pa rfc1975 ! .Nm is capable of negotiating with .Nm pppd , but only if .Dq deflate24 is .Ar enable Ns No d and .Ar accept Ns No ed . .It deflate24 Default: Disabled and Denied. This is a variance of the .Ar deflate option, allowing negotiation with the .Nm pppd program. Refer to the .Ar deflate section above for details. It is disabled by default as it violates .Pa rfc1975 . .It dns Default: Disabled and Denied. This option allows DNS negotiation. .Pp If .Dq enable Ns No d, .Nm will request that the peer confirms the entries in .Pa /etc/resolv.conf . If the peer NAKs our request (suggesting new IP numbers), .Pa /etc/resolv.conf is updated and another request is sent to confirm the new entries. .Pp If .Dq accept Ns No ed, .Nm will answer any DNS queries requested by the peer rather than rejecting them. The answer is taken from .Pa /etc/resolv.conf unless the .Dq set dns command is used as an override. .It enddisc Default: Enabled and Accepted. This option allows control over whether we negotiate an endpoint discriminator. We only send our discriminator if .Dq set enddisc is used and .Ar enddisc is enabled. We reject the peers discriminator if .Ar enddisc is denied. .It LANMan|chap80lm Default: Disabled and Accepted. The use of this authentication protocol is discouraged as it partially violates the authentication protocol by implementing two different mechanisms (LANMan & NT) under the guise of a single CHAP type (0x80). .Dq LANMan uses a simple DES encryption mechanism and is the least secure of the CHAP alternatives (although is still more secure than PAP). .Pp Refer to the .Dq MSChap description below for more details. .It lqr Default: Disabled and Accepted. This option decides if Link Quality Requests will be sent or accepted. LQR is a protocol that allows .Nm to determine that the link is down without relying on the modems carrier detect. When LQR is enabled, .Nm sends the .Em QUALPROTO option (see .Dq set lqrperiod below) as part of the LCP request. If the peer agrees, both sides will exchange LQR packets at the agreed frequency, allowing detailed link quality monitoring by enabling LQM logging. If the peer does not agree, and if the .Dq echo option is enabled, .Nm will send .Em LCP ECHO requests instead. These packets pass no information of interest, but they .Em MUST be replied to by the peer. .Pp Whether using .Em LQR or .Em LCP ECHO , .Nm will abruptly drop the connection if 5 unacknowledged packets have been sent rather than sending a 6th. A message is logged at the .Em PHASE level, and any appropriate .Dq reconnect values are honoured as if the peer were responsible for dropping the connection. .Pp Refer to the .Dq enable echo command description for differences in behaviour prior to .Nm version 3.4.2. .It mppe Default: Enabled and Accepted. This is Microsoft Point to Point Encryption scheme. MPPE key size can be 40-, 56- and 128-bits. Refer to .Dq set mppe command. .It MSChapV2|chap81 Default: Disabled and Accepted. It is very similar to standard CHAP (type 0x05) except that it issues challenges of a fixed 16 bytes in length and uses a combination of MD4, SHA-1 and DES to encrypt the challenge rather than using the standard MD5 mechanism. .It MSChap|chap80nt Default: Disabled and Accepted. The use of this authentication protocol is discouraged as it partially violates the authentication protocol by implementing two different mechanisms (LANMan & NT) under the guise of a single CHAP type (0x80). It is very similar to standard CHAP (type 0x05) except that it issues challenges of a fixed 8 bytes in length and uses a combination of MD4 and DES to encrypt the challenge rather than using the standard MD5 mechanism. CHAP type 0x80 for LANMan is also supported - see .Dq enable LANMan for details. .Pp Because both .Dq LANMan and .Dq NT use CHAP type 0x80, when acting as authenticator with both .Dq enable Ns No d , .Nm will rechallenge the peer up to three times if it responds using the wrong one of the two protocols. This gives the peer a chance to attempt using both protocols. .Pp Conversely, when .Nm acts as the authenticatee with both protocols .Dq accept Ns No ed , the protocols are used alternately in response to challenges. .Pp Note: If only LANMan is enabled, .Nm pppd (version 2.3.5) misbehaves when acting as authenticatee. It provides both the NT and the LANMan answers, but also suggests that only the NT answer should be used. .It pap Default: Disabled and Accepted. PAP stands for Password Authentication Protocol. Only one of PAP and CHAP (above) may be negotiated. With PAP, the ID and Password are sent repeatedly to the peer until authentication is acknowledged or the connection is terminated. This is a rather poor security mechanism. It is only performed when the connection is first established. If you want to have your peer authenticate itself, you must .Dq enable pap . in .Pa /etc/ppp/ppp.conf , and have an entry in .Pa /etc/ppp/ppp.secret for the peer (although see the .Dq passwdauth and .Dq set radius options below). .Pp When using PAP as the client, you need only specify .Dq AuthName and .Dq AuthKey in .Pa /etc/ppp/ppp.conf . PAP is accepted by default. .It pred1 Default: Enabled and Accepted. This option decides if Predictor 1 compression will be used by the Compression Control Protocol (CCP). .It protocomp Default: Enabled and Accepted. This option is used to negotiate PFC (Protocol Field Compression), a mechanism where the protocol field number is reduced to one octet rather than two. .It shortseq Default: Enabled and Accepted. This option determines if .Nm will request and accept requests for short (12 bit) sequence numbers when negotiating multi-link mode. This is only applicable if our MRRU is set (thus enabling multi-link). .It vjcomp Default: Enabled and Accepted. This option determines if Van Jacobson header compression will be used. .El .Pp The following options are not actually negotiated with the peer. Therefore, accepting or denying them makes no sense. .Bl -tag -width 2n .It echo Default: Disabled. When this option is enabled, .Nm will send .Em LCP ECHO requests to the peer at the frequency defined by .Dq echoperiod . Note, .Em LQR requests will supersede .Em LCP ECHO requests if enabled and negotiated. See .Dq set lqrperiod below for details. .Pp Prior to .Nm version 3.4.2, .Dq echo was considered enabled if lqr was enabled and negotiated, otherwise it was considered disabled. For the same behaviour, it is now necessary to .Dq enable lqr echo rather than just .Dq enable lqr . .It filter-decapsulation Default: Disabled. When this option is enabled, .Nm will examine UDP frames to see if they actually contain a .Em PPP frame as their payload. If this is the case, all filters will operate on the payload rather than the actual packet. .Pp This is useful if you want to send PPPoUDP traffic over a .Em PPP link, but want that link to do smart things with the real data rather than the UDP wrapper. .Pp The UDP frame payload must not be compressed in any way, otherwise .Nm will not be able to interpret it. It is therefore recommended that you .Ic disable vj pred1 deflate and .Ic deny vj pred1 deflate in the configuration for the .Nm invocation with the udp link. .It force-scripts Default: Disabled. Forces execution of the configured chat scripts in .Dv direct and .Dv dedicated modes. .It idcheck Default: Enabled. When .Nm exchanges low-level LCP, CCP and IPCP configuration traffic, the .Em Identifier field of any replies is expected to be the same as that of the request. By default, .Nm drops any reply packets that do not contain the expected identifier field, reporting the fact at the respective log level. If .Ar idcheck is disabled, .Nm will ignore the identifier field. .It iface-alias Default: Enabled if .Fl nat is specified. This option simply tells .Nm to add new interface addresses to the interface rather than replacing them. The option can only be enabled if network address translation is enabled .Pq Dq nat enable yes . .Pp With this option enabled, .Nm will pass traffic for old interface addresses through the NAT engine (see .Xr libalias 3 ) , resulting in the ability (in .Fl auto mode) to properly connect the process that caused the PPP link to come up in the first place. .Pp Disabling NAT with .Dq nat enable no will also disable .Sq iface-alias . .It ipcp Default: Enabled. This option allows .Nm to attempt to negotiate IP control protocol capabilities and if successful to exchange IP datagrams with the peer. .It ipv6cp Default: Enabled. This option allows .Nm to attempt to negotiate IPv6 control protocol capabilities and if successful to exchange IPv6 datagrams with the peer. .It keep-session Default: Disabled. When .Nm runs as a Multi-link server, a different .Nm instance initially receives each connection. After determining that the link belongs to an already existing bundle (controlled by another .Nm invocation), .Nm will transfer the link to that process. .Pp If the link is a tty device or if this option is enabled, .Nm will not exit, but will change its process name to .Dq session owner and wait for the controlling .Nm to finish with the link and deliver a signal back to the idle process. This prevents the confusion that results from .Nm Ns No 's parent considering the link resource available again. .Pp For tty devices that have entries in .Pa /etc/ttys , this is necessary to prevent another .Xr getty 8 from being started, and for program links such as .Xr sshd 8 , it prevents .Xr sshd 8 from exiting due to the death of its child. As .Nm cannot determine its parents requirements (except for the tty case), this option must be enabled manually depending on the circumstances. .It loopback Default: Enabled. When .Ar loopback is enabled, .Nm will automatically loop back packets being sent out with a destination address equal to that of the .Em PPP interface. If disabled, .Nm will send the packet, probably resulting in an ICMP redirect from the other end. It is convenient to have this option enabled when the interface is also the default route as it avoids the necessity of a loopback route. .It NAS-IP-Address Default: Enabled. This option controls whether .Nm sends the .Dq NAS-IP-Address attribute to the RADIUS server when RADIUS is in use .Pq see Dq set radius . .Pp Note, at least one of .Dq NAS-IP-Address and .Dq NAS-Identifier must be enabled. .Pp Versions of .Nm prior to version 3.4.1 did not send the .Dq NAS-IP-Address attribute as it was reported to break the Radiator RADIUS server. As the latest rfc (2865) no longer hints that only one of .Dq NAS-IP-Address and .Dq NAS-Identifier should be sent (as rfc 2138 did), .Nm now sends both and leaves it up to the administrator that chooses to use bad RADIUS implementations to .Dq disable NAS-IP-Address . .It NAS-Identifier Default: Enabled. This option controls whether .Nm sends the .Dq NAS-Identifier attribute to the RADIUS server when RADIUS is in use .Pq see Dq set radius . .Pp Note, at least one of .Dq NAS-IP-Address and .Dq NAS-Identifier must be enabled. .It passwdauth Default: Disabled. Enabling this option will tell the PAP authentication code to use the password database (see .Xr passwd 5 ) to authenticate the caller if they cannot be found in the .Pa /etc/ppp/ppp.secret file. .Pa /etc/ppp/ppp.secret is always checked first. If you wish to use passwords from .Xr passwd 5 , but also to specify an IP number or label for a given client, use .Dq \&* as the client password in .Pa /etc/ppp/ppp.secret . .It proxy Default: Disabled. Enabling this option will tell .Nm to proxy ARP for the peer. This means that .Nm will make an entry in the ARP table using .Dv HISADDR and the .Dv MAC address of the local network in which .Dv HISADDR appears. This allows other machines connecteed to the LAN to talk to the peer as if the peer itself was connected to the LAN. The proxy entry cannot be made unless .Dv HISADDR is an address from a LAN. .It proxyall Default: Disabled. Enabling this will tell .Nm to add proxy arp entries for every IP address in all class C or smaller subnets routed via the tun interface. .Pp Proxy arp entries are only made for sticky routes that are added using the .Dq add command. No proxy arp entries are made for the interface address itself (as created by the .Dq set ifaddr command). .It sroutes Default: Enabled. When the .Dq add command is used with the .Dv HISADDR , .Dv MYADDR , .Dv HISADDR6 or .Dv MYADDR6 values, entries are stored in the .Sq sticky route list. Each time these variables change, this list is re-applied to the routing table. .Pp Disabling this option will prevent the re-application of sticky routes, although the .Sq stick route list will still be maintained. .It Oo tcp Oc Ns No mssfixup Default: Enabled. This option tells .Nm to adjust TCP SYN packets so that the maximum receive segment size is not greater than the amount allowed by the interface MTU. .It throughput Default: Enabled. This option tells .Nm to gather throughput statistics. Input and output is sampled over a rolling 5 second window, and current, best and total figures are retained. This data is output when the relevant .Em PPP layer shuts down, and is also available using the .Dq show command. Throughput statistics are available at the .Dq IPCP and .Dq physical levels. .It utmp Default: Enabled. Normally, when a user is authenticated using PAP or CHAP, and when .Nm is running in .Fl direct mode, an entry is made in the utmp and wtmp files for that user. Disabling this option will tell .Nm not to make any utmp or wtmp entries. This is usually only necessary if you require the user to both login and authenticate themselves. .El .It add Ns Xo .Op !\& .Ar dest Ns Op / Ns Ar nn .Op Ar mask .Op Ar gateway .Xc .Ar Dest is the destination IP address. The netmask is specified either as a number of bits with .Ar /nn or as an IP number using .Ar mask . .Ar 0 0 or simply .Ar 0 with no mask refers to the default route. It is also possible to use the literal name .Sq default instead of .Ar 0 . .Ar Gateway is the next hop gateway to get to the given .Ar dest machine/network. Refer to the .Xr route 8 command for further details. .Pp It is possible to use the symbolic names .Sq MYADDR , .Sq HISADDR , .Sq MYADDR6 or .Sq HISADDR6 as the destination, and .Sq HISADDR or .Sq HISADDR6 as the .Ar gateway . .Sq MYADDR is replaced with the interface IP address, .Sq HISADDR is replaced with the interface IP destination (peer) address, .Sq MYADDR6 is replaced with the interface IPv6 address, and .Sq HISADDR6 is replaced with the interface IPv6 destination address, .Pp If the .Ar add!\& command is used (note the trailing .Dq !\& ) , then if the route already exists, it will be updated as with the .Sq route change command (see .Xr route 8 for further details). .Pp Routes that contain the .Dq HISADDR , .Dq MYADDR , .Dq HISADDR6 , .Dq MYADDR6 , .Dq DNS0 , or .Dq DNS1 constants are considered .Sq sticky . They are stored in a list (use .Dq show ncp to see the list), and each time the value of one of these variables changes, the appropriate routing table entries are updated. This facility may be disabled using .Dq disable sroutes . .It allow Ar command Op Ar args This command controls access to .Nm and its configuration files. It is possible to allow user-level access, depending on the configuration file label and on the mode that .Nm is being run in. For example, you may wish to configure .Nm so that only user .Sq fred may access label .Sq fredlabel in .Fl background mode. .Pp User id 0 is immune to these commands. .Bl -tag -width 2n .It allow user Ns Xo .Op s .Ar logname Ns No ... .Xc By default, only user id 0 is allowed access to .Nm . If this command is used, all of the listed users are allowed access to the section in which the .Dq allow users command is found. The .Sq default section is always checked first (even though it is only ever automatically loaded at startup). .Dq allow users commands are cumulative in a given section, but users allowed in any given section override users allowed in the default section, so it is possible to allow users access to everything except a given label by specifying default users in the .Sq default section, and then specifying a new user list for that label. .Pp If user .Sq * is specified, access is allowed to all users. .It allow mode Ns Xo .Op s .Ar mode Ns No ... .Xc By default, access using any .Nm mode is possible. If this command is used, it restricts the access .Ar modes allowed to load the label under which this command is specified. Again, as with the .Dq allow users command, each .Dq allow modes command overrides any previous settings, and the .Sq default section is always checked first. .Pp Possible modes are: .Sq interactive , .Sq auto , .Sq direct , .Sq dedicated , .Sq ddial , .Sq background and .Sq * . .Pp When running in multi-link mode, a section can be loaded if it allows .Em any of the currently existing line modes. .El .It nat Ar command Op Ar args This command allows the control of the network address translation (also known as masquerading or IP aliasing) facilities that are built into .Nm . NAT is done on the external interface only, and is unlikely to make sense if used with the .Fl direct flag. .Pp If nat is enabled on your system (it may be omitted at compile time), the following commands are possible: .Bl -tag -width 2n .It nat enable yes|no This command either switches network address translation on or turns it off. The .Fl nat command line flag is synonymous with .Dq nat enable yes . .It nat addr Op Ar addr_local addr_alias This command allows data for .Ar addr_alias to be redirected to .Ar addr_local . It is useful if you own a small number of real IP numbers that you wish to map to specific machines behind your gateway. .It nat deny_incoming yes|no If set to yes, this command will refuse all incoming packets where an aliasing link does not already exist. Refer to the .Sx CONCEPTUAL BACKGROUND section of .Xr libalias 3 for a description of what an .Dq aliasing link is. .Pp It should be noted under what circumstances an aliasing link is created by .Xr libalias 3 . It may be necessary to further protect your network from outside connections using the .Dq set filter or .Dq nat target commands. .It nat help|? This command gives a summary of available nat commands. .It nat log yes|no This option causes various NAT statistics and information to be logged to the file .Pa /var/log/alias.log . .It nat port Ar proto Ar targetIP Ns Xo .No : Ns Ar targetPort Ns .Oo .No - Ns Ar targetPort .Oc Ar aliasPort Ns .Oo .No - Ns Ar aliasPort .Oc Oo Ar remoteIP : Ns .Ar remotePort Ns .Oo .No - Ns Ar remotePort .Oc .Oc .Xc This command causes incoming .Ar proto connections to .Ar aliasPort to be redirected to .Ar targetPort on .Ar targetIP . .Ar proto is either .Dq tcp or .Dq udp . .Pp A range of port numbers may be specified as shown above. The ranges must be of the same size. .Pp If .Ar remoteIP is specified, only data coming from that IP number is redirected. .Ar remotePort must either be .Dq 0 (indicating any source port) or a range of ports the same size as the other ranges. .Pp This option is useful if you wish to run things like Internet phone on machines behind your gateway, but is limited in that connections to only one interior machine per source machine and target port are possible. .It nat proto Ar proto localIP Oo .Ar publicIP Op Ar remoteIP .Oc This command tells .Nm to redirect packets of protocol type .Ar proto (see .Xr protocols 5 ) to the internal address .Ar localIP . .Pp If .Ar publicIP is specified, only packets destined for that address are matched, otherwise the default alias address is used. .Pp If .Ar remoteIP is specified, only packets matching that source address are matched, .Pp This command is useful for redirecting tunnel endpoints to an internal machine, for example: .Pp .Dl nat proto ipencap 10.0.0.1 .It "nat proxy cmd" Ar arg Ns No ... This command tells .Nm to proxy certain connections, redirecting them to a given server. Refer to the description of .Fn PacketAliasProxyRule in .Xr libalias 3 for details of the available commands. .It nat punch_fw Op Ar base count This command tells .Nm to punch holes in the firewall for FTP or IRC DCC connections. This is done dynamically by installing termporary firewall rules which allow a particular connection (and only that connection) to go through the firewall. The rules are removed once the corresponding connection terminates. .Pp A maximum of .Ar count rules starting from rule number .Ar base will be used for punching firewall holes. The range will be cleared when the .Dq nat punch_fw command is run. .Pp If no arguments are given, firewall punching is disabled. .It nat skinny_port Op Ar port This command tells .Nm which TCP port is used by the Skinny Station protocol. Skinny is used by Cisco IP phones to communicate with Cisco Call Managers to setup voice over IP calls. The typical port used by Skinny is 2000. .Pp If no argument is given, skinny aliasing is disabled. .It nat same_ports yes|no When enabled, this command will tell the network address translation engine to attempt to avoid changing the port number on outgoing packets. This is useful if you want to support protocols such as RPC and LPD which require connections to come from a well known port. .It nat target Op Ar address Set the given target address or clear it if no address is given. The target address is used by libalias to specify how to NAT incoming packets by default. If a target address is not set or if .Dq default is given, packets are not altered and are allowed to route to the internal network. .Pp The target address may be set to .Dq MYADDR , in which case libalias will redirect all packets to the interface address. .It nat use_sockets yes|no When enabled, this option tells the network address translation engine to create a socket so that it can guarantee a correct incoming ftp data or IRC connection. .It nat unregistered_only yes|no Only alter outgoing packets with an unregistered source address. According to RFC 1918, unregistered source addresses are 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16. .El .Pp These commands are also discussed in the file .Pa README.nat which comes with the source distribution. .It Oo !\& Oc Ns Xo .No bg Ar command .Xc The given .Ar command is executed in the background with the following words replaced: .Bl -tag -width COMPILATIONDATE .It Li AUTHNAME This is replaced with the local .Ar authname value. See the .Dq set authname command below. .It Li COMPILATIONDATE In previous software revisions, this was replaced with the date on which .Nm was compiled. This is no longer supported as it breaks the ability to recompile the same code to produce an exact duplicate of a previous compilation. .It Li DNS0 & DNS1 These are replaced with the primary and secondary nameserver IP numbers. If nameservers are negotiated by IPCP, the values of these macros will change. .It Li ENDDISC This is replaced with the local endpoint discriminator value. See the .Dq set enddisc command below. .It Li HISADDR This is replaced with the peers IP number. .It Li HISADDR6 This is replaced with the peers IPv6 number. .It Li INTERFACE This is replaced with the name of the interface that is in use. .It Li IPOCTETSIN This is replaced with the number of IP bytes received since the connection was established. .It Li IPOCTETSOUT This is replaced with the number of IP bytes sent since the connection was established. .It Li IPPACKETSIN This is replaced with the number of IP packets received since the connection was established. .It Li IPPACKETSOUT This is replaced with the number of IP packets sent since the connection was established. .It Li IPV6OCTETSIN This is replaced with the number of IPv6 bytes received since the connection was established. .It Li IPV6OCTETSOUT This is replaced with the number of IPv6 bytes sent since the connection was established. .It Li IPV6PACKETSIN This is replaced with the number of IPv6 packets received since the connection was established. .It Li IPV6PACKETSOUT This is replaced with the number of IPv6 packets sent since the connection was established. .It Li LABEL This is replaced with the last label name used. A label may be specified on the .Nm command line, via the .Dq load or .Dq dial commands and in the .Pa ppp.secret file. .It Li MYADDR This is replaced with the IP number assigned to the local interface. .It Li MYADDR6 This is replaced with the IPv6 number assigned to the local interface. .It Li OCTETSIN This is replaced with the number of bytes received since the connection was established. .It Li OCTETSOUT This is replaced with the number of bytes sent since the connection was established. .It Li PACKETSIN This is replaced with the number of packets received since the connection was established. .It Li PACKETSOUT This is replaced with the number of packets sent since the connection was established. .It Li PEER_ENDDISC This is replaced with the value of the peers endpoint discriminator. .It Li PROCESSID This is replaced with the current process id. .It Li SOCKNAME This is replaced with the name of the diagnostic socket. .It Li UPTIME This is replaced with the bundle uptime in HH:MM:SS format. .It Li USER This is replaced with the username that has been authenticated with PAP or CHAP. Normally, this variable is assigned only in -direct mode. This value is available irrespective of whether utmp logging is enabled. .It Li VERSION This is replaced with the current version number of .Nm . .El .Pp These substitutions are also done by the .Dq set proctitle , .Dq ident and .Dq log commands. .Pp If you wish to pause .Nm while the command executes, use the .Dq shell command instead. .It clear physical|ipcp|ipv6 Op current|overall|peak... Clear the specified throughput values at either the .Dq physical , .Dq ipcp or .Dq ipv6cp level. If .Dq physical is specified, context must be given (see the .Dq link command below). If no second argument is given, all values are cleared. .It clone Ar name Ns Xo .Op \&, Ns Ar name Ns .No ... .Xc Clone the specified link, creating one or more new links according to the .Ar name argument(s). This command must be used from the .Dq link command below unless you have only got a single link (in which case that link becomes the default). Links may be removed using the .Dq remove command below. .Pp The default link name is .Dq deflink . .It close Op lcp|ccp Ns Op !\& If no arguments are given, the relevant protocol layers will be brought down and the link will be closed. If .Dq lcp is specified, the LCP layer is brought down, but .Nm will not bring the link offline. It is subsequently possible to use .Dq term (see below) to talk to the peer machine if, for example, something like .Dq slirp is being used. If .Dq ccp is specified, only the relevant compression layer is closed. If the .Dq !\& is used, the compression layer will remain in the closed state, otherwise it will re-enter the STOPPED state, waiting for the peer to initiate further CCP negotiation. In any event, this command does not disconnect the user from .Nm or exit .Nm . See the .Dq quit command below. .It delete Ns Xo .Op !\& .Ar dest .Xc This command deletes the route with the given .Ar dest IP address. If .Ar dest is specified as .Sq ALL , all non-direct entries in the routing table for the current interface, and all .Sq sticky route entries are deleted. If .Ar dest is specified as .Sq default , the default route is deleted. .Pp If the .Ar delete!\& command is used (note the trailing .Dq !\& ) , .Nm will not complain if the route does not already exist. .It dial|call Oo Ar label Oc Ns Xo .No ... .Xc This command is the equivalent of .Dq load label followed by .Dq open , and is provided for backwards compatibility. .It down Op Ar lcp|ccp Bring the relevant layer down ungracefully, as if the underlying layer had become unavailable. It is not considered polite to use this command on a Finite State Machine that is in the OPEN state. If no arguments are supplied, the entire link is closed (or if no context is given, all links are terminated). If .Sq lcp is specified, the .Em LCP layer is terminated but the device is not brought offline and the link is not closed. If .Sq ccp is specified, only the relevant compression layer(s) are terminated. .It help|? Op Ar command Show a list of available commands. If .Ar command is specified, show the usage string for that command. .It ident Op Ar text Ns No ... Identify the link to the peer using .Ar text . If .Ar text is empty, link identification is disabled. It is possible to use any of the words described for the .Ic bg command above. Refer to the .Ic sendident command for details of when .Nm identifies itself to the peer. .It iface Ar command Op args This command is used to control the interface used by .Nm . .Ar Command may be one of the following: .Bl -tag -width 2n .It iface add Ns Xo .Op !\& .Ar addr Ns Op / Ns Ar bits .Op Ar peer .Xc .It iface add Ns Xo .Op !\& .Ar addr .Ar mask .Ar peer .Xc Add the given .Ar addr mask peer combination to the interface. Instead of specifying .Ar mask , .Ar /bits can be used (with no space between it and .Ar addr ) . If the given address already exists, the command fails unless the .Dq !\& is used - in which case the previous interface address entry is overwritten with the new one, allowing a change of netmask or peer address. .Pp If only .Ar addr is specified, .Ar bits defaults to .Dq 32 and .Ar peer defaults to .Dq 255.255.255.255 . This address (the broadcast address) is the only duplicate peer address that .Nm allows. .It iface clear Op INET | INET6 If this command is used while .Nm is in the OPENED state or while in .Fl auto mode, all addresses except for the NCP negotiated address are deleted from the interface. If .Nm is not in the OPENED state and is not in .Fl auto mode, all interface addresses are deleted. .Pp If the INET or INET6 arguments are used, only addresses for that address family are cleared. .It iface delete Ns Xo .Op !\& Ns .No |rm Ns Op !\& .Ar addr .Xc This command deletes the given .Ar addr from the interface. If the .Dq !\& is used, no error is given if the address is not currently assigned to the interface (and no deletion takes place). .It iface name Ar name Renames the interface to .Ar name . .It iface description Ar description Sets the interface description to .Ar description . Useful if you have many interfaces on your system. .It iface show Shows the current state and current addresses for the interface. It is much the same as running .Dq ifconfig INTERFACE . .It iface help Op Ar sub-command This command, when invoked without .Ar sub-command , will show a list of possible .Dq iface sub-commands and a brief synopsis for each. When invoked with .Ar sub-command , only the synopsis for the given sub-command is shown. .El .It Oo data Oc Ns Xo .No link .Ar name Ns Oo , Ns Ar name Oc Ns ... Ar command Op Ar args .Xc This command may prefix any other command if the user wishes to specify which link the command should affect. This is only applicable after multiple links have been created in Multi-link mode using the .Dq clone command. .Pp .Ar Name specifies the name of an existing link. If .Ar name is a comma separated list, .Ar command is executed on each link. If .Ar name is .Dq * , .Ar command is executed on all links. .It load Oo Ar label Oc Ns Xo .No ... .Xc Load the given .Ar label Ns No (s) from the .Pa ppp.conf file. If .Ar label is not given, the .Ar default label is used. .Pp Unless the .Ar label section uses the .Dq set mode , .Dq open or .Dq dial commands, .Nm will not attempt to make an immediate connection. .It log Ar word Ns No ... Send the given word(s) to the log file with the prefix .Dq LOG: . Word substitutions are done as explained under the .Dq !bg command above. .It open Op lcp|ccp|ipcp This is the opposite of the .Dq close command. All closed links are immediately brought up apart from second and subsequent .Ar demand-dial links - these will come up based on the .Dq set autoload command that has been used. .Pp If the .Dq lcp argument is used while the LCP layer is already open, LCP will be renegotiated. This allows various LCP options to be changed, after which .Dq open lcp can be used to put them into effect. After renegotiating LCP, any agreed authentication will also take place. .Pp If the .Dq ccp argument is used, the relevant compression layer is opened. Again, if it is already open, it will be renegotiated. .Pp If the .Dq ipcp argument is used, the link will be brought up as normal, but if IPCP is already open, it will be renegotiated and the network interface will be reconfigured. .Pp It is probably not good practice to re-open the PPP state machines like this as it is possible that the peer will not behave correctly. It .Em is however useful as a way of forcing the CCP or VJ dictionaries to be reset. .It passwd Ar pass Specify the password required for access to the full .Nm command set. This password is required when connecting to the diagnostic port (see the .Dq set server command). .Ar Pass is specified on the .Dq set server command line. The value of .Ar pass is not logged when .Ar command logging is active, instead, the literal string .Sq ******** is logged. .It quit|bye Op all If .Dq quit is executed from the controlling connection or from a command file, ppp will exit after closing all connections. Otherwise, if the user is connected to a diagnostic socket, the connection is simply dropped. .Pp If the .Ar all argument is given, .Nm will exit despite the source of the command after closing all existing connections. .It remove|rm This command removes the given link. It is only really useful in multi-link mode. A link must be in the .Dv CLOSED state before it is removed. .It rename|mv Ar name This command renames the given link to .Ar name . It will fail if .Ar name is already used by another link. .Pp The default link name is .Sq deflink . Renaming it to .Sq modem , .Sq cuau0 or .Sq USR may make the log file more readable. .It resolv Ar command This command controls .Nm Ns No 's manipulation of the .Xr resolv.conf 5 file. When .Nm starts up, it loads the contents of this file into memory and retains this image for future use. .Ar command is one of the following: .Bl -tag -width readonly .It Em readonly Treat .Pa /etc/resolv.conf as read only. If .Dq dns is enabled, .Nm will still attempt to negotiate nameservers with the peer, making the results available via the .Dv DNS0 and .Dv DNS1 macros. This is the opposite of the .Dq resolv writable command. .It Em reload Reload .Pa /etc/resolv.conf into memory. This may be necessary if for example a DHCP client overwrote .Pa /etc/resolv.conf . .It Em restore Replace .Pa /etc/resolv.conf with the version originally read at startup or with the last .Dq resolv reload command. This is sometimes a useful command to put in the .Pa /etc/ppp/ppp.linkdown file. .It Em rewrite Rewrite the .Pa /etc/resolv.conf file. This command will work even if the .Dq resolv readonly command has been used. It may be useful as a command in the .Pa /etc/ppp/ppp.linkup file if you wish to defer updating .Pa /etc/resolv.conf until after other commands have finished. .It Em writable Allow .Nm to update .Pa /etc/resolv.conf if .Dq dns is enabled and .Nm successfully negotiates a DNS. This is the opposite of the .Dq resolv readonly command. .El .It save This option is not (yet) implemented. .It sendident This command tells .Nm to identify itself to the peer. The link must be in LCP state or higher. If no identity has been set (via the .Ic ident command), .Ic sendident will fail. .Pp When an identity has been set, .Nm will automatically identify itself when it sends or receives a configure reject, when negotiation fails or when LCP reaches the opened state. .Pp Received identification packets are logged to the LCP log (see .Ic set log for details) and are never responded to. .It set Ns Xo .Op up .Ar var value .Xc This option allows the setting of any of the following variables: .Bl -tag -width 2n .It set accmap Ar hex-value ACCMap stands for Asynchronous Control Character Map. This is always negotiated with the peer, and defaults to a value of 00000000 in hex. This protocol is required to defeat hardware that depends on passing certain characters from end to end (such as XON/XOFF etc). .Pp For the XON/XOFF scenario, use .Dq set accmap 000a0000 . .It set Oo auth Oc Ns Xo .No key Ar value .Xc This sets the authentication key (or password) used in client mode PAP or CHAP negotiation to the given value. It also specifies the password to be used in the dial or login scripts in place of the .Sq \eP sequence, preventing the actual password from being logged. If .Ar command or .Ar chat logging is in effect, .Ar value is logged as .Sq ******** for security reasons. .Pp If the first character of .Ar value is an exclamation mark .Pq Dq !\& , .Nm treats the remainder of the string as a program that must be executed to determine the .Dq authname and .Dq authkey values. .Pp If the .Dq !\& is doubled up (to .Dq !! ) , it is treated as a single literal .Dq !\& , otherwise, ignoring the .Dq !\& , .Ar value is parsed as a program to execute in the same was as the .Dq !bg command above, substituting special names in the same manner. Once executed, .Nm will feed the program three lines of input, each terminated by a newline character: .Bl -bullet .It The host name as sent in the CHAP challenge. .It The challenge string as sent in the CHAP challenge. .It The locally defined .Dq authname . .El .Pp Two lines of output are expected: .Bl -bullet .It The .Dq authname to be sent with the CHAP response. .It The .Dq authkey , which is encrypted with the challenge and request id, the answer being sent in the CHAP response packet. .El .Pp When configuring .Nm in this manner, it is expected that the host challenge is a series of ASCII digits or characters. An encryption device or Secure ID card is usually required to calculate the secret appropriate for the given challenge. .It set authname Ar id This sets the authentication id used in client mode PAP or CHAP negotiation. .Pp If used in .Fl direct mode with CHAP enabled, .Ar id is used in the initial authentication challenge and should normally be set to the local machine name. .It set autoload Xo .Ar min-percent max-percent period .Xc These settings apply only in multi-link mode and default to zero, zero and five respectively. When more than one .Ar demand-dial (also known as .Fl auto ) mode link is available, only the first link is made active when .Nm first reads data from the tun device. The next .Ar demand-dial link will be opened only when the current bundle throughput is at least .Ar max-percent percent of the total bundle bandwidth for .Ar period seconds. When the current bundle throughput decreases to .Ar min-percent percent or less of the total bundle bandwidth for .Ar period seconds, a .Ar demand-dial link will be brought down as long as it is not the last active link. .Pp Bundle throughput is measured as the maximum of inbound and outbound traffic. .Pp The default values cause .Ar demand-dial links to simply come up one at a time. .Pp Certain devices cannot determine their physical bandwidth, so it is sometimes necessary to use the .Dq set bandwidth command (described below) to make .Dq set autoload work correctly. .It set bandwidth Ar value This command sets the connection bandwidth in bits per second. .Ar value must be greater than zero. It is currently only used by the .Dq set autoload command above. .It set callback Ar option Ns No ... If no arguments are given, callback is disabled, otherwise, .Nm will request (or in .Fl direct mode, will accept) one of the given .Ar option Ns No s . In client mode, if an .Ar option is NAK'd .Nm will request a different .Ar option , until no options remain at which point .Nm will terminate negotiations (unless .Dq none is one of the specified .Ar option ) . In server mode, .Nm will accept any of the given protocols - but the client .Em must request one of them. If you wish callback to be optional, you must {include} .Ar none as an option. .Pp The .Ar option Ns No s are as follows (in this order of preference): .Bl -tag -width Ds .It auth The callee is expected to decide the callback number based on authentication. If .Nm is the callee, the number should be specified as the fifth field of the peers entry in .Pa /etc/ppp/ppp.secret . .It cbcp Microsoft's callback control protocol is used. See .Dq set cbcp below. .Pp If you wish to negotiate .Ar cbcp in client mode but also wish to allow the server to request no callback at CBCP negotiation time, you must specify both .Ar cbcp and .Ar none as callback options. .It E.164 *| Ns Xo .Ar number Ns Op , Ns Ar number Ns .No ... .Xc The caller specifies the .Ar number . If .Nm is the callee, .Ar number should be either a comma separated list of allowable numbers or a .Dq \&* , meaning any number is permitted. If .Nm is the caller, only a single number should be specified. .Pp Note, this option is very unsafe when used with a .Dq \&* as a malicious caller can tell .Nm to call any (possibly international) number without first authenticating themselves. .It none If the peer does not wish to do callback at all, .Nm will accept the fact and continue without callback rather than terminating the connection. This is required (in addition to one or more other callback options) if you wish callback to be optional. .El .It set cbcp Oo .No *| Ns Ar number Ns Oo .No , Ns Ar number Ns ...\& Oc .Op Ar delay Op Ar retry .Oc If no arguments are given, CBCP (Microsoft's CallBack Control Protocol) is disabled - ie, configuring CBCP in the .Dq set callback command will result in .Nm requesting no callback in the CBCP phase. Otherwise, .Nm attempts to use the given phone .Ar number Ns No (s). .Pp In server mode .Pq Fl direct , .Nm will insist that the client uses one of these numbers, unless .Dq \&* is used in which case the client is expected to specify the number. .Pp In client mode, .Nm will attempt to use one of the given numbers (whichever it finds to be agreeable with the peer), or if .Dq \&* is specified, .Nm will expect the peer to specify the number. .It set cd Oo .No off| Ns Ar seconds Ns Op !\& .Oc Normally, .Nm checks for the existence of carrier depending on the type of device that has been opened: .Bl -tag -width XXX -offset XXX .It Terminal Devices Carrier is checked one second after the login script is complete. If it is not set, .Nm assumes that this is because the device does not support carrier (which is true for most .Dq laplink NULL-modem cables), logs the fact and stops checking for carrier. .Pp As ptys do not support the TIOCMGET ioctl, the tty device will switch all carrier detection off when it detects that the device is a pty. .It PPPoE (netgraph) Devices Carrier is checked once per second for 5 seconds. If it is not set after the fifth second, the connection attempt is considered to have failed and the device is closed. Carrier is always required for PPPoE devices. .El .Pp All other device types do not support carrier. Setting a carrier value will result in a warning when the device is opened. .Pp Some modems take more than one second after connecting to assert the carrier signal. If this delay is not increased, this will result in .Nm Ns No 's inability to detect when the link is dropped, as .Nm assumes that the device is not asserting carrier. .Pp The .Dq set cd command overrides the default carrier behaviour. .Ar seconds specifies the maximum number of seconds that .Nm should wait after the dial script has finished before deciding if carrier is available or not. .Pp If .Dq off is specified, .Nm will not check for carrier on the device, otherwise .Nm will not proceed to the login script until either carrier is detected or until .Ar seconds has elapsed, at which point .Nm assumes that the device will not set carrier. .Pp If no arguments are given, carrier settings will go back to their default values. .Pp If .Ar seconds is followed immediately by an exclamation mark .Pq Dq !\& , .Nm will .Em require carrier. If carrier is not detected after .Ar seconds seconds, the link will be disconnected. .It set choked Op Ar timeout This sets the number of seconds that .Nm will keep a choked output queue before dropping all pending output packets. If .Ar timeout is less than or equal to zero or if .Ar timeout is not specified, it is set to the default value of .Em 120 seconds . .Pp A choked output queue occurs when .Nm has read a certain number of packets from the local network for transmission, but cannot send the data due to link failure (the peer is busy etc.). .Nm will not read packets indefinitely. Instead, it reads up to .Em 30 packets (or .Em 30 No + .Em nlinks No * .Em 2 packets in multi-link mode), then stops reading the network interface until either .Ar timeout seconds have passed or at least one packet has been sent. .Pp If .Ar timeout seconds pass, all pending output packets are dropped. .It set ctsrts|crtscts on|off This sets hardware flow control. Hardware flow control is .Ar on by default. .It set deflate Ar out-winsize Op Ar in-winsize This sets the DEFLATE algorithms default outgoing and incoming window sizes. Both .Ar out-winsize and .Ar in-winsize must be values between .Em 8 and .Em 15 . If .Ar in-winsize is specified, .Nm will insist that this window size is used and will not accept any other values from the peer. .It set dns Op Ar primary Op Ar secondary This command specifies DNS overrides for the .Dq accept dns command. Refer to the .Dq accept command description above for details. This command does not affect the IP numbers requested using .Dq enable dns . .It set device|line Xo .Ar value Ns No ... .Xc This sets the device(s) to which .Nm will talk to the given .Dq value . .Pp All serial device names are expected to begin with .Pa /dev/ . Serial devices are usually called .Pa cuaXX . .Pp If .Dq value does not begin with .Pa /dev/ , it must either begin with an exclamation mark .Pq Dq !\& , be of the format .No PPPoE: Ns Ar iface Ns Xo .Op \&: Ns Ar provider Ns .Xc (on .Xr netgraph 4 enabled systems), or be of the format .Sm off .Ar host : port Op /tcp|udp . .Sm on .Pp If it begins with an exclamation mark, the rest of the device name is treated as a program name, and that program is executed when the device is opened. Standard input, output and error are fed back to .Nm and are read and written as if they were a regular device. .Pp If a .No PPPoE: Ns Ar iface Ns Xo .Op \&: Ns Ar provider Ns .Xc specification is given, .Nm will attempt to create a .Em PPP over Ethernet connection using the given .Ar iface interface by using .Xr netgraph 4 . If .Xr netgraph 4 is not available, .Nm will attempt to load it using .Xr kldload 2 . If this fails, an external program must be used such as the .Xr pppoed 8 program available under .Ox . The given .Ar provider is passed as the service name in the PPPoE Discovery Initiation (PADI) packet. If no provider is given, an empty value will be used. .Pp When a PPPoE connection is established, .Nm will place the name of the Access Concentrator in the environment variable .Ev ACNAME . .Pp Refer to .Xr netgraph 4 and .Xr ng_pppoe 4 for further details. .Pp If a .Ar host Ns No : Ns Ar port Ns Oo .No /tcp|udp .Oc specification is given, .Nm will attempt to connect to the given .Ar host on the given .Ar port . If a .Dq /tcp or .Dq /udp suffix is not provided, the default is .Dq /tcp . Refer to the section on .Em PPP OVER TCP and UDP above for further details. .Pp If multiple .Dq values are specified, .Nm will attempt to open each one in turn until it succeeds or runs out of devices. .It set dial Ar chat-script This specifies the chat script that will be used to dial the other side. See also the .Dq set login command below. Refer to .Xr chat 8 and to the example configuration files for details of the chat script format. It is possible to specify some special .Sq values in your chat script as follows: .Bl -tag -width 2n .It Li \ec When used as the last character in a .Sq send string, this indicates that a newline should not be appended. .It Li \ed When the chat script encounters this sequence, it delays two seconds. .It Li \ep When the chat script encounters this sequence, it delays for one quarter of a second. .It Li \en This is replaced with a newline character. .It Li \er This is replaced with a carriage return character. .It Li \es This is replaced with a space character. .It Li \et This is replaced with a tab character. .It Li \eT This is replaced by the current phone number (see .Dq set phone below). .It Li \eP This is replaced by the current .Ar authkey value (see .Dq set authkey above). .It Li \eU This is replaced by the current .Ar authname value (see .Dq set authname above). .El .Pp Note that two parsers will examine these escape sequences, so in order to have the .Sq chat parser see the escape character, it is necessary to escape it from the .Sq command parser . This means that in practice you should use two escapes, for example: .Bd -literal -offset indent set dial "... ATDT\\\\T CONNECT" .Ed .Pp It is also possible to execute external commands from the chat script. To do this, the first character of the expect or send string is an exclamation mark .Pq Dq !\& . If a literal exclamation mark is required, double it up to .Dq !!\& and it will be treated as a single literal .Dq !\& . When the command is executed, standard input and standard output are directed to the open device (see the .Dq set device command), and standard error is read by .Nm and substituted as the expect or send string. If .Nm is running in interactive mode, file descriptor 3 is attached to .Pa /dev/tty . .Pp For example (wrapped for readability): .Bd -literal -offset indent set login "TIMEOUT 5 \\"\\" \\"\\" login:--login: ppp \e word: ppp \\"!sh \\\\-c \\\\\\"echo \\\\-n label: >&2\\\\\\"\\" \e \\"!/bin/echo in\\" HELLO" .Ed .Pp would result in the following chat sequence (output using the .Sq set log local chat command before dialing): .Bd -literal -offset indent Dial attempt 1 of 1 dial OK! Chat: Expecting: Chat: Sending: Chat: Expecting: login:--login: Chat: Wait for (5): login: Chat: Sending: ppp Chat: Expecting: word: Chat: Wait for (5): word: Chat: Sending: ppp Chat: Expecting: !sh \\-c "echo \\-n label: >&2" Chat: Exec: sh -c "echo -n label: >&2" Chat: Wait for (5): !sh \\-c "echo \\-n label: >&2" --> label: Chat: Exec: /bin/echo in Chat: Sending: Chat: Expecting: HELLO Chat: Wait for (5): HELLO login OK! .Ed .Pp Note (again) the use of the escape character, allowing many levels of nesting. Here, there are four parsers at work. The first parses the original line, reading it as three arguments. The second parses the third argument, reading it as 11 arguments. At this point, it is important that the .Dq \&- signs are escaped, otherwise this parser will see them as constituting an expect-send-expect sequence. When the .Dq !\& character is seen, the execution parser reads the first command as three arguments, and then .Xr sh 1 itself expands the argument after the .Fl c . As we wish to send the output back to the modem, in the first example we redirect our output to file descriptor 2 (stderr) so that .Nm itself sends and logs it, and in the second example, we just output to stdout, which is attached directly to the modem. .Pp This, of course means that it is possible to execute an entirely external .Dq chat command rather than using the internal one. See .Xr chat 8 for a good alternative. .Pp The external command that is executed is subjected to the same special word expansions as the .Dq !bg command. .It set enddisc Op label|IP|MAC|magic|psn value This command sets our local endpoint discriminator. If set prior to LCP negotiation, and if no .Dq disable enddisc command has been used, .Nm will send the information to the peer using the LCP endpoint discriminator option. The following discriminators may be set: .Bl -tag -width indent .It Li label The current label is used. .It Li IP Our local IP number is used. As LCP is negotiated prior to IPCP, it is possible that the IPCP layer will subsequently change this value. If it does, the endpoint discriminator stays at the old value unless manually reset. .It Li MAC This is similar to the .Ar IP option above, except that the MAC address associated with the local IP number is used. If the local IP number is not resident on any Ethernet interface, the command will fail. .Pp As the local IP number defaults to whatever the machine host name is, .Dq set enddisc mac is usually done prior to any .Dq set ifaddr commands. .It Li magic A 20 digit random number is used. Care should be taken when using magic numbers as restarting .Nm or creating a link using a different .Nm invocation will also use a different magic number and will therefore not be recognised by the peer as belonging to the same bundle. This makes it unsuitable for .Fl direct connections. .It Li psn Ar value The given .Ar value is used. .Ar Value should be set to an absolute public switched network number with the country code first. .El .Pp If no arguments are given, the endpoint discriminator is reset. .It set escape Ar value... This option is similar to the .Dq set accmap option above. It allows the user to specify a set of characters that will be .Sq escaped as they travel across the link. .It set filter dial|alive|in|out Ar rule-no Xo .No permit|deny|clear| Ns Ar rule-no .Op !\& .Oo Op host .Ar src_addr Ns Op / Ns Ar width .Op Ar dst_addr Ns Op / Ns Ar width .Oc [ Ns Ar proto .Op src lt|eq|gt Ar port .Op dst lt|eq|gt Ar port .Op estab .Op syn .Op finrst .Op timeout Ar secs ] .Xc .Nm supports four filter sets. The .Em alive filter specifies packets that keep the connection alive - resetting the idle timer. The .Em dial filter specifies packets that cause .Nm to dial when in .Fl auto mode. The .Em in filter specifies packets that are allowed to travel into the machine and the .Em out filter specifies packets that are allowed out of the machine. .Pp Filtering is done prior to any IP alterations that might be done by the NAT engine on outgoing packets and after any IP alterations that might be done by the NAT engine on incoming packets. By default all empty filter sets allow all packets to pass. Rules are processed in order according to .Ar rule-no (unless skipped by specifying a rule number as the .Ar action ) . Up to 40 rules may be given for each set. If a packet does not match any of the rules in a given set, it is discarded. In the case of .Em in and .Em out filters, this means that the packet is dropped. In the case of .Em alive filters it means that the packet will not reset the idle timer (even if the .Ar in Ns No / Ns Ar out filter has a .Dq timeout value) and in the case of .Em dial filters it means that the packet will not trigger a dial. A packet failing to trigger a dial will be dropped rather than queued. Refer to the section on .Sx PACKET FILTERING above for further details. .It set hangup Ar chat-script This specifies the chat script that will be used to reset the device before it is closed. It should not normally be necessary, but can be used for devices that fail to reset themselves properly on close. .It set help|? Op Ar command This command gives a summary of available set commands, or if .Ar command is specified, the command usage is shown. .It set ifaddr Oo Ar myaddr Ns .Op / Ns Ar \&nn .Oo Ar hisaddr Ns Op / Ns Ar \&nn .Oo Ar netmask .Op Ar triggeraddr .Oc Oc .Oc This command specifies the IP addresses that will be used during IPCP negotiation. Addresses are specified using the format .Pp .Dl a.b.c.d/nn .Pp Where .Dq a.b.c.d is the preferred IP, but .Ar nn specifies how many bits of the address we will insist on. If .No / Ns Ar nn is omitted, it defaults to .Dq /32 unless the IP address is 0.0.0.0 in which case it defaults to .Dq /0 . .Pp If you wish to assign a dynamic IP number to the peer, .Ar hisaddr may also be specified as a range of IP numbers in the format .Bd -ragged -offset indent .Ar \&IP Ns Oo \&- Ns Ar \&IP Ns Oc Ns Oo , Ns Ar \&IP Ns .Oo \&- Ns Ar \&IP Ns Oc Oc Ns ... .Ed .Pp for example: .Pp .Dl set ifaddr 10.0.0.1 10.0.1.2-10.0.1.10,10.0.1.20 .Pp will only negotiate .Dq 10.0.0.1 as the local IP number, but may assign any of the given 10 IP numbers to the peer. If the peer requests one of these numbers, and that number is not already in use, .Nm will grant the peers request. This is useful if the peer wants to re-establish a link using the same IP number as was previously allocated (thus maintaining any existing tcp or udp connections). .Pp If the peer requests an IP number that is either outside of this range or is already in use, .Nm will suggest a random unused IP number from the range. .Pp If .Ar triggeraddr is specified, it is used in place of .Ar myaddr in the initial IPCP negotiation. However, only an address in the .Ar myaddr range will be accepted. This is useful when negotiating with some .Dv PPP implementations that will not assign an IP number unless their peer requests .Dq 0.0.0.0 . .Pp It should be noted that in .Fl auto mode, .Nm will configure the interface immediately upon reading the .Dq set ifaddr line in the config file. In any other mode, these values are just used for IPCP negotiations, and the interface is not configured until the IPCP layer is up. .Pp Note that the .Ar HISADDR argument may be overridden by the third field in the .Pa ppp.secret file once the client has authenticated itself (if PAP or CHAP are .Dq enabled ) . Refer to the .Sx AUTHENTICATING INCOMING CONNECTIONS section for details. .Pp In all cases, if the interface is already configured, .Nm will try to maintain the interface IP numbers so that any existing bound sockets will remain valid. .It set ifqueue Ar packets Set the maximum number of packets that .Nm will read from the tunnel interface while data cannot be sent to any of the available links. This queue limit is necessary to flow control outgoing data as the tunnel interface is likely to be far faster than the combined links available to .Nm . .Pp If .Ar packets is set to a value less than the number of links, .Nm will read up to that value regardless. This prevents any possible latency problems. .Pp The default value for .Ar packets is .Dq 30 . .It set ccpretry|ccpretries Oo Ar timeout .Op Ar reqtries Op Ar trmtries .Oc .It set chapretry|chapretries Oo Ar timeout .Op Ar reqtries .Oc .It set ipcpretry|ipcpretries Oo Ar timeout .Op Ar reqtries Op Ar trmtries .Oc .It set ipv6cpretry|ipv6cpretries Oo Ar timeout .Op Ar reqtries Op Ar trmtries .Oc .It set lcpretry|lcpretries Oo Ar timeout .Op Ar reqtries Op Ar trmtries .Oc .It set papretry|papretries Oo Ar timeout .Op Ar reqtries .Oc These commands set the number of seconds that .Nm will wait before resending Finite State Machine (FSM) Request packets. The default .Ar timeout for all FSMs is 3 seconds (which should suffice in most cases). .Pp If .Ar reqtries is specified, it tells .Nm how many configuration request attempts it should make while receiving no reply from the peer before giving up. The default is 5 attempts for CCP, LCP and IPCP and 3 attempts for PAP and CHAP. .Pp If .Ar trmtries is specified, it tells .Nm how many terminate requests should be sent before giving up waiting for the peers response. The default is 3 attempts. Authentication protocols are not terminated and it is therefore invalid to specify .Ar trmtries for PAP or CHAP. .Pp In order to avoid negotiations with the peer that will never converge, .Nm will only send at most 3 times the configured number of .Ar reqtries in any given negotiation session before giving up and closing that layer. .It set log Xo .Op local .Op +|- Ns .Ar value Ns No ... .Xc This command allows the adjustment of the current log level. Refer to the Logging Facility section for further details. .It set login Ar chat-script This .Ar chat-script compliments the dial-script. If both are specified, the login script will be executed after the dial script. Escape sequences available in the dial script are also available here. .It set logout Ar chat-script This specifies the chat script that will be used to logout before the hangup script is called. It should not normally be necessary. .It set lqrperiod|echoperiod Ar frequency This command sets the .Ar frequency in seconds at which .Em LQR or .Em LCP ECHO packets are sent. The default is 30 seconds. You must also use the .Dq enable lqr and/or .Dq enable echo commands if you wish to send .Em LQR or .Em LCP ECHO requests to the peer. .It set mode Ar interactive|auto|ddial|background This command allows you to change the .Sq mode of the specified link. This is normally only useful in multi-link mode, but may also be used in uni-link mode. .Pp It is not possible to change a link that is .Sq direct or .Sq dedicated . .Pp Note: If you issue the command .Dq set mode auto , and have network address translation enabled, it may be useful to .Dq enable iface-alias afterwards. This will allow .Nm to do the necessary address translations to enable the process that triggers the connection to connect once the link is up despite the peer assigning us a new (dynamic) IP address. .It set mppe Op 40|56|128|* Op stateless|stateful|* This option selects the encryption parameters used when negotiation MPPE. MPPE can be disabled entirely with the .Dq disable mppe command. If no arguments are given, .Nm will attempt to negotiate a stateful link with a 128 bit key, but will agree to whatever the peer requests (including no encryption at all). .Pp If any arguments are given, .Nm will .Em insist on using MPPE and will close the link if it is rejected by the peer (Note; this behaviour can be overridden by a configured RADIUS server). .Pp The first argument specifies the number of bits that .Nm should insist on during negotiations and the second specifies whether .Nm should insist on stateful or stateless mode. In stateless mode, the encryption dictionary is re-initialised with every packet according to an encryption key that is changed with every packet. In stateful mode, the encryption dictionary is re-initialised every 256 packets or after the loss of any data and the key is changed every 256 packets. Stateless mode is less efficient but is better for unreliable transport layers. .It set mrru Op Ar value Setting this option enables Multi-link PPP negotiations, also known as Multi-link Protocol or MP. There is no default MRRU (Maximum Reconstructed Receive Unit) value. If no argument is given, multi-link mode is disabled. .It set mru Xo .Op max Ns Op imum .Op Ar value .Xc The default MRU (Maximum Receive Unit) is 1500. If it is increased, the other side *may* increase its MTU. In theory there is no point in decreasing the MRU to below the default as the .Em PPP protocol says implementations *must* be able to accept packets of at least 1500 octets. .Pp If the .Dq maximum keyword is used, .Nm will refuse to negotiate a higher value. The maximum MRU can be set to 2048 at most. Setting a maximum of less than 1500 violates the .Em PPP rfc, but may sometimes be necessary. For example, .Em PPPoE imposes a maximum of 1492 due to hardware limitations. .Pp If no argument is given, 1500 is assumed. A value must be given when .Dq maximum is specified. .It set mtu Xo .Op max Ns Op imum .Op Ar value .Xc The default MTU is 1500. At negotiation time, .Nm will accept whatever MRU the peer requests (assuming it is not less than 296 bytes or greater than the assigned maximum). If the MTU is set, .Nm will not accept MRU values less than .Ar value . When negotiations are complete, the MTU is used when writing to the interface, even if the peer requested a higher value MRU. This can be useful for limiting your packet size (giving better bandwidth sharing at the expense of more header data). .Pp If the .Dq maximum keyword is used, .Nm will refuse to negotiate a higher value. The maximum MTU can be set to 2048 at most. Note, it is necessary to use the .Dq maximum keyword to limit the MTU when using PPPoE. .Pp If no .Ar value is given, 1500, or whatever the peer asks for is used. A value must be given when .Dq maximum is specified. .It set nbns Op Ar x.x.x.x Op Ar y.y.y.y This option allows the setting of the Microsoft NetBIOS name server values to be returned at the peers request. If no values are given, .Nm will reject any such requests. .It set openmode active|passive Op Ar delay By default, .Ar openmode is always .Ar active with a one second .Ar delay . That is, .Nm will always initiate LCP/IPCP/CCP negotiation one second after the line comes up. If you want to wait for the peer to initiate negotiations, you can use the value .Ar passive . If you want to initiate negotiations immediately or after more than one second, the appropriate .Ar delay may be specified here in seconds. .It set parity odd|even|none|mark This allows the line parity to be set. The default value is .Ar none . .It set phone Ar telno Ns Xo .Oo \&| Ns Ar backupnumber Oc Ns ... Ns Oo : Ns Ar nextnumber Oc Ns ... Xc This allows the specification of the phone number to be used in place of the \\\\T string in the dial and login chat scripts. Multiple phone numbers may be given separated either by a pipe .Pq Dq \&| or a colon .Pq Dq \&: . .Pp Numbers after the pipe are only dialed if the dial or login script for the previous number failed. .Pp Numbers after the colon are tried sequentially, irrespective of the reason the line was dropped. .Pp If multiple numbers are given, .Nm will dial them according to these rules until a connection is made, retrying the maximum number of times specified by .Dq set redial below. In .Fl background mode, each number is attempted at most once. .It set pppoe Op standard|3Com This option configures the underlying .Xr ng_pppoe 4 node to either standard RFC2516 PPPoE or proprietary 3Com mode. If not set the system default will be used. .It set Oo proc Oc Ns Xo .No title Op Ar value .Xc The current process title as displayed by .Xr ps 1 is changed according to .Ar value . If .Ar value is not specified, the original process title is restored. All the word replacements done by the shell commands (see the .Dq bg command above) are done here too. .Pp Note, if USER is required in the process title, the .Dq set proctitle command must appear in .Pa ppp.linkup , as it is not known when the commands in .Pa ppp.conf are executed. .It set radius Op Ar config-file This command enables RADIUS support (if it is compiled in). .Ar config-file refers to the radius client configuration file as described in .Xr radius.conf 5 . If PAP, CHAP, MSCHAP or MSCHAPv2 are .Dq enable Ns No d , .Nm behaves as a .Em \&N Ns No etwork .Em \&A Ns No ccess .Em \&S Ns No erver and uses the configured RADIUS server to authenticate rather than authenticating from the .Pa ppp.secret file or from the passwd database. .Pp If none of PAP, CHAP, MSCHAP or MSCHAPv2 are enabled, .Dq set radius will do nothing. .Pp .Nm uses the following attributes from the RADIUS reply: .Bl -tag -width XXX -offset XXX .It RAD_FRAMED_IP_ADDRESS The peer IP address is set to the given value. .It RAD_FRAMED_IP_NETMASK The tun interface netmask is set to the given value. .It RAD_FRAMED_MTU If the given MTU is less than the peers MRU as agreed during LCP negotiation, *and* it is less that any configured MTU (see the .Dq set mru command), the tun interface MTU is set to the given value. .It RAD_FRAMED_COMPRESSION If the received compression type is .Dq 1 , .Nm will request VJ compression during IPCP negotiations despite any .Dq disable vj configuration command. .It RAD_FILTER_ID If this attribute is supplied, .Nm will attempt to use it as an additional label to load from the .Pa ppp.linkup and .Pa ppp.linkdown files. The load will be attempted before (and in addition to) the normal label search. If the label does not exist, no action is taken and .Nm proceeds to the normal load using the current label. .It RAD_FRAMED_ROUTE The received string is expected to be in the format .Ar dest Ns Op / Ns Ar bits .Ar gw .Op Ar metrics . Any specified metrics are ignored. .Dv MYADDR and .Dv HISADDR are understood as valid values for .Ar dest and .Ar gw , .Dq default can be used for .Ar dest to sepcify the default route, and .Dq 0.0.0.0 is understood to be the same as .Dq default for .Ar dest and .Dv HISADDR for .Ar gw . .Pp For example, a returned value of .Dq 1.2.3.4/24 0.0.0.0 1 2 -1 3 400 would result in a routing table entry to the 1.2.3.0/24 network via .Dv HISADDR and a returned value of .Dq 0.0.0.0 0.0.0.0 or .Dq default HISADDR would result in a default route to .Dv HISADDR . .Pp All RADIUS routes are applied after any sticky routes are applied, making RADIUS routes override configured routes. This also applies for RADIUS routes that do not {include} the .Dv MYADDR or .Dv HISADDR keywords. .It RAD_FRAMED_IPV6_PREFIX If this attribute is supplied, the value is substituted for IPV6PREFIX in a command. You may pass it to an upper layer protocol such as DHCPv6 for delegating an IPv6 prefix to a peer. .It RAD_FRAMED_IPV6_ROUTE The received string is expected to be in the format .Ar dest Ns Op / Ns Ar bits .Ar gw .Op Ar metrics . Any specified metrics are ignored. .Dv MYADDR6 and .Dv HISADDR6 are understood as valid values for .Ar dest and .Ar gw , .Dq default can be used for .Ar dest to sepcify the default route, and .Dq :: is understood to be the same as .Dq default for .Ar dest and .Dv HISADDR6 for .Ar gw . .Pp For example, a returned value of .Dq 3ffe:505:abcd::/48 :: would result in a routing table entry to the 3ffe:505:abcd::/48 network via .Dv HISADDR6 and a returned value of .Dq :: :: or .Dq default HISADDR6 would result in a default route to .Dv HISADDR6 . .Pp All RADIUS IPv6 routes are applied after any sticky routes are applied, making RADIUS IPv6 routes override configured routes. This also applies for RADIUS IPv6 routes that do not {include} the .Dv MYADDR6 or .Dv HISADDR6 keywords. .It RAD_SESSION_TIMEOUT If supplied, the client connection is closed after the given number of seconds. .It RAD_REPLY_MESSAGE If supplied, this message is passed back to the peer as the authentication SUCCESS text. .It RAD_MICROSOFT_MS_CHAP_ERROR If this .Dv RAD_VENDOR_MICROSOFT vendor specific attribute is supplied, it is passed back to the peer as the authentication FAILURE text. .It RAD_MICROSOFT_MS_CHAP2_SUCCESS If this .Dv RAD_VENDOR_MICROSOFT vendor specific attribute is supplied and if MS-CHAPv2 authentication is being used, it is passed back to the peer as the authentication SUCCESS text. .It RAD_MICROSOFT_MS_MPPE_ENCRYPTION_POLICY If this .Dv RAD_VENDOR_MICROSOFT vendor specific attribute is supplied and has a value of 2 (Required), .Nm will insist that MPPE encryption is used (even if no .Dq set mppe configuration command has been given with arguments). If it is supplied with a value of 1 (Allowed), encryption is made optional (despite any .Dq set mppe configuration commands with arguments). .It RAD_MICROSOFT_MS_MPPE_ENCRYPTION_TYPES If this .Dv RAD_VENDOR_MICROSOFT vendor specific attribute is supplied, bits 1 and 2 are examined. If either or both are set, 40 bit and/or 128 bit (respectively) encryption options are set, overriding any given first argument to the .Dq set mppe command. Note, it is not currently possible for the RADIUS server to specify 56 bit encryption. .It RAD_MICROSOFT_MS_MPPE_RECV_KEY If this .Dv RAD_VENDOR_MICROSOFT vendor specific attribute is supplied, it is value is used as the master key for decryption of incoming data. When clients are authenticated using MSCHAPv2, the RADIUS server MUST provide this attribute if inbound MPPE is to function. .It RAD_MICROSOFT_MS_MPPE_SEND_KEY If this .Dv RAD_VENDOR_MICROSOFT vendor specific attribute is supplied, it is value is used as the master key for encryption of outgoing data. When clients are authenticated using MSCHAPv2, the RADIUS server MUST provide this attribute if outbound MPPE is to function. .El .Pp Values received from the RADIUS server may be viewed using .Dq show bundle . .It set rad_alive Ar timeout When RADIUS is configured, setting .Dq rad_alive to a non-zero .Ar timeout value will tell .Nm to sent RADIUS accounting information to the RADIUS server every .Ar timeout seconds. .It set rad_port_id Ar option When RADIUS is configured, setting the .Dq rad_port_id value allows to specify what should be sent to the RADIUS server as NAS-Port-Id. The .Ar option Ns No s are as follows: .Bl -tag -width Ds .It pid PID of the corresponding tunnel. .It tunnum .Xr tun 4 interface number. .It ifnum index of the interface as returned by .Xr if_nametoindex 3 . .It default keeps the default behavior. .El .It set reconnect Ar timeout ntries Should the line drop unexpectedly (due to loss of CD or LQR failure), a connection will be re-established after the given .Ar timeout . The line will be re-connected at most .Ar ntries times. .Ar Ntries defaults to zero. A value of .Ar random for .Ar timeout will result in a variable pause, somewhere between 1 and 30 seconds. .It set recvpipe Op Ar value This sets the routing table RECVPIPE value. The optimum value is just over twice the MTU value. If .Ar value is unspecified or zero, the default kernel controlled value is used. .It set redial Ar secs Ns Xo .Oo + Ns Ar inc Ns .Oo - Ns Ar max Ns Oc Oc Ns .Op . Ns Ar next .Op Ar attempts .Xc .Nm can be instructed to attempt to redial .Ar attempts times. If more than one phone number is specified (see .Dq set phone above), a pause of .Ar next is taken before dialing each number. A pause of .Ar secs is taken before starting at the first number again. A literal value of .Dq Li random may be used here in place of .Ar secs and .Ar next , causing a random delay of between 1 and 30 seconds. .Pp If .Ar inc is specified, its value is added onto .Ar secs each time .Nm tries a new number. .Ar secs will only be incremented at most .Ar max times. .Ar max defaults to 10. .Pp Note, the .Ar secs delay will be effective, even after .Ar attempts has been exceeded, so an immediate manual dial may appear to have done nothing. If an immediate dial is required, a .Dq !\& should immediately follow the .Dq open keyword. See the .Dq open description above for further details. .It set sendpipe Op Ar value This sets the routing table SENDPIPE value. The optimum value is just over twice the MTU value. If .Ar value is unspecified or zero, the default kernel controlled value is used. .It "set server|socket" Ar TcpPort Ns No \&| Ns Xo .Ar LocalName Ns No |none|open|closed .Op password Op Ar mask .Xc This command tells .Nm to listen on the given socket or .Sq diagnostic port for incoming command connections. .Pp The word .Dq none instructs .Nm to close any existing socket and clear the socket configuration. The word .Dq open instructs .Nm to attempt to re-open the port. The word .Dq closed instructs .Nm to close the open port. .Pp If you wish to specify a local domain socket, .Ar LocalName must be specified as an absolute file name, otherwise it is assumed to be the name or number of a TCP port. You may specify the octal umask to be used with a local domain socket. Refer to .Xr umask 2 for umask details. Refer to .Xr services 5 for details of how to translate TCP port names. .Pp You must also specify the password that must be entered by the client (using the .Dq passwd variable above) when connecting to this socket. If the password is specified as an empty string, no password is required for connecting clients. .Pp When specifying a local domain socket, the first .Dq %d sequence found in the socket name will be replaced with the current interface unit number. This is useful when you wish to use the same profile for more than one connection. .Pp In a similar manner TCP sockets may be prefixed with the .Dq + character, in which case the current interface unit number is added to the port number. .Pp When using .Nm with a server socket, the .Xr pppctl 8 command is the preferred mechanism of communications. Currently, .Xr telnet 1 can also be used, but link encryption may be implemented in the future, so .Xr telnet 1 should be avoided. .Pp Note; .Dv SIGUSR1 and .Dv SIGUSR2 interact with the diagnostic socket. .It set speed Ar value This sets the speed of the serial device. If speed is specified as .Dq sync , .Nm treats the device as a synchronous device. .Pp Certain device types will know whether they should be specified as synchronous or asynchronous. These devices will override incorrect settings and log a warning to this effect. .It set stopped Op Ar LCPseconds Op Ar CCPseconds If this option is set, .Nm will time out after the given FSM (Finite State Machine) has been in the stopped state for the given number of .Dq seconds . This option may be useful if the peer sends a terminate request, but never actually closes the connection despite our sending a terminate acknowledgement. This is also useful if you wish to .Dq set openmode passive and time out if the peer does not send a Configure Request within the given time. Use .Dq set log +lcp +ccp to make .Nm log the appropriate state transitions. .Pp The default value is zero, where .Nm does not time out in the stopped state. .Pp This value should not be set to less than the openmode delay (see .Dq set openmode above). .It set timeout Ar idleseconds Op Ar mintimeout This command allows the setting of the idle timer. Refer to the section titled .Sx SETTING THE IDLE TIMER for further details. .Pp If .Ar mintimeout is specified, .Nm will never idle out before the link has been up for at least that number of seconds. .It set urgent Xo .Op tcp|udp|none .Oo Op +|- Ns .Ar port .Oc No ... .Xc This command controls the ports that .Nm prioritizes when transmitting data. The default priority TCP ports are ports 21 (ftp control), 22 (ssh), 23 (telnet), 513 (login), 514 (shell), 543 (klogin) and 544 (kshell). There are no priority UDP ports by default. See .Xr services 5 for details. .Pp If neither .Dq tcp or .Dq udp are specified, .Dq tcp is assumed. .Pp If no .Ar port Ns No s are given, the priority port lists are cleared (although if .Dq tcp or .Dq udp is specified, only that list is cleared). If the first .Ar port argument is prefixed with a plus .Pq Dq \&+ or a minus .Pq Dq \&- , the current list is adjusted, otherwise the list is reassigned. .Ar port Ns No s prefixed with a plus or not prefixed at all are added to the list and .Ar port Ns No s prefixed with a minus are removed from the list. .Pp If .Dq none is specified, all priority port lists are disabled and even .Dv IPTOS_LOWDELAY packets are not prioritised. .It set vj slotcomp on|off This command tells .Nm whether it should attempt to negotiate VJ slot compression. By default, slot compression is turned .Ar on . .It set vj slots Ar nslots This command sets the initial number of slots that .Nm will try to negotiate with the peer when VJ compression is enabled (see the .Sq enable command above). It defaults to a value of 16. .Ar Nslots must be between .Ar 4 and .Ar 16 inclusive. .El .It shell|! Op Ar command If .Ar command is not specified a shell is invoked according to the .Dv SHELL environment variable. Otherwise, the given .Ar command is executed. Word replacement is done in the same way as for the .Dq !bg command as described above. .Pp Use of the !\& character requires a following space as with any of the other commands. You should note that this command is executed in the foreground; .Nm will not continue running until this process has exited. Use the .Dv bg command if you wish processing to happen in the background. .It show Ar var This command allows the user to examine the following: .Bl -tag -width 2n .It show bundle Show the current bundle settings. .It show ccp Show the current CCP compression statistics. .It show compress Show the current VJ compression statistics. .It show escape Show the current escape characters. .It show filter Op Ar name List the current rules for the given filter. If .Ar name is not specified, all filters are shown. .It show hdlc Show the current HDLC statistics. .It show help|? Give a summary of available show commands. .It show iface Show the current interface information (the same as .Dq iface show ) . .It show ipcp Show the current IPCP statistics. .It show layers Show the protocol layers currently in use. .It show lcp Show the current LCP statistics. .It show Oo data Oc Ns Xo .No link .Xc Show high level link information. .It show links Show a list of available logical links. .It show log Show the current log values. .It show mem Show current memory statistics. .It show ncp Show the current NCP statistics. .It show physical Show low level link information. .It show mp Show Multi-link information. .It show proto Show current protocol totals. .It show route Show the current routing tables. .It show stopped Show the current stopped timeouts. .It show timer Show the active alarm timers. .It show version Show the current version number of .Nm . .El .It term Go into terminal mode. Characters typed at the keyboard are sent to the device. Characters read from the device are displayed on the screen. When a remote .Em PPP peer is detected, .Nm automatically enables Packet Mode and goes back into command mode. .El .Sh MORE DETAILS .Bl -bullet .It Read the example configuration files. They are a good source of information. .It Use .Dq help , .Dq nat \&? , .Dq enable \&? , .Dq set ?\& and .Dq show ?\& to get online information about what is available. .It The following URLs contain useful information: .Bl -bullet -compact .It http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/faq/ppp.html .It http://www.FreeBSD.org/doc/handbook/userppp.html .El .El .Sh FILES .Nm refers to four files: .Pa ppp.conf , .Pa ppp.linkup , .Pa ppp.linkdown and .Pa ppp.secret . These files are placed in the .Pa /etc/ppp directory. .Bl -tag -width 2n .It Pa /etc/ppp/ppp.conf System default configuration file. .It Pa /etc/ppp/ppp.secret An authorisation file for each system. .It Pa /etc/ppp/ppp.linkup A file to check when .Nm establishes a network level connection. .It Pa /etc/ppp/ppp.linkdown A file to check when .Nm closes a network level connection. .It Pa /var/log/ppp.log Logging and debugging information file. Note, this name is specified in .Pa /etc/syslog.conf . See .Xr syslog.conf 5 for further details. .It Pa /var/spool/lock/LCK..* tty port locking file. Refer to .Xr uucplock 3 for further details. .It Pa /var/run/tunN.pid The process id (pid) of the .Nm program connected to the tunN device, where .Sq N is the number of the device. .It Pa /var/run/ttyXX.if The tun interface used by this port. Again, this file is only created in .Fl background , .Fl auto and .Fl ddial modes. .It Pa /etc/services Get port number if port number is using service name. .It Pa /var/run/ppp-authname-class-value In multi-link mode, local domain sockets are created using the peer authentication name .Pq Sq authname , the peer endpoint discriminator class .Pq Sq class and the peer endpoint discriminator value .Pq Sq value . As the endpoint discriminator value may be a binary value, it is turned to HEX to determine the actual file name. .Pp This socket is used to pass links between different instances of .Nm . .El .Sh SEE ALSO .Xr at 1 , .Xr ftp 1 , .Xr gzip 1 , .Xr hostname 1 , .Xr login 1 , .Xr tcpdump 1 , .Xr telnet 1 , .Xr kldload 2 , .Xr pipe 2 , .Xr socketpair 2 , .Xr libalias 3 , .Xr libradius 3 , .Xr syslog 3 , .Xr uucplock 3 , .Xr netgraph 4 , .Xr ng_pppoe 4 , .Xr crontab 5 , .Xr group 5 , .Xr passwd 5 , .Xr protocols 5 , .Xr radius.conf 5 , .Xr resolv.conf 5 , .Xr syslog.conf 5 , .Xr adduser 8 , .Xr chat 8 , .Xr getty 8 , .Xr inetd 8 , .Xr init 8 , .Xr named 8 , .Xr ping 8 , .Xr pppctl 8 , .Xr pppoed 8 , .Xr route 8 , .Xr sshd 8 , .Xr syslogd 8 , .Xr traceroute 8 , .Xr vipw 8 .Sh HISTORY This program was originally written by -.An Toshiharu OHNO Aq tony-o@iij.ad.jp , +.An Toshiharu OHNO Aq Mt tony-o@iij.ad.jp , and was submitted to .Fx 2.0.5 by -.An Atsushi Murai Aq amurai@spec.co.jp . +.An Atsushi Murai Aq Mt amurai@spec.co.jp . .Pp It was substantially modified during 1997 by -.An Brian Somers Aq brian@Awfulhak.org , +.An Brian Somers Aq Mt brian@Awfulhak.org , and was ported to .Ox in November that year (just after the 2.2 release). .Pp Most of the code was rewritten by .An Brian Somers in early 1998 when multi-link ppp support was added. Index: head/usr.sbin/rarpd/rarpd.8 =================================================================== --- head/usr.sbin/rarpd/rarpd.8 (revision 267667) +++ head/usr.sbin/rarpd/rarpd.8 (revision 267668) @@ -1,160 +1,160 @@ .\" Copyright (c) 1990, 1991, 1993 The Regents of the University of .\" California. All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that: (1) source code distributions .\" retain the above copyright notice and this paragraph in its entirety, (2) .\" distributions including binary code include the above copyright notice and .\" this paragraph in its entirety in the documentation or other materials .\" provided with the distribution. Neither the name of .\" the University 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 ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED .\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF .\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. .\" .\" $FreeBSD$ .\" .Dd July 9, 2012 .Dt RARPD 8 .Os .Sh NAME .Nm rarpd .Nd reverse ARP daemon .Sh SYNOPSIS .Nm .Fl a .Op Fl dfsv .Op Fl t Ar directory .Op Fl P Ar pidfile .Nm .Op Fl dfsv .Op Fl t Ar directory .Op Fl P Ar pidfile .Ar interface .Sh DESCRIPTION The .Nm utility services Reverse ARP requests on the Ethernet connected to .Ar interface . Upon receiving a request, .Nm maps the target hardware address to an IP address via its name, which must be present in both the .Xr ethers 5 and .Xr hosts 5 databases. If a host does not exist in both databases, the translation cannot proceed and a reply will not be sent. .Pp By default, a request is honored only if the server (i.e., the host that .Nm is running on) can "boot" the target; that is, a file or directory matching the glob .Pa /tftpboot/\fIipaddr\fP* exists, where .Em ipaddr is the target IP address in hex. For example, the IP address 204.216.27.18 will be replied to if any of .Pa /tftpboot/CCD81B12 , .Pa /tftpboot/CCD81B12.SUN3 , or .Pa /tftpboot/CCD81B12-boot exist. This requirement can be overridden with the .Fl s flag (see below). .Pp In normal operation, .Nm forks a copy of itself and runs in the background. Anomalies and errors are reported via .Xr syslog 3 . .Pp The following options are available: .Bl -tag -width indent .It Fl a Listen on all the Ethernets attached to the system. If .Fl a is omitted, an interface must be specified. .It Fl d If .Fl f is also specified, .Nm logs messages to .Em stdout and .Em stderr instead of via .Xr syslog 3 . .It Fl f Run in the foreground. .It Fl P Specify the pathname of the PID file. If not specified, .Pa /var/run/rarpd.pid or .Pa /var/run/rarpd.ifname.pid will be used depending on the .Fl a flag or the specified interface name. .It Fl s Supply a response to any RARP request for which an ethernet to IP address mapping exists; do not depend on the existence of .Pa /tftpboot/\fIipaddr\fP* . .It Fl t Supply an alternate tftp root directory to .Pa /tftpboot , similar to the .Fl s option of .Xr tftpd 8 . This permits .Nm to selectively respond to RARP requests, but use an alternate directory for IP checking. .It Fl v Enable verbose syslogging. .El .Sh FILES .Bl -tag -width /etc/ethers -compact .It Pa /etc/ethers .It Pa /etc/hosts .It Pa /tftpboot .It Pa /var/run/rarpd.pid .El .Sh SEE ALSO .Xr bpf 4 .Rs .%A "Finlayson, R." .%A "Mann, T." .%A "Mogul, J.C." .%A "Theimer, M." .%T "RFC 903: Reverse Address Resolution Protocol" .%D "June 1984" .%O "4 p" .Re .Sh AUTHORS .An -nosplit -.An Craig Leres Aq leres@ee.lbl.gov +.An Craig Leres Aq Mt leres@ee.lbl.gov and -.An Steven McCanne Aq mccanne@ee.lbl.gov . +.An Steven McCanne Aq Mt mccanne@ee.lbl.gov . Lawrence Berkeley Laboratory, University of California, Berkeley, CA. .Sh BUGS The .Nm utility can depend on the DNS to resolve the name discovered from .Pa /etc/ethers . If this name is not in the DNS but is in .Pa /etc/hosts , the DNS lookup can cause a delayed RARP response, so in this situation it is recommended to configure .Xr nsswitch.conf 5 to read .Pa /etc/hosts first. Index: head/usr.sbin/rpc.umntall/rpc.umntall.8 =================================================================== --- head/usr.sbin/rpc.umntall/rpc.umntall.8 (revision 267667) +++ head/usr.sbin/rpc.umntall/rpc.umntall.8 (revision 267668) @@ -1,126 +1,126 @@ .\" .\" Copyright (c) 1999 Martin Blapp .\" 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 17, 1999 .Dt RPC.UMNTALL 8 .Os .Sh NAME .Nm rpc.umntall .Nd notify NFS servers about unmounted NFS file systems .Sh SYNOPSIS .Nm .Op Fl e Ar expire .Op Fl h Ar host .Op Fl k .Op Fl p Ar remotepath .Op Fl v .Sh DESCRIPTION The .Nm utility is proposed in the .Tn NFS RPC specification; see .Rs .%T "NFS Version 3 Protocol Specification" .%O "RFC 1813, Appendix I" .Re It uses remote procedure calls to remove mount entries from .Pa /var/db/mountdtab on the remote NFS server. It is called automatically without any parameters during startup and shutdown of the system. This ensures that .Xr showmount 8 does not display old and expired entries. The .Nm utility is only needed on client side, where .Xr mount_nfs 8 adds a mount entry with the current date to .Pa /var/db/mounttab , and .Xr umount 8 removes the entry again. The .Nm utility cares about all remaining entries in this table which result from crashes or unproper shutdowns. .Pp The options are as follows: .Bl -tag -width indentxxx .It Fl e Ar expire All entries which are not actually mounted or older than .Ar expire (seconds) are removed from .Pa /var/db/mounttab . This may be the case for DNS changes or long out of service periods. Default expire time is 86400 seconds (one day). .It Fl h Ar host Only remove the specific hostname. Send a UMNTALL RPC to the NFS server. .It Fl k Keep entries for existing NFS file systems. Compare the NFS file systems from the mounttab against the kernel mountlist and do not send the RPC to existing mount entries. Useful during startup of the system. It may be possible that there are already mounted NFS file systems, so calling RPC UMOUNT is not a good idea. This is the case if the user has rebooted to 'single user mode' and starts up the system again. .It Fl p Ar path Only remove the specific mount-path. Send a UMOUNT RPC to the NFS server. This option implies the .Fl host option. .It Fl v Verbose, additional information is printed for each processed mounttab entry. .El .Sh FILES .Bl -tag -width /var/db/mounttab -compact .It Pa /var/db/mounttab mounted nfs-file systems .El .Sh SEE ALSO .Xr mountd 8 , .Xr mount_nfs 8 , .Xr umount 8 .Sh HISTORY The .Nm utility first appeared in .Fx 4.0 . .Sh AUTHORS -.An Martin Blapp Aq mb@imp.ch +.An Martin Blapp Aq Mt mb@imp.ch Index: head/usr.sbin/rpc.yppasswdd/rpc.yppasswdd.8 =================================================================== --- head/usr.sbin/rpc.yppasswdd/rpc.yppasswdd.8 (revision 267667) +++ head/usr.sbin/rpc.yppasswdd/rpc.yppasswdd.8 (revision 267668) @@ -1,359 +1,359 @@ .\" Copyright (c) 1995, 1996 .\" Bill Paul . 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. All advertising materials mentioning features or use of this software .\" must display the following acknowledgement: .\" This product includes software developed by Bill Paul. .\" 4. Neither the name of the author nor the names of contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY Bill Paul 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 Bill Paul 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 8, 1996 .Dt RPC.YPPASSWDD 8 .Os .Sh NAME .Nm rpc.yppasswdd .Nd "server for updating NIS passwords" .Sh SYNOPSIS .Nm .Op Fl t Ar master.passwd template file .Op Fl d Ar default domain .Op Fl p Ar path .Op Fl s .Op Fl f .Op Fl a .Op Fl m .Op Fl i .Op Fl v .Op Fl u .Op Fl h .Sh DESCRIPTION The .Nm utility allows users to change their NIS passwords and certain other information using the .Xr yppasswd 1 and .Xr ypchpass 1 commands. The .Nm utility is an RPC-based server that accepts incoming password change requests, authenticates them, places the updated information in the .Pa /var/yp/master.passwd template file and then updates the NIS .Pa master.passwd and .Pa passwd maps. .Pp The .Nm utility allows a normal NIS user to change his or her NIS password, full name (also known as 'GECOS' field) or shell. These updates are typically done using the .Xr yppasswd 1 , .Xr ypchfn 1 , .Xr ypchsh 1 , or .Xr ypchpass 1 commands. (Some administrators do not want users to be able to change their full name information or shells; the server can be invoked with option flags that disallow such changes.) When the server receives an update request, it compares the address of the client making the request against the .Pa securenets rules outlined in .Pa /var/yp/securenets . (See the .Xr ypserv 8 manual page for more information on securenets; the .Nm utility uses the same access control mechanism as .Xr ypserv 8 . ) .Pp The server then checks the 'old' password supplied by the user to make sure it is valid, then performs some sanity checks on the updated information (these include checking for embedded control characters, colons or invalid shells). Once it is satisfied that the update request is valid, the server modifies the template password file (the default is .Pa /var/yp/master.passwd ) and then runs the .Pa /usr/libexec/yppwupdate script to rebuild the NIS maps. (This script has two arguments passed to it: the absolute pathname of the password template that was modified and the name of the domain that is to be updated. These in turn are passed to .Pa /var/yp/Makefile ) . .Pp The .Fx version of .Nm also allows the super-user on the NIS master server to perform more sophisticated updates on the NIS passwd maps. The super-user can modify any field in any user's master.passwd entry in any domain, and can do so without knowing the user's existing NIS password (when the server receives a request from the super-user, the password authentication check is bypassed). Furthermore, if the server is invoked with the .Fl a flag, the super-user can even add new entries to the maps using .Xr ypchpass 1 . Again, this only applies to the super-user on the NIS master server: none of these special functions can be performed over the network. .Pp The .Nm utility can only be run on a machine that is an NIS master server. .Sh OPTIONS The following options are available: .Bl -tag -width indent .It Fl t Ar master.passwd template file By default, .Nm assumes that the template file used to generates the .Pa master.passwd and .Pa passwd maps for the default domain is called .Pa /var/yp/master.passwd . This default can be overridden by specifying an alternate file name with the .Fl t flag. .Pp Note: if the template file specified with this flag is .Pa /etc/master.passwd , .Nm will also automatically invoke .Xr pwd_mkdb 8 to rebuild the local password databases in addition to the NIS maps. .It Fl d Ar domain The .Nm utility can support multiple domains, however it must choose one domain as a default. It will try to use the system default domain name as set by the .Xr domainname 1 command for this default. However, if the system domain name is not set, a default domain must be specified on the command line. If the system default domain is set, then this option can be used to override it. .It Fl p Ar path This option can be used to override the default path to the location of the NIS map databases. The compiled-in default path is .Pa /var/yp . .It Fl s Disallow changing of shell information. .It Fl f Disallow changing of full name ('GECOS') information. .It Fl a Allow additions to be made to the NIS passwd databases. The super-user on the NIS master server is permitted to use the .Xr ypchpass 1 command to perform unrestricted modifications to any field in a user's .Pa master.passwd map entry. When .Nm is started with this flag, it will also allow the super-user to add new records to the NIS passwd maps, just as is possible when using .Xr chpass 1 to modify the local password database. .It Fl m Turn on multi-domain mode. Even though .Xr ypserv 8 can handle several simultaneous domains, most implementations of .Nm can only operate on a single NIS domain, which is generally the same as the system default domain of the NIS master server. The .Fx .Nm attempts to overcome this problem in spite of the inherent limitations of the .Pa yppasswd protocol, which does not allow for a .Pa domain argument in client requests. In multi-domain mode, .Nm will search through all the passwd maps of all the domains it can find under .Pa /var/yp until it finds an entry that matches the user information specified in a given update request. (Matches are determined by checking the username, UID and GID fields.) The matched entry and corresponding domain are then used for the update. .Pp Note that in order for multi-domain mode to work, there have to be separate template files for each domain. For example, if a server supports three domains, .Pa foo , .Pa bar , and .Pa baz , there should be three separate master.passwd template files called .Pa /var/yp/foo/master.passwd , .Pa /var/yp/bar/master.passwd , and .Pa /var/yp/baz/master.passwd . If .Pa foo happens to be the system default domain, then its template file can be either .Pa /var/yp/foo/master.passwd or .Pa /var/yp/master.passwd . The server will check for the latter file first and then use the former if it cannot find it. .Pp Multi-domain mode is off by default since it can fail if there are duplicate or near-duplicate user entries in different domains. The server will abort an update request if it finds more than one user entry that matches its search criteria. Even so, paranoid administrators may wish to leave multi-domain mode disabled. .It Fl i If .Nm is invoked with this flag, it will perform map updates in place. This means that instead of just modifying the password template file and starting a map update, the server will modify the map databases directly. This is useful when the password maps are large: if, for example, the password database has tens of thousands of entries, it can take several minutes for a map update to complete. Updating the maps in place reduces this time to a few seconds. .It Fl v Turn on verbose logging mode. The server normally only logs messages using the .Xr syslog 3 facility when it encounters an error condition, or when processing updates for the super-user on the NIS master server. Running the server with the .Fl v flag will cause it to log informational messages for all updates. .It Fl u Many commercial .Xr yppasswd 1 clients do not use a reserved port when sending requests to .Nm . This is either because the .Xr yppasswd 1 program is not installed set-uid root, or because the RPC implementation does not place any emphasis on binding to reserved ports when establishing client connections for the super-user. By default, .Nm expects to receive requests from clients using reserved ports; requests received from non-privileged ports are rejected. Unfortunately, this behavior prevents any client systems that to not use privileged ports from successfully submitting password updates. Specifying the .Fl u flag to .Nm disables the privileged port check so that it will work with .Xr yppasswd 1 clients that do not use privileged ports. This reduces security to a certain small degree, but it might be necessary in cases where it is not possible to change the client behavior. .It Fl h Display the list of flags and options understood by .Nm . .El .Sh FILES .Bl -tag -width Pa -compact .It Pa /usr/libexec/yppwupdate The script invoked by .Nm to update and push the NIS maps after an update. .It Pa /var/yp/master.passwd The template password file for the default domain. .It Pa /var/yp/[domainname]/[maps] The NIS maps for a particular NIS domain. .It Pa /var/yp/[domainname]/master.passwd The template password file(s) for non-default domains (used only in multi-domain mode). .El .Sh SEE ALSO .Xr yp 8 , .Xr yppush 8 , .Xr ypserv 8 , .Xr ypxfr 8 .Sh AUTHORS -.An Bill Paul Aq wpaul@ctr.columbia.edu +.An Bill Paul Aq Mt wpaul@ctr.columbia.edu .Sh BUGS As listed in the yppasswd.x protocol definition, the YPPASSWDPROC_UPDATE procedure takes two arguments: a V7-style passwd structure containing updated user information and the user's existing unencrypted (cleartext) password. Since .Nm is supposed to handle update requests from remote NIS client machines, this means that .Xr yppasswd 1 and similar client programs will in fact be transmitting users' cleartext passwords over the network. .Pp This is not a problem for password updates since the plaintext password sent with the update will no longer be valid once the new encrypted password is put into place, but if the user is only updating his or her 'GECOS' information or shell, then the cleartext password sent with the update will still be valid once the update is completed. If the network is insecure, this cleartext password could be intercepted and used to gain unauthorized access to the user's account. Index: head/usr.sbin/rpc.ypxfrd/rpc.ypxfrd.8 =================================================================== --- head/usr.sbin/rpc.ypxfrd/rpc.ypxfrd.8 (revision 267667) +++ head/usr.sbin/rpc.ypxfrd/rpc.ypxfrd.8 (revision 267668) @@ -1,153 +1,153 @@ .\" Copyright (c) 1995, 1996 .\" Bill Paul . 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. All advertising materials mentioning features or use of this software .\" must display the following acknowledgement: .\" This product includes software developed by Bill Paul. .\" 4. Neither the name of the author nor the names of contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY Bill Paul 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 Bill Paul 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 June 2, 1996 .Dt RPC.YPXFRD 8 .Os .Sh NAME .Nm rpc.ypxfrd .Nd "NIS map transfer server" .Sh SYNOPSIS .Nm .Op Fl p Ar path .Sh DESCRIPTION The .Nm utility is used to speed up the distribution of very large NIS maps from NIS master to NIS slave servers. The normal method for transferring maps involves several steps: .Bl -bullet -offset indent .It The master server calls .Xr yppush 8 to inform the slave servers to start a transfer. .It The slave servers invoke .Xr ypxfr 8 , which reads the entire contents of a map from the master server using the yp_all() function. .It The .Xr ypxfr 8 program then creates a new map database file by using the .Xr db 3 library hash method to store the data that it receives from the server. .It When all the data has been retrieved, .Xr ypxfr 8 moves the new file into place and sends .Xr ypserv 8 on the local machine a YPPROC_CLEAR to tell it to refresh its database handles. .El .Pp This process can take several minutes when there are very large maps involved. For example: a passwd database with several tens of thousands of entries can consume several megabytes of disk space, and it can take the .Xr db 3 library package a long time to sort and store all the records in a hash database. Consider also that there are two sets of map files: .Pa master.passwd.by{name,uid} and .Pa passwd.by{name,uid} . .Pp The .Nm utility speeds up the transfer process by allowing NIS slave servers to simply copy the master server's map files rather than building their own from scratch. Simply put, .Nm implements an RPC-based file transfer protocol. Transferring even a multi-megabyte file in this fashion takes only a few seconds compared to the several minutes it would take even a reasonably fast slave server to build a new map from scratch. .Pp The .Nm utility uses the same access restriction mechanism as .Xr ypserv 8 . This means that slave servers will only be permitted to transfer files if the rules in the .Pa securenets database permit it (see .Xr ypserv 8 for more information on .Pa securenets ) . Furthermore, only slave servers using reserved ports will be allowed to transfer the .Pa master.passwd maps. .Sh OPTIONS The following option is available: .Bl -tag -width indent .It Fl p Ar path This option can be used to override the default path to the location of the NIS map databases. The compiled-in default path is .Pa /var/yp . .El .Sh FILES .Bl -tag -width Pa -compact .It Pa /var/yp/[domainname]/[maps] The NIS maps for a particular NIS domain. .El .Sh SEE ALSO .Xr yp 8 , .Xr yppush 8 , .Xr ypserv 8 , .Xr ypxfr 8 .Sh AUTHORS -.An Bill Paul Aq wpaul@ctr.columbia.edu +.An Bill Paul Aq Mt wpaul@ctr.columbia.edu .Sh BUGS The .Fx .Nm ypxfrd protocol is not compatible with that used by SunOS. This is unfortunate but unavoidable: Sun's protocol is not freely available, and even if it were it would probably not be useful since the SunOS NIS v2 implementation uses the original ndbm package for its map databases whereas the .Fx implementation uses Berkeley DB. These two packages use vastly different file formats. Furthermore, ndbm is byte-order sensitive and not very smart about it, meaning that am ndbm database created on a big endian system cannot be read on a little endian system. Index: head/usr.sbin/rtadvctl/rtadvctl.8 =================================================================== --- head/usr.sbin/rtadvctl/rtadvctl.8 (revision 267667) +++ head/usr.sbin/rtadvctl/rtadvctl.8 (revision 267668) @@ -1,105 +1,105 @@ .\" Copyright (C) 2011 Hiroki Sato . .\" 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 PROJECT 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 .\" PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES .\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR .\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, .\" EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" .\" $FreeBSD$ .\" .Dd July 16, 2011 .Dt RTADVCTL 8 .Os .Sh NAME .Nm rtadvctl .Nd control program for .Xr rtadvd 8 daemon .Sh SYNOPSIS .Nm .Op Fl v .Ar subcommand .Op Ar interface ... .Sh DESCRIPTION .Nm is a utility that communicates with .Xr rtadvd 8 daemon and displays information about Router Advertisement messages being sent on each interface. .Pp This utility provides several options and subcommands. The options are as follows: .Bl -tag -width indent .\" .It Fl v Increase verbosity level. When specified once, the .Nm utility shows additional information about prefixes, RDNSS, and DNSSL options. When given twice, it additionally shows information about inactive interfaces and some statistics. .El .Pp The subcommands are as follows: .Bl -tag -width indent .\" .It reload Op interfaces... Specifies to reload the configuration file. If one or more .Ar interface is specified, configuration entries for the interfaces will be reloaded selectively. .It enable interfaces... Specifies to mark the interface as enable and to try to reload the configuration entry. This subcommand is useful for dynamically-added interfaces. .Pp The .Xr rtadvd 8 daemon marks an interface as enable if the interface exists and the configuration file has a valid entry for that when it is invoked. .It disable interfaces... Specifies to mark the interface as disable. .It shutdown Makes the .Xr rtadvd 8 daemon shut down. Note that the .Xr rtadvd 8 daemon will send several RAs with zero lifetime to invalidate the old information on each interface. It will take at most nine seconds. .It show Op interfaces... Displays information on Router Advertisement messages being sent on each interface. .El .Sh SEE ALSO .Xr rtadvd 8 , .Xr rtadvd.conf 5 .Sh HISTORY The .Nm command first appeared in .Fx 9.0 . .Sh AUTHORS .Nm was written by -.An "Hiroki Sato" Aq hrs@FreeBSD.org . +.An Hiroki Sato Aq Mt hrs@FreeBSD.org . Index: head/usr.sbin/rtprio/rtprio.1 =================================================================== --- head/usr.sbin/rtprio/rtprio.1 (revision 267667) +++ head/usr.sbin/rtprio/rtprio.1 (revision 267668) @@ -1,200 +1,200 @@ .\" .\" Copyright (c) 1994, Henrik Vestergaard Draboel .\" 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. All advertising materials mentioning features or use of this software .\" must display the following acknowledgement: .\" This product includes software developed by Henrik Vestergaard Draboel. .\" 4. The name of the author may not be used to endorse or promote products .\" derived from this software without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 September 29, 2012 .Dt RTPRIO 1 .Os .Sh NAME .Nm rtprio , .Nm idprio .Nd execute, examine or modify a utility's or process's realtime or idletime scheduling priority .Sh SYNOPSIS .Nm [id|rt]prio .Nm [id|rt]prio .Oo Fl Oc Ns Ar pid .Nm [id|rt]prio .Ar priority .Ar command .Op args .Nm [id|rt]prio .Ar priority .Fl Ar pid .Nm [id|rt]prio .Fl t .Ar command .Op args .Nm [id|rt]prio .Fl t .Fl Ar pid .Sh DESCRIPTION The .Nm utility is used for controlling realtime process scheduling. .Pp The .Nm idprio utility is used for controlling idletime process scheduling, and can be called with the same options as .Nm . .Pp A process with a realtime priority is not subject to priority degradation, and will only be preempted by another process of equal or higher realtime priority. .Pp A process with an idle priority will run only when no other process is runnable and then only if its idle priority is equal or greater than all other runnable idle priority processes. .Pp Both .Nm or .Nm idprio when called without arguments will return the realtime priority of the current process. .Pp If .Nm is called with 1 argument, it will return the realtime priority of the process with the specified .Ar pid . .Pp If .Ar priority is specified, the process or program is run at that realtime priority. If .Fl t is specified, the process or program is run as a normal (non-realtime) process. .Pp If .Ar -pid is specified, the process with the process identifier .Ar pid will be modified, else if .Ar command is specified, that program is run with its arguments. .Pp .Ar Priority is an integer between 0 and RTP_PRIO_MAX (usually 31). 0 is the highest priority .Pp .Ar Pid of 0 means "the current process". .Pp Only root is allowed to set realtime or idle priority for a process. A user may modify the idle priority of their own processes if the .Xr sysctl 8 variable .Va security.bsd.unprivileged_idprio is set to non-zero. Note that this increases the chance that a deadlock can occur if a process locks a required resource and then does not get to run. .Sh EXIT STATUS If .Nm execute a command, the exit value is that of the command executed. In all other cases, .Nm exits 0 on success, and 1 for all other errors. .Sh EXAMPLES To see which realtime priority the current process is at: .Dl rtprio .Pp To see which realtime priority of process 1423: .Dl "rtprio 1423" .Pp To run .Xr cron 8 at the lowest realtime priority: .Dl "rtprio 31 cron" .Pp To change the realtime priority of process 1423 to 16: .Dl "rtprio 16 -1423" .Pp To run .Xr tcpdump 1 without realtime priority: .Dl "rtprio -t tcpdump" .Pp To change the realtime priority of process 1423 to .Dv RTP_PRIO_NORMAL (non-realtime/normal priority): .Dl "rtprio -t -1423" .Pp To make depend while not disturbing other machine usage: .Dl "idprio 31 make depend" .Sh SEE ALSO .Xr nice 1 , .Xr ps 1 , .Xr rtprio 2 , .Xr setpriority 2 , .Xr nice 3 , .Xr renice 8 .Sh HISTORY The .Nm utility appeared in .Fx 2.0 , but is similar to the HP-UX version. .Sh AUTHORS .An -nosplit -.An Henrik Vestergaard Draboel Aq hvd@terry.ping.dk +.An Henrik Vestergaard Draboel Aq Mt hvd@terry.ping.dk is the original author. This implementation in .Fx was substantially rewritten by .An David Greenman . .Sh CAVEATS You can lock yourself out of the system by placing a cpu-heavy process in a realtime priority. .Sh BUGS There is no way to set/view the realtime priority of process 0 (swapper) (see .Xr ps 1 ) . .Pp There is in .Fx no way to ensure that a process page is present in memory therefore the process may be stopped for pagein (see .Xr mprotect 2 , .Xr madvise 2 ) . .Pp Under .Fx system calls are currently never preempted, therefore non-realtime processes can starve realtime processes, or idletime processes can starve normal priority processes. Index: head/usr.sbin/sa/sa.8 =================================================================== --- head/usr.sbin/sa/sa.8 (revision 267667) +++ head/usr.sbin/sa/sa.8 (revision 267668) @@ -1,262 +1,262 @@ .\" .\" Copyright (c) 1994 Christopher G. Demetriou .\" 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. All advertising materials mentioning features or use of this software .\" must display the following acknowledgement: .\" This product includes software developed by Christopher G. Demetriou. .\" 3. The name of the author may not be used to endorse or promote products .\" derived from this software without specific prior written permission .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" .\" $FreeBSD$ .\" .Dd May 18, 2007 .Dt SA 8 .Os .Sh NAME .Nm sa .Nd print system accounting statistics .Sh SYNOPSIS .Nm .Op Fl abcdDfijkKlmnqrstu .Op Fl P Ar file .Op Fl U Ar file .Op Fl v Ar cutoff .Op Ar .Sh DESCRIPTION The .Nm utility reports on, cleans up, and generally maintains system accounting files. .Pp The .Nm utility is able to condense the information in .Pa /var/account/acct into the summary files .Pa /var/account/savacct and .Pa /var/account/usracct , which contain system statistics according to command name and login id, respectively. This condensation is desirable because on a large system, .Pa /var/account/acct can grow by hundreds of blocks per day. The summary files are normally read before the accounting file, so that reports include all available information. .Pp If file names are supplied, they are read instead of .Pa /var/account/acct . After each file is read, if the summary files are being updated, an updated summary will be saved to disk. Only one report is printed, after the last file is processed. .Pp The labels used in the output indicate the following, except where otherwise specified by individual options: .Bl -tag -width k*sec .It Dv avio Average number of I/O operations per execution .It Dv cp Sum of user and system time, in minutes .It Dv cpu Same as .Dv cp .It Dv k CPU-time averaged core usage, in 1k units .It Dv k*sec CPU storage integral, in 1k-core seconds .It Dv re Real time, in minutes .It Dv s System time, in minutes .It Dv tio Total number of I/O operations .It Dv u User time, in minutes .El .Pp The options to .Nm are: .Bl -tag -width Ds .It Fl a List all command names, including those containing unprintable characters and those used only once. By default, .Nm places all names containing unprintable characters and those used only once under the name ``***other''. .It Fl b If printing command statistics, sort output by the sum of user and system time divided by number of calls. .It Fl c In addition to the number of calls and the user, system and real times for each command, print their percentage of the total over all commands. .It Fl d If printing command statistics, sort by the average number of disk I/O operations. If printing user statistics, print the average number of disk I/O operations per user. .It Fl D If printing command statistics, sort and print by the total number of disk I/O operations. .It Fl f Force no interactive threshold comparison with the .Fl v option. .It Fl i Do not read in the summary files. .It Fl j Instead of the total minutes per category, give seconds per call. .It Fl k If printing command statistics, sort by the cpu-time average memory usage. If printing user statistics, print the cpu-time average memory usage. .It Fl K If printing command statistics, print and sort by the cpu-storage integral. .It Fl l Separate system and user time; normally they are combined. .It Fl m Print per-user statistics rather than per-command statistics. .It Fl n Sort by number of calls. .It Fl P Ar file Use the specified .Ar file for accessing the per-command accounting summary database, instead of the default .Pa /var/account/savacct . .It Fl q Create no output other than error messages. .It Fl r Reverse order of sort. .It Fl s Truncate the accounting files when done and merge their data into the summary files. .It Fl t For each command, report the ratio of real time to the sum of user and system cpu times. If the cpu time is too small to report, ``*ignore*'' appears in this field. .It Fl U Ar file Use the specified .Ar file for accessing the per-user accounting summary database, instead of the default .Pa /var/account/usracct . .It Fl u Superseding all other flags, for each entry in the accounting file, print the user ID, total seconds of cpu usage, total memory usage, number of I/O operations performed, and command name. .It Fl v Ar cutoff For each command used .Ar cutoff times or fewer, print the command name and await a reply from the terminal. If the reply begins with ``y'', add the command to the category ``**junk**''. This flag is used to strip garbage from the report. .El .Pp By default, per-command statistics will be printed. The number of calls, the total elapsed time in minutes, total cpu and user time in minutes, average number of I/O operations, and CPU-time averaged core usage will be printed. If the .Fl m option is specified, per-user statistics will be printed, including the user name, the number of commands invoked, total cpu time used (in minutes), total number of I/O operations, and CPU storage integral for each user. If the .Fl u option is specified, the uid, user and system time (in seconds), CPU storage integral, I/O usage, and command name will be printed for each entry in the accounting data file. .Pp If the .Fl u flag is specified, all flags other than .Fl q are ignored. If the .Fl m flag is specified, only the .Fl b , .Fl d , .Fl i , .Fl k , .Fl q , and .Fl s flags are honored. .Sh FILES .Bl -tag -width /var/account/usracct -compact .It Pa /var/account/acct raw accounting data file .It Pa /var/account/savacct per-command accounting summary database .It Pa /var/account/usracct per-user accounting summary database .El .Sh EXIT STATUS .Ex -std .Sh SEE ALSO .Xr lastcomm 1 , .Xr acct 5 , .Xr ac 8 , .Xr accton 8 .Sh AUTHORS -.An Chris G. Demetriou Aq cgd@postgres.berkeley.edu +.An Chris G. Demetriou Aq Mt cgd@postgres.berkeley.edu .Sh CAVEATS While the behavior of the options in this version of .Nm was modeled after the original version, there are some intentional differences and undoubtedly some unintentional ones as well. In particular, the .Fl q option has been added, and the .Fl m option now understands more options than it used to. .Pp The formats of the summary files created by this version of .Nm are very different from the those used by the original version. This is not considered a problem, however, because the accounting record format has changed as well (since user ids are now 32 bits). .Sh BUGS The number of options to this program is absurd, especially considering that there is not much logic behind their lettering. .Pp The field labels should be more consistent. .Pp The VM system does not record the CPU storage integral. Index: head/usr.sbin/sicontrol/sicontrol.8 =================================================================== --- head/usr.sbin/sicontrol/sicontrol.8 (revision 267667) +++ head/usr.sbin/sicontrol/sicontrol.8 (revision 267668) @@ -1,109 +1,109 @@ .\" $FreeBSD$ .\" .Dd September 26, 1995 .Dt SICONTROL 8 .Os .Sh NAME .Nm sicontrol .Nd Specialix SI/XIO driver configuration and debugging .Sh SYNOPSIS .Nm device .Ar command Op Ar param ... .Sh DESCRIPTION The .Nm utility is used to configure and monitor the SI/XIO device driver. .Pp The .Nm utility operates on the specified .Ar device to indicate which port is to be used. .Pp The special .Ar device string `-' is used to indicate the global driver settings instead. .Pp A .Pa /dev/ is included if necessary. .Pp The following commands are used for the global settings and should be specified with the '-' device name: .Bl -tag -width 4n .It Cm int_throttle Op Cm value Configure the `aggregate interrupt throttle value'. The maximum number of host adapter interrupts per second is determined by: .Pp .Ar "controller CPU clock / (8 * int_throttle)" .Pp The default value at boot time is 25000. The host adapter cpu clock is 25MHz. This gives a maximum interrupt rate of about 125 interrupts per second. .Pp Lowering this value will increase the rate in which the host adapter can interrupt the operating system for attention. .\" .It Cm rxint_throttle Op Cm value Configure the receiver interrupt throttle value. The default value of 4 at boot time allows an interrupt rate of approximately 25. .Pp Lowering this value will increase the rate in which the host adapter can interrupt the operating system to empty the receiver fifos. .\" .It Cm nport Return the number of ports under the control of the device driver. .El .Pp The following commands are used for the individual ports and should be specified with a device name from .Pa /dev : .Bl -tag -width 4n .It Cm mstate Show the current incoming modem control signals. .It Cm ccbstat Show the current "ccb" structure for the specified port. This is not of much use outside of debugging the driver and determining why a port is wedged. .El .Sh FILES .Bl -tag -width /dev/si_control -compact .It Pa /dev/si_control global driver control file for use by .Nm .It Pa /dev/ttyA* terminal control ports .It Pa /dev/ttyiA* initial termios state devices, for use by .Xr stty 1 .It Pa /dev/ttylA* locked termios state devices, for use by .Xr stty 1 .El .Sh DIAGNOSTICS Generally self explanatory..... .Sh SEE ALSO .Xr stty 1 , .Xr si 4 , .Xr termios 4 , .Xr tty 4 , .Xr comcontrol 8 .Sh HISTORY The .Nm utility is loosely based on a utility called .Nm siconfig which was written by -.An Andy Rutter Aq andy@acronym.co.uk +.An Andy Rutter Aq Mt andy@acronym.co.uk . .Pp Specialix International do not support this device driver in any way. .Sh AUTHORS -.An Peter Wemm Aq peter@FreeBSD.org +.An Peter Wemm Aq Mt peter@FreeBSD.org .Sh BUGS Bound to be many... :-) Index: head/usr.sbin/snapinfo/snapinfo.8 =================================================================== --- head/usr.sbin/snapinfo/snapinfo.8 (revision 267667) +++ head/usr.sbin/snapinfo/snapinfo.8 (revision 267668) @@ -1,66 +1,66 @@ .\" .\" Copyright (c) 2005 Mark Santcroos .\" 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 DEVELOPERS ``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 DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT, .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" .\" $FreeBSD$ .\" .Dd July 20, 2005 .Dt SNAPINFO 8 .Os .Sh NAME .Nm snapinfo .Nd "show snapshot location on UFS file systems" .Sh SYNOPSIS .Nm .Op Fl v .Fl a .Nm .Op Fl v .Ar mountpoint .Sh DESCRIPTION The .Nm utility searches and displays the location of snapshots on UFS file systems. .Pp Currently it works only on mounted file systems. It can either search one file system or all of them. .Pp The following options are available: .Bl -tag -width indent .It Fl a Search for snapshots on all mounted UFS file systems. .It Fl v Verbose mode. .It Ar mountpoint Search the file system mounted on this mountpoint. .El .Sh SEE ALSO .Xr ffs 7 , .Xr mksnap_ffs 8 .Sh HISTORY The .Nm utility first appeared in .Fx 6.1 . .Sh AUTHORS -.An Mark Santcroos Aq marks@FreeBSD.org +.An Mark Santcroos Aq Mt marks@FreeBSD.org Index: head/usr.sbin/sysrc/sysrc.8 =================================================================== --- head/usr.sbin/sysrc/sysrc.8 (revision 267667) +++ head/usr.sbin/sysrc/sysrc.8 (revision 267668) @@ -1,308 +1,308 @@ .\" 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 Nov 20, 2013 .Dt SYSRC 8 .Os .Sh NAME .Nm sysrc .Nd safely edit system rc files .Sh SYNOPSIS .Nm .Op Fl cdDeFhinNqvx .Op Fl f Ar file .Op Fl j Ar jail | Fl R Ar dir .Ar name Ns Op = Ns Ar value .Ar ... .Nm .Op Fl cdDeFhinNqvx .Op Fl f Ar file .Op Fl j Ar jail | Fl R Ar dir .Fl a | A .Sh DESCRIPTION The .Nm utility retrieves .Xr rc.conf 5 variables from the collection of system rc files and allows processes with appropriate privilege to change values in a safe and effective manner. .Pp The following options are available: .Bl -tag -width indent+ .It Fl a Dump a list of all non-default configuration variables. .It Fl A Dump a list of all configuration variables .Pq incl. defaults . .It Fl c Check if the value will change when assigning a new value. If verbose .Pq see Dq Fl v prints a message stating whether a change would occur. Exits with success if no change is necessary, else returns error status. .It Fl d Print a description of the given variable. .It Fl D Show default value(s) only (this is the same as setting RC_CONFS to NULL or passing `-f' with a NULL file-argument). .It Fl e Print query results as .Xr sh 1 compatible syntax .Pq for example, Ql var=value . Ignored if either .Ql Fl n or .Ql Fl F is specified. .It Fl f Ar file Operate on the specified file(s) instead of the files obtained by reading the .Sq rc_conf_files entry in the .Ev RC_DEFAULTS file. This option can be specified multiple times for additional files. .It Fl F Show only the last .Xr rc.conf 5 file each directive is in. .It Fl h Print a short usage message to stderr and exit. .It Fl -help Print a full usage statement to stderr and exit. .It Fl i Ignore unknown variables. .It Fl j Ar jail The .Ar jid or name of the .Ar jail to operate within .Pq overrides So Fl R Ar dir Sc ; requires Xr jexec 8 . .It Fl n Show only variable values, not their names. .It Fl N Show only variable names, not their values. .It Fl q Quiet. Ignore previous occurrences of .Fl v flag. .It Fl R Ar dir Operate within the root directory .Pq Sq Ar dir rather than .Pq Sq / . .It Fl v Verbose. Print the pathname of the specific .Xr rc.conf 5 file where the directive was found. .It Fl -version Print version information to stdout and exit. .It Fl x Remove variable(s) from specified file(s). .El .Pp This utility works similar to .Xr sysctl 8 . It shares the `-e' and `-n' options .Pq detailed above and also has the same .Ql name[=value] syntax for querying/setting configuration options. .Pp However, while .Xr sysctl 8 serves to query/modify MIBs in the entrant kernel, .Nm instead works on values in the system .Xr rc.conf 5 configuration files. .Pp The list of system configuration files is configured in the file .Ql /etc/defaults/rc.conf within the variable .Ql rc_conf_files , which by-default contains a space-separated list of pathnames. On all FreeBSD systems, this defaults to the value "/etc/rc.conf /etc/rc.conf.local". Each pathname is sourced in-order upon startup. It is in the same fashion that .Nm sources the configuration files before returning the value of the given variable. .Pp When supplied a variable name, .Nm will return the value of the variable. If the variable does not appear in any of the configured .Ql rc_conf_files , an error is printed and error status is returned. .Pp When changing values of a given variable, it does not matter if the variable appears in any of the .Ql rc_conf_files or not. If the variable does not appear in any of the files, it is appended to the end of the first pathname in the .Ql rc_conf_files variable. Otherwise, .Nm will replace only the last-occurrence in the last-file found to contain the variable. This gets the value to take effect next boot without heavily modifying these integral files (yet taking care not to allow the file to grow unwieldy should .Nm be called repeatedly). .Sh ENVIRONMENT The following environment variables are referenced by .Nm : .Bl -tag -width ".Ev RC_DEFAULTS" .It Ev RC_CONFS Override default .Ql rc_conf_files .Pq even if set to NULL . .It Ev RC_DEFAULTS Location of .Ql /etc/defaults/rc.conf file. .El .Sh DEPENDENCIES The following standard commands are required by .Nm : .Pp .Xr awk 1 , .Xr cat 1 , .Xr chmod 1 , .Xr env 1 , .Xr grep 1 , .Xr jls 1 , .Xr mktemp 1 , .Xr mv 1 , .Xr rm 1 , .Xr sh 1 , .Xr stat 1 , .Xr tail 1 , .Xr chown 8 and .Xr jexec 8 . .Sh FILES .Bl -tag -width ".Pa /etc/defaults/rc.conf" -compact .It Pa /etc/defaults/rc.conf .It Pa /etc/rc.conf .It Pa /etc/rc.conf.local .El .Sh EXAMPLES Below are some simple examples of how .Nm can be used to query certain values from the .Xr rc.conf 5 collection of system configuration files: .Pp .Nm sshd_enable .Dl returns the value of $sshd_enable, usually YES or NO . .Pp .Nm defaultrouter .Dl returns IP address of default router Pq if configured . .Pp Working on other files, such as .Xr crontab 5 : .Pp .Nm -f /etc/crontab MAILTO .Dl returns the value of the MAILTO setting Pq if configured . .Pp In addition to the above syntax, .Nm also supports inline .Xr sh 1 PARAMETER expansion for changing the way values are reported, shown below: .Pp .Nm \&'hostname%%.*' .Dl returns $hostname up to (but not including) first `.' . .Pp .Nm \&'network_interfaces%%[$IFS]*' .Dl returns first word of $network_interfaces . .Pp .Nm \&'ntpdate_flags##*[$IFS]' .Dl returns last word of $ntpdate_flags (time server address) . .Pp .Nm usbd_flags-"default" .Dl returns $usbd_flags or "default" if unset or NULL . .Pp .Nm cloned_interfaces+"alternate" .Dl returns "alternate" if $cloned_interfaces is set . .Pp .Nm \&'#kern_securelevel' .Dl returns length in characters of $kern_securelevel . .Pp .Nm \&'hostname?' .Dl returns NULL and error status 2 if $hostname is unset Pq or if set, returns the value of $hostname with no error status . .Pp .Nm \&'hostname:?' .Dl returns NULL and error status 2 if $hostname is unset or NULL Pq or if set and non-NULL, returns value without error status . .Sh LIMITATIONS The .Nm utility presently does not support the .Ql rc.conf.d collection of system configuration files .Pq which requires a service name to be known during execution . .Pp This will be corrected by a future enhancement. .Sh SEE ALSO .Xr jls 1 , .Xr rc.conf 5 , .Xr jail 8 , .Xr jexec 8 , .Xr rc 8 , .Xr sysctl 8 .Sh HISTORY A .Nm utility first appeared in .Fx 9.2 . .Sh AUTHORS -.An Devin Teske Aq dteske@FreeBSD.org +.An Devin Teske Aq Mt dteske@FreeBSD.org .Sh THANKS TO Brandon Gooch, Garrett Cooper, Julian Elischer, Pawel Jakub Dawidek, Cyrille Lefevre, Ross West, Stefan Esser, Marco Steinbach, and Jilles Tjoelker for suggestions and help. Index: head/usr.sbin/tcpdrop/tcpdrop.8 =================================================================== --- head/usr.sbin/tcpdrop/tcpdrop.8 (revision 267667) +++ head/usr.sbin/tcpdrop/tcpdrop.8 (revision 267668) @@ -1,97 +1,97 @@ .\" $OpenBSD: tcpdrop.8,v 1.5 2004/05/24 13:57:31 jmc Exp $ .\" .\" Copyright (c) 2009 Juli Mallett .\" Copyright (c) 2004 Markus Friedl .\" .\" 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 January 30, 2013 .Dt TCPDROP 8 .Os .Sh NAME .Nm tcpdrop .Nd drop TCP connections .Sh SYNOPSIS .Nm tcpdrop .Ar local-address .Ar local-port .Ar foreign-address .Ar foreign-port .Nm tcpdrop .Op Fl l .Fl a .Sh DESCRIPTION The .Nm command may be used to drop TCP connections from the command line. .Pp If .Fl a is specified then .Nm will attempt to drop all active connections. The .Fl l flag may be given to list the tcpdrop invocation to drop all active connections one at a time. .Pp If .Fl a is not specified then only the connection between the given local address .Ar local-address , port .Ar local-port , and the foreign address .Ar foreign-address , port .Ar foreign-port , will be dropped. .Pp Addresses and ports may be specified by name or numeric value. Both IPv4 and IPv6 address formats are supported. .Pp The addresses and ports may be separated by periods or colons instead of spaces. .Sh EXIT STATUS .Ex -std .Sh EXAMPLES If a connection to .Xr httpd 8 is causing congestion on a network link, one can drop the TCP session in charge: .Bd -literal -offset indent # sockstat -c | grep httpd www httpd 16525 3 tcp4 \e 192.168.5.41:80 192.168.5.1:26747 .Ed .Pp The following command will drop the connection: .Bd -literal -offset indent # tcpdrop 192.168.5.41 80 192.168.5.1 26747 .Ed .Pp The following command will drop all connections but those to or from port 22, the port used by .Xr sshd 8 : .Bd -literal -offset indent # tcpdrop -l -a | grep -vw 22 | sh .Ed .Sh SEE ALSO .Xr netstat 1 , .Xr sockstat 1 .Sh AUTHORS -.An Markus Friedl Aq markus@openbsd.org -.An Juli Mallett Aq jmallett@FreeBSD.org +.An Markus Friedl Aq Mt markus@openbsd.org +.An Juli Mallett Aq Mt jmallett@FreeBSD.org Index: head/usr.sbin/usbdump/usbdump.8 =================================================================== --- head/usr.sbin/usbdump/usbdump.8 (revision 267667) +++ head/usr.sbin/usbdump/usbdump.8 (revision 267668) @@ -1,158 +1,157 @@ .\" .\" Copyright (c) 2010 Weongyo Jeong. .\" 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 24, 2012 .Dt USBDUMP 8 .Os .Sh NAME .Nm usbdump .Nd "dump traffic on USB host controller" .Sh SYNOPSIS .Nm .Op Fl i Ar ifname .Op Fl r Ar file .Op Fl s Ar snaplen .Op Fl v .Op Fl w Ar file .Op Fl f Ar filter .Op Fl b Ar file .Op Fl h .Sh DESCRIPTION The .Nm utility provides a way to dump USB packets on host controllers. .Pp The following options are accepted: .Bl -tag -width ".Fl f Ar file" .It Fl b Ar file Store data part of the USB trace in binary format to the given .Ar file . This option also works with the -r and -f options. .It Fl i Ar ifname Listen on USB bus interface .Ar ifname . .It Fl r Ar file Read the raw packets from .Ar file . This option also works with the -f option. .It Fl s Ar snaplen Snapshot .Ar snaplen bytes from each packet. .It Fl v Enable debugging messages. When defined multiple times the verbosity level increases. .It Fl w Ar file Write the raw packets to .Ar file . This option also works with the -s and -v options. .It Fl f Ar filter The filter argument consists of either one or two numbers separated by a dot. The first indicates the device unit number which should be traced. The second number which is optional indicates the endpoint which should be traced. To get all traffic for the control endpoint, two filters should be created, one for endpoint 0 and one for endpoint 128. If 128 is added to the endpoint number that means IN direction, else OUT direction is implied. A device unit or endpoint value of -1 means ignore this field. If no filters are specified, all packets are passed through using the default -1,-1 filter. This option can be specified multiple times. .It Fl h This option displays a summary of the command line options. .El .Sh EXAMPLES Capture the USB raw packets on usbus2: .Pp .Dl "usbdump -i usbus2 -s 256 -v" .Pp Dump the USB raw packets of usbus2 into the file without packet size limit: .Pp .Dl "usbdump -i usbus2 -s 0 -w /tmp/dump_pkts" .Pp Dump the USB raw packets of usbus2, but only the control endpoint traffic of device unit number 3: .Pp .Dl "usbdump -i usbus2 -s 0 -f 3.0 -f 3.128 -w /tmp/dump_pkts" .Pp Read and display the USB raw packets from previous file: .Pp .Dl "usbdump -r /tmp/dump_pkts -v" .Sh OUTPUT FORMAT The output format of .Nm is as follows: .Pp .Dl "