Index: stable/4/lib/libc/gen/timezone.3 =================================================================== --- stable/4/lib/libc/gen/timezone.3 (revision 60874) +++ stable/4/lib/libc/gen/timezone.3 (revision 60875) @@ -1,70 +1,71 @@ .\" Copyright (c) 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. .\" 3. All advertising materials mentioning features or use of this software .\" must display the following acknowledgement: .\" This product includes software developed by the University of .\" California, Berkeley and its contributors. .\" 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. .\" .\" @(#)timezone.3 8.2 (Berkeley) 4/19/94 .\" $FreeBSD$ .\" .Dd April 19, 1994 .Dt TIMEZONE 3 .Os .Sh NAME .Nm timezone .Nd return the timezone abbreviation .Sh LIBRARY .Lb libc .Sh SYNOPSIS .Ft char * .Fn timezone "int zone" "int dst" .Sh DESCRIPTION .ft B This interface is for compatibility only; it is impossible to reliably map timezone's arguments to a time zone abbreviation. -See ctime(3). +See +.Xr ctime 3 . .ft P .Pp The .Fn timezone function returns a pointer to a time zone abbreviation for the specified .Ar zone and .Ar dst values. .Ar Zone is the number of minutes west of GMT and .Ar dst is non-zero if daylight savings time is in effect. .Sh SEE ALSO .Xr ctime 3 .Sh HISTORY A .Fn timezone function appeared in .At v7 . Index: stable/4/lib/libc/stdlib/malloc.3 =================================================================== --- stable/4/lib/libc/stdlib/malloc.3 (revision 60874) +++ stable/4/lib/libc/stdlib/malloc.3 (revision 60875) @@ -1,462 +1,463 @@ .\" Copyright (c) 1980, 1991, 1993 .\" The Regents of the University of California. All rights reserved. .\" .\" This code is derived from software contributed to Berkeley by .\" the American National Standards Committee X3, on Information .\" Processing Systems. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" 3. All advertising materials mentioning features or use of this software .\" must display the following acknowledgement: .\" This product includes software developed by the University of .\" California, Berkeley and its contributors. .\" 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. .\" .\" @(#)malloc.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" .Dd August 27, 1996 .Dt MALLOC 3 .Os FreeBSD 2 .Sh NAME .Nm malloc, calloc, realloc, free, reallocf .Nd general purpose memory allocation functions .Sh LIBRARY .Lb libc .Sh SYNOPSIS .Fd #include .Ft void * .Fn malloc "size_t size" .Ft void * .Fn calloc "size_t number" "size_t size" .Ft void * .Fn realloc "void *ptr" "size_t size" .Ft void * .Fn reallocf "void *ptr" "size_t size" .Ft void .Fn free "void *ptr" .Ft char * .Va malloc_options; .Sh DESCRIPTION The .Fn malloc function allocates .Fa size bytes of memory. The allocated space is suitably aligned (after possible pointer coercion) for storage of any type of object. If the space is at least .Em pagesize bytes in length (see .Xr getpagesize 3 ), the returned memory will be page boundary aligned as well. If .Fn malloc fails, a NULL pointer is returned. .Pp Note that .Fn malloc does .Em NOT normally initialize the returned memory to zero bytes. .Pp The .Fn calloc function allocates space for .Fa number objects, each .Fa size bytes in length. The result is identical to calling .Fn malloc with an argument of .Dq "number * size" , with the exception that the allocated memory is explicitly initialized to zero bytes. .Pp The .Fn realloc function changes the size of the previously allocated memory referenced by .Fa ptr to .Fa size bytes. The contents of the memory are unchanged up to the lesser of the new and old sizes. If the new size is larger, the value of the newly allocated portion of the memory is undefined. If the requested memory cannot be allocated, NULL is returned and the memory referenced by .Fa ptr is valid and unchanged. If .Fa ptr is NULL, the .Fn realloc function behaves identically to .Fn malloc for the specified size. .Pp The .Fn reallocf function call is identical to the realloc function call, except that it will free the passed pointer when the requested memory cannot be allocated. This is a FreeBSD specific API designed to ease the problems with traditional coding styles for realloc causing memory leaks in libraries. .Pp The .Fn free function causes the allocated memory referenced by .Fa ptr to be made available for future allocations. If .Fa ptr is NULL, no action occurs. .Sh TUNING Once, when the first call is made to one of these memory allocation routines, various flags will be set or reset, which affect the workings of this allocation implementation. .Pp The ``name'' of the file referenced by the symbolic link named .Pa /etc/malloc.conf , the value of the environment variable .Ev MALLOC_OPTIONS , and the string pointed to by the global variable .Va malloc_options will be interpreted, in that order, character by character as flags. .Pp Most flags are single letters, where uppercase indicates that the behavior is set, or on, and lowercase means that the behavior is not set, or off. .Bl -tag -width indent .It A All warnings (except for the warning about unknown flags being set), and failure to allocate memory become fatal. The process will call .Xr abort 3 in these cases. .It J Each byte of new memory allocated by .Fn malloc , .Fn realloc or .Fn reallocf as well as all memory returned by .Fn free , .Fn realloc or .Fn reallocf will be initialized to 0xd0. This options also sets the .Dq R option. This is intended for debugging and will impact performance negatively. .It H Pass a hint to the kernel about pages unused by the allocation functions. This will help performance if the system is paging excessively. This option is off by default. .It R Causes the .Fn realloc and .Fn reallocf functions to always reallocate memory even if the initial allocation was sufficiently large. This can substantially aid in compacting memory. .It U Generate .Dq utrace entries for .Xr ktrace 1 , for all operations. Consult the source for details on this option. .It V Attempting to allocate zero bytes will return a NULL pointer instead of a valid pointer. (The default behavior is to make a minimal allocation and return a pointer to it.) This option is provided for System V compatibility. This option is incompatible with the .Dq X option. .It X Rather than return failure for any allocation function, display a diagnostic message on stderr and cause the program to drop core (using .Xr abort 3 ). This option should be set at compile time by including the following in the source code: .Bd -literal -offset indent extern char *malloc_options; malloc_options = "X"; .Ed .It Z This option implicitly sets the .Dq J and .Dq R options, and then zeros out the bytes that were requested. This is intended for debugging and will impact performance negatively. .It < Reduce the size of the cache by a factor of two. The default cache size is 16 pages. This option can be specified multiple times. .It > Double the size of the cache by a factor of two. The default cache size is 16 pages. This option can be specified multiple times. .El .Pp The .Dq J and .Dq Z options are intended for testing and debugging. An application which changes its behavior when these options are used is flawed. .Sh EXAMPLES To set a systemwide reduction of cache size, and to dump core whenever a problem occurs: .Pp .Bd -literal -offset indent ln -s 'A<' /etc/malloc.conf .Ed .Pp To specify in the source that a program does no return value checking on calls to these functions: .Bd -literal -offset indent extern char *malloc_options; malloc_options = "X"; .Ed .Sh ENVIRONMENT The following environment variables affect the execution of the allocation functions: .Bl -tag -width MMM .It Ev MALLOC_OPTIONS If the environment variable .Ev MALLOC_OPTIONS is set, the characters it contains will be interpreted as flags to the allocation functions. .Sh RETURN VALUES The .Fn malloc and .Fn calloc functions return a pointer to the allocated memory if successful; otherwise a NULL pointer is returned and .Va errno is set to .Er ENOMEM . .Pp The .Fn realloc and .Fn reallocf functions return a pointer, possibly identical to .Fa ptr , to the allocated memory if successful; otherwise a NULL pointer is returned, in which case the memory referenced by .Fa ptr is still available and intact. In the case of memory allocation failure, .Va errno is set to .Er ENOMEM . .Pp The .Fn free function returns no value. .Sh DEBUGGING MALLOC PROBLEMS .Pp The major difference between this implementation and other allocation implementations is that the free pages are not accessed unless allocated, and are aggressively returned to the kernel for reuse. .Bd -filled -offset indent Most allocation implementations will store a data structure containing a linked list in the free chunks of memory, used to tie all the free memory together. That can be suboptimal, as every time the free-list is traversed, the otherwise unused, and likely paged out, pages are faulted into primary memory. On systems which are paging, this can result in a factor of five increase in the number of page-faults done by a process. .Ed .Pp A side effect of this architecture is that many minor transgressions on the interface which would traditionally not be detected are in fact detected. As a result, programs that have been running happily for years may suddenly start to complain loudly, when linked with this allocation implementation. .Pp The first and most important thing to do is to set the .Dq A option. This option forces a coredump (if possible) at the first sign of trouble, rather than the normal policy of trying to continue if at all possible. .Pp It is probably also a good idea to recompile the program with suitable options and symbols for debugger support. .Pp If the program starts to give unusual results, coredump or generally behave differently without emitting any of the messages listed in the next section, it is likely because it depends on the storage being filled with zero bytes. Try running it with .Dq Z option set; if that improves the situation, this diagnosis has been confirmed. If the program still misbehaves, the likely problem is accessing memory outside the allocated area, more likely after than before the allocated area. .Pp Alternatively, if the symptoms are not easy to reproduce, setting the .Dq J option may help provoke the problem. .Pp In truly difficult cases, the .Dq U option, if supported by the kernel, can provide a detailed trace of all calls made to these functions. .Pp Unfortunately this implementation does not provide much detail about the problems it detects, the performance impact for storing such information would be prohibitive. There are a number of allocation implementations available on the 'Net which focus on detecting and pinpointing problems by trading performance for extra sanity checks and detailed diagnostics. .Sh DIAGNOSTIC MESSAGES If .Fn malloc , .Fn calloc , .Fn realloc or .Fn free detect an error or warning condition, a message will be printed to file descriptor STDERR_FILENO. Errors will result in the process dumping core. If the .Dq A option is set, all warnings are treated as errors. .Pp The following is a brief description of possible error messages and their meanings: .Pp .Bl -tag -width indent .It "(ES): mumble mumble mumble The allocation functions were compiled with .Dq EXTRA_SANITY defined, and an error was found during the additional error checking. Consult the source code for further information. .It "allocation failed If the .Dq A option is specified it is a fatal error for an allocation function to fail. .It "mmap(2) failed, check limits This most likely means that the system is dangerously overloaded or that the process' limits are incorrectly specified. .It "freelist is destroyed The internal free-list has been corrupted. .El .Pp .Bl -tag -width indent The following is a brief description of possible warning messages and their meanings: .Pp .It "chunk/page is already free The process attempted to .Fn free memory which had already been freed. .It "junk pointer ... A pointer specified to one of the allocation functions points outside the bounds of the memory of which they are aware. .It "malloc() has never been called No memory has been allocated, yet something is being freed or realloc'ed. .It "modified (chunk-/page-) pointer The pointer passed to .Fn free or .Fn realloc has been modified. .It "pointer to wrong page The pointer that .Fn malloc or .Fn calloc is trying to free does not reference a possible page. .It "recursive call A process has attempted to call an allocation function recursively. This is not permitted. In particular, signal handlers should not attempt to allocate memory. .It "out of memory The .Dq X option was specified and an allocation of memory failed. .It "unknown char in MALLOC_OPTIONS An unknown option was specified. Even with the .Dq A option set, this warning is still only a warning. .Sh SEE ALSO .Xr brk 2 , .Xr alloca 3 , .Xr getpagesize 3 , .Xr memory 3 .Pa /usr/share/doc/papers/malloc.ascii.gz .Sh STANDARDS The .Fn malloc , .Fn calloc , .Fn realloc and .Fn free functions conform to .St -ansiC . .Sh BUGS The messages printed in case of problems provide no detail about the actual values. .Pp It can be argued that returning a null pointer when asked to allocate zero bytes is a silly response to a silly question. .Pp -This implementation was authored by Poul-Henning Kamp. +This implementation was authored by +.An Poul-Henning Kamp . Please report any problems to him at -.Li . +.Aq phk@FreeBSD.org . .Sh HISTORY The present allocation implementation started out as a filesystem for a drum attached to a 20bit binary challenged computer which was built with discrete germanium transistors. It has since graduated to handle primary storage rather than secondary. It first appeared in its new shape and ability in .Fx 2.2 . .Pp The .Xr reallocf 3 function first appeared in .Fx 3.0 . Index: stable/4/libexec/telnetd/telnetd.8 =================================================================== --- stable/4/libexec/telnetd/telnetd.8 (revision 60874) +++ stable/4/libexec/telnetd/telnetd.8 (revision 60875) @@ -1,627 +1,627 @@ .\" Copyright (c) 1983, 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. .\" 3. All advertising materials mentioning features or use of this software .\" must display the following acknowledgement: .\" This product includes software developed by the University of .\" California, Berkeley and its contributors. .\" 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. .\" .\" @(#)telnetd.8 8.3 (Berkeley) 3/1/94 .\" $FreeBSD$ .\" .Dd March 1, 1994 .Dt TELNETD 8 .Os BSD 4.2 .Sh NAME .Nm telnetd .Nd DARPA .Tn TELNET protocol server .Sh SYNOPSIS .Nm /usr/libexec/telnetd .Op Fl Uhlkns .Op Fl D Ar debugmode .Op Fl I Ns Ar initid .Op Fl S Ar tos .Op Fl X Ar authtype .Op Fl a Ar authmode .Op Fl edebug .Op Fl p Ar loginprog .Op Fl r Ns Ar lowpty-highpty .Op Fl u Ar len .Op Fl debug Op Ar port .Sh DESCRIPTION The .Nm command is a server which supports the .Tn DARPA standard .Tn TELNET virtual terminal protocol. .Nm Telnetd is normally invoked by the internet server (see .Xr inetd 8 ) for requests to connect to the .Tn TELNET port as indicated by the .Pa /etc/services file (see .Xr services 5 ). The .Fl debug option may be used to start up .Nm manually, instead of through .Xr inetd 8 . If started up this way, .Ar port may be specified to run .Nm on an alternate .Tn TCP port number. .Pp The .Nm command accepts the following options: .Bl -tag -width indent .It Fl a Ar authmode This option may be used for specifying what mode should be used for authentication. Note that this option is only useful if .Nm has been compiled with support for the .Dv AUTHENTICATION option. There are several valid values for .Ar authmode : .Bl -tag -width debug .It Cm debug Turn on authentication debugging code. .It Cm user Only allow connections when the remote user can provide valid authentication information to identify the remote user, and is allowed access to the specified account without providing a password. .It Cm valid Only allow connections when the remote user can provide valid authentication information to identify the remote user. The .Xr login 1 command will provide any additional user verification needed if the remote user is not allowed automatic access to the specified account. .It Cm other Only allow connections that supply some authentication information. This option is currently not supported by any of the existing authentication mechanisms, and is thus the same as specifying .Fl a .Cm valid . .It Cm none This is the default state. Authentication information is not required. If no or insufficient authentication information is provided, then the .Xr login 1 program will provide the necessary user verification. .It Cm off Disable the authentication code. All user verification will happen through the .Xr login 1 program. .El .It Fl D Ar debugmode This option may be used for debugging purposes. This allows .Nm to print out debugging information to the connection, allowing the user to see what .Nm is doing. There are several possible values for .Ar debugmode : .Bl -tag -width exercise .It Cm options Print information about the negotiation of .Tn TELNET options. .It Cm report Print the .Cm options information, plus some additional information about what processing is going on. .It Cm netdata Display the data stream received by .Nm Ns . .It Cm ptydata Display data written to the pty. .It Cm exercise Has not been implemented yet. .El .It Fl debug Enable debugging on each socket created by .Nm (see .Dv SO_DEBUG in .Xr socket 2 ) . .It Fl edebug If .Nm has been compiled with support for data encryption, then the .Fl edebug option may be used to enable encryption debugging code. .It Fl p Ar loginprog Specify an alternate .Xr login 1 command to run to complete the login. The alternate command must understand the same command arguments as the standard login. .It Fl h Disable the printing of host-specific information before login has been completed. .It Fl I Ar initid This option is only applicable to .Tn UNICOS systems prior to 7.0. It specifies the .Dv ID from .Pa /etc/inittab to use when init starts login sessions. The default .Dv ID is .Dv fe. .It Fl k This option is only useful if .Nm has been compiled with both linemode and kludge linemode support. If the .Fl k option is specified, then if the remote client does not support the .Dv LINEMODE option, then .Nm will operate in character at a time mode. It will still support kludge linemode, but will only go into kludge linemode if the remote client requests it. (This is done by the client sending .Dv DONT SUPPRESS-GO-AHEAD and .Dv DONT ECHO . ) The .Fl k option is most useful when there are remote clients that do not support kludge linemode, but pass the heuristic (if they respond with .Dv WILL TIMING-MARK in response to a .Dv DO TIMING-MARK) for kludge linemode support. .It Fl l Specify line mode. Try to force clients to use line- at-a-time mode. If the .Dv LINEMODE option is not supported, it will go into kludge linemode. .It Fl n Disable .Dv TCP keep-alives. Normally .Nm enables the .Tn TCP keep-alive mechanism to probe connections that have been idle for some period of time to determine if the client is still there, so that idle connections from machines that have crashed or can no longer be reached may be cleaned up. .It Fl r Ar lowpty-highpty This option is only enabled when .Nm is compiled for .Dv UNICOS. It specifies an inclusive range of pseudo-terminal devices to use. If the system has sysconf variable .Dv _SC_CRAY_NPTY configured, the default pty search range is 0 to .Dv _SC_CRAY_NPTY; otherwise, the default range is 0 to 128. Either .Ar lowpty or .Ar highpty may be omitted to allow changing either end of the search range. If .Ar lowpty is omitted, the - character is still required so that .Nm can differentiate .Ar highpty from .Ar lowpty . .It Fl s This option is only enabled if .Nm is compiled with support for .Tn SecurID cards. It causes the .Fl s option to be passed on to .Xr login 1 , and thus is only useful if .Xr login 1 supports the .Fl s flag to indicate that only .Tn SecurID validated logins are allowed, and is usually useful for controlling remote logins from outside of a firewall. .It Fl S Ar tos .It Fl u Ar len This option is used to specify the size of the field in the .Dv utmp structure that holds the remote host name. If the resolved host name is longer than .Ar len , the dotted decimal value will be used instead. This allows hosts with very long host names that overflow this field to still be uniquely identified. Specifying .Fl u0 indicates that only dotted decimal addresses should be put into the .Pa utmp file. .It Fl U This option causes .Nm to refuse connections from addresses that cannot be mapped back into a symbolic name via the .Xr gethostbyaddr 3 routine. .It Fl X Ar authtype This option is only valid if .Nm has been built with support for the authentication option. It disables the use of .Ar authtype authentication, and can be used to temporarily disable a specific authentication type without having to recompile .Nm Ns . .El .Pp .Nm Telnetd operates by allocating a pseudo-terminal device (see .Xr pty 4 ) for a client, then creating a login process which has the slave side of the pseudo-terminal as .Dv stdin , .Dv stdout and .Dv stderr . .Nm Telnetd manipulates the master side of the pseudo-terminal, implementing the .Tn TELNET protocol and passing characters between the remote client and the login process. .Pp When a .Tn TELNET session is started up, .Nm sends .Tn TELNET options to the client side indicating a willingness to do the following .Tn TELNET options, which are described in more detail below: .Bd -literal -offset indent DO AUTHENTICATION WILL ENCRYPT DO TERMINAL TYPE DO TSPEED DO XDISPLOC DO NEW-ENVIRON DO ENVIRON WILL SUPPRESS GO AHEAD DO ECHO DO LINEMODE DO NAWS WILL STATUS DO LFLOW DO TIMING-MARK .Ed .Pp The pseudo-terminal allocated to the client is configured to operate in \*(lqcooked\*(rq mode, and with .Dv XTABS and .Dv CRMOD enabled (see .Xr tty 4 ) . .Pp .Nm Telnetd has support for enabling locally the following .Tn TELNET options: .Bl -tag -width "DO AUTHENTICATION" .It "WILL ECHO" When the .Dv LINEMODE option is enabled, a .Dv WILL ECHO or .Dv WONT ECHO will be sent to the client to indicate the current state of terminal echoing. When terminal echo is not desired, a .Dv WILL ECHO is sent to indicate that .Nm will take care of echoing any data that needs to be echoed to the terminal, and then nothing is echoed. When terminal echo is desired, a .Dv WONT ECHO is sent to indicate that .Nm will not be doing any terminal echoing, so the client should do any terminal echoing that is needed. .It "WILL BINARY" Indicate that the client is willing to send a 8 bits of data, rather than the normal 7 bits of the Network Virtual Terminal. .It "WILL SGA" Indicate that it will not be sending .Dv IAC GA, go ahead, commands. .It "WILL STATUS" Indicate a willingness to send the client, upon request, of the current status of all .Tn TELNET options. .It "WILL TIMING-MARK" Whenever a .Dv DO TIMING-MARK command is received, it is always responded to with a .Dv WILL TIMING-MARK . .It "WILL LOGOUT" When a .Dv DO LOGOUT is received, a .Dv WILL LOGOUT is sent in response, and the .Tn TELNET session is shut down. .It "WILL ENCRYPT" Only sent if .Nm is compiled with support for data encryption, and indicates a willingness to decrypt the data stream. .El .Pp .Nm Telnetd has support for enabling remotely the following .Tn TELNET options: .Bl -tag -width "DO AUTHENTICATION" .It "DO BINARY" Sent to indicate that .Nm is willing to receive an 8 bit data stream. .It "DO LFLOW" Requests that the client handle flow control characters remotely. .It "DO ECHO" This is not really supported, but is sent to identify a 4.2BSD .Xr telnet 1 client, which will improperly respond with .Dv WILL ECHO. If a .Dv WILL ECHO is received, a .Dv DONT ECHO will be sent in response. .It "DO TERMINAL-TYPE" Indicate a desire to be able to request the name of the type of terminal that is attached to the client side of the connection. .It "DO SGA" Indicate that it does not need to receive .Dv IAC GA, the go ahead command. .It "DO NAWS" Requests that the client inform the server when the window (display) size changes. .It "DO TERMINAL-SPEED" Indicate a desire to be able to request information about the speed of the serial line to which the client is attached. .It "DO XDISPLOC" Indicate a desire to be able to request the name of the X Window System display that is associated with the telnet client. .It "DO NEW-ENVIRON" Indicate a desire to be able to request environment variable information, as described in RFC 1572. .It "DO ENVIRON" Indicate a desire to be able to request environment variable information, as described in RFC 1408. .It "DO LINEMODE" Only sent if .Nm is compiled with support for linemode, and requests that the client do line by line processing. .It "DO TIMING-MARK" Only sent if .Nm is compiled with support for both linemode and kludge linemode, and the client responded with .Dv WONT LINEMODE. If the client responds with .Dv WILL TM, the it is assumed that the client supports kludge linemode. Note that the .Op Fl k option can be used to disable this. .It "DO AUTHENTICATION" Only sent if .Nm is compiled with support for authentication, and indicates a willingness to receive authentication information for automatic login. .It "DO ENCRYPT" Only sent if .Nm is compiled with support for data encryption, and indicates a willingness to decrypt the data stream. .Sh NOTES By default .Nm will read the .Em \&he , .Em \&hn , and .Em \&im capabilities from .Pa /etc/gettytab and use that information (if present) to determine what to display before the login: prompt. You can also use a System V style .Pa /etc/issue file by using the .Em \&if capability, which will override .Em \&im . The information specified in either .Em \&im or .Em \&if will be displayed to both console and remote logins. -.Sh ENVIRONMENT +.\" .Sh ENVIRONMENT .Sh FILES .Bl -tag -width /usr/ucb/bftp -compact .It Pa /etc/services .It Pa /etc/gettytab .It Pa /etc/inittab (UNICOS systems only) .It Pa /etc/iptos (if supported) .It Pa /usr/ucb/bftp (if supported) .El .Sh "SEE ALSO" .Xr bftp 1 , .Xr login 1 , .Xr gettytab 5 , .Xr telnet 1 (if supported) .Sh STANDARDS .Bl -tag -compact -width RFC-1572 .It Cm RFC-854 .Tn TELNET PROTOCOL SPECIFICATION .It Cm RFC-855 TELNET OPTION SPECIFICATIONS .It Cm RFC-856 TELNET BINARY TRANSMISSION .It Cm RFC-857 TELNET ECHO OPTION .It Cm RFC-858 TELNET SUPPRESS GO AHEAD OPTION .It Cm RFC-859 TELNET STATUS OPTION .It Cm RFC-860 TELNET TIMING MARK OPTION .It Cm RFC-861 TELNET EXTENDED OPTIONS - LIST OPTION .It Cm RFC-885 TELNET END OF RECORD OPTION .It Cm RFC-1073 Telnet Window Size Option .It Cm RFC-1079 Telnet Terminal Speed Option .It Cm RFC-1091 Telnet Terminal-Type Option .It Cm RFC-1096 Telnet X Display Location Option .It Cm RFC-1123 Requirements for Internet Hosts -- Application and Support .It Cm RFC-1184 Telnet Linemode Option .It Cm RFC-1372 Telnet Remote Flow Control Option .It Cm RFC-1416 Telnet Authentication Option .It Cm RFC-1411 Telnet Authentication: Kerberos Version 4 .It Cm RFC-1412 Telnet Authentication: SPX .It Cm RFC-1571 Telnet Environment Option Interoperability Issues .It Cm RFC-1572 Telnet Environment Option .Sh BUGS Some .Tn TELNET commands are only partially implemented. .Pp Because of bugs in the original 4.2 BSD .Xr telnet 1 , .Nm performs some dubious protocol exchanges to try to discover if the remote client is, in fact, a 4.2 BSD .Xr telnet 1 . .Pp Binary mode has no common interpretation except between similar operating systems (Unix in this case). .Pp The terminal type name received from the remote client is converted to lower case. .Pp .Nm Telnetd never sends .Tn TELNET .Dv IAC GA (go ahead) commands. .Sh HISTORY -IPv6 support was added by WIDE/KAME project. \ No newline at end of file +IPv6 support was added by WIDE/KAME project.