README.ORIG revision 57417
1283625Sdim 2283625SdimThis is a distribution of both client and server telnet. These programs 3283625Sdimhave been compiled on: 4283625Sdim telnet telnetd 5283625Sdim 4.4 BSD-Lite x x 6283625Sdim 4.3 BSD Reno X X 7283625Sdim UNICOS 9.1 X X 8283625Sdim UNICOS 9.0 X X 9283625Sdim UNICOS 8.0 X X 10283625Sdim BSDI 2.0 X X 11283625Sdim Solaris 2.4 x x (no linemode in server) 12283625Sdim SunOs 4.1.4 X X (no linemode in server) 13283625Sdim Ultrix 4.3 X X (no linemode in server) 14283625Sdim Ultrix 4.1 X X (no linemode in server) 15283625Sdim 16283625SdimIn addition, previous versions have been compiled on the following 17283625Sdimmachines, but were not available for testing this version. 18283625Sdim telnet telnetd 19283625Sdim Next1.0 X X 20283625Sdim UNICOS 8.3 X X 21283625Sdim UNICOS 7.C X X 22283625Sdim UNICOS 7.0 X X 23283625Sdim SunOs 4.0.3c X X (no linemode in server) 24283625Sdim 4.3 BSD X X (no linemode in server) 25283625Sdim DYNIX V3.0.12 X X (no linemode in server) 26283625Sdim Ultrix 3.1 X X (no linemode in server) 27283625Sdim Ultrix 4.0 X X (no linemode in server) 28283625Sdim SunOs 3.5 X X (no linemode in server) 29283625Sdim SunOs 4.1.3 X X (no linemode in server) 30283625Sdim Solaris 2.2 x x (no linemode in server) 31283625Sdim Solaris 2.3 x x (no linemode in server) 32283625Sdim BSDI 1.0 X X 33283625Sdim BSDI 1.1 X X 34296417Sdim DYNIX V3.0.17.9 X X (no linemode in server) 35283625Sdim HP-UX 8.0 x x (no linemode in server) 36283625Sdim 37283625SdimThis code should work, but there are no guarantees. 38283625Sdim 39283625SdimMay 30, 1995 40283625Sdim 41283625SdimThis release represents what is on the 4.4BSD-Lite2 release, which 42283625Sdimshould be the final BSD release. I will continue to support of 43283625Sdimtelnet, The code (without encryption) is available via anonymous ftp 44283625Sdimfrom ftp.cray.com, in src/telnet/telnet.YY.MM.DD.NE.tar.Z, where 45283625SdimYY.MM.DD is replaced with the year, month and day of the release. 46283625SdimIf you can't find it at one of these places, at some point in the 47283625Sdimnear future information about the latest releases should be available 48283625Sdimfrom ftp.borman.com. 49283625Sdim 50283625SdimIn addition, the version with the encryption code is available via 51283625Sdimftp from net-dist.mit.edu, in the directory /pub/telnet. There 52283625Sdimis a README file there that gives further information on how 53283625Sdimto get the distribution. 54283625Sdim 55283625SdimQuestions, comments, bug reports and bug fixes can be sent to 56283625Sdimone of these addresses: 57283625Sdim dab@borman.com 58283625Sdim dab@cray.com 59283625Sdim dab@bsdi.com 60283625Sdim 61283625SdimThis release is mainly bug fixes and code cleanup. 62283625Sdim 63283625Sdim Replace all calls to bcopy()/bzero() with calls to 64283625Sdim memmove()/memset() and all calls to index()/rindex() 65283625Sdim with calls to strchr()/strrchr(). 66296417Sdim 67296417Sdim Add some missing diagnostics for option tracing 68283625Sdim to telnetd. 69283625Sdim 70283625Sdim Add support for BSDI 2.0 and Solaris 2.4. 71283625Sdim 72283625Sdim Add support for UNICOS 8.0 73283625Sdim 74283625Sdim Get rid of expanded tabs and trailing white spaces. 75283625Sdim 76283625Sdim From Paul Vixie: 77283625Sdim Fix for telnet going into an endless spin 78283625Sdim when the session dies abnormally. 79283625Sdim 80283625Sdim From Jef Poskanzer: 81283625Sdim Changes to allow telnet to compile 82283625Sdim under SunOS 3.5. 83283625Sdim 84283625Sdim From Philip Guenther: 85283625Sdim makeutx() doesn't expand utmpx, 86283625Sdim use pututxline() instead. 87283625Sdim 88283625Sdim From Chris Torek: 89283625Sdim Add a sleep(1) before execing login 90283625Sdim to avoid race condition that can eat 91283625Sdim up the login prompt. 92283625Sdim Use terminal speed directly if it is 93283625Sdim not an encoded value. 94283625Sdim 95283625Sdim From Steve Parker: 96283625Sdim Fix to realloc() call. Fix for execing 97283625Sdim login on solaris with no user name. 98283625Sdim 99283625SdimJanuary 19, 1994 100283625Sdim 101283625SdimThis is a list of some of the changes since the last tar release 102283625Sdimof telnet/telnetd. There are probably other changes that aren't 103283625Sdimlisted here, but this should hit a lot of the main ones. 104283625Sdim 105283625Sdim General: 106283625Sdim Changed #define for AUTHENTICATE to AUTHENTICATION 107283625Sdim Changed #define for ENCRYPT to ENCRYPTION 108283625Sdim Changed #define for DES_ENCRYPT to DES_ENCRYPTION 109283625Sdim 110283625Sdim Added support for SPX authentication: -DSPX 111283625Sdim 112283625Sdim Added support for Kerberos Version 5 authentication: -DKRB5 113283625Sdim 114283625Sdim Added support for ANSI C function prototypes 115283625Sdim 116283625Sdim Added support for the NEW-ENVIRON option (RFC-1572) 117283625Sdim including support for USERVAR. 118283625Sdim 119283625Sdim Made support for the old Environment Option (RFC-1408) 120283625Sdim conditional on -DOLD_ENVIRON 121283625Sdim 122283625Sdim Added #define ENV_HACK - support for RFC 1571 123283625Sdim 124283625Sdim The encryption code is removed from the public distributions. 125283625Sdim Domestic 4.4 BSD distributions contain the encryption code. 126283625Sdim 127283625Sdim ENV_HACK: Code to deal with systems that only implement 128283625Sdim the old ENVIRON option, and have reversed definitions 129283625Sdim of ENV_VAR and ENV_VAL. Also fixes ENV processing in 130283625Sdim client to handle things besides just the default set... 131283625Sdim 132283625Sdim NO_BSD_SETJMP: UNICOS configuration for 133283625Sdim UNICOS 6.1/6.0/5.1/5.0 systems. 134283625Sdim 135283625Sdim STREAMSPTY: Use /dev/ptmx to get a clean pty. This 136283625Sdim is for SVr4 derivatives (Like Solaris) 137283625Sdim 138283625Sdim UTMPX: For systems that have /etc/utmpx. This is for 139283625Sdim SVr4 derivatives (Like Solaris) 140283625Sdim 141283625Sdim Definitions for BSDI 1.0 142283625Sdim 143283625Sdim Definitions for 4.3 Reno and 4.4 BSD. 144283625Sdim 145283625Sdim Definitions for UNICOS 8.0 and UNICOS 7.C 146283625Sdim 147283625Sdim Definitions for Solaris 2.0 148283625Sdim 149283625Sdim Definitions for HP-UX 8.0 150283625Sdim 151283625Sdim Latest Copyright notices from Berkeley. 152283625Sdim 153283625Sdim FLOW-CONTROL: support for RFC-XXXx 154283625Sdim 155283625Sdim 156283625Sdim Client Specific: 157283625Sdim 158283625Sdim Fix the "send" command to not send garbage... 159283625Sdim 160283625Sdim Fix status message for "skiprc" 161283625Sdim 162283625Sdim Make sure to send NAWS after telnet has been suspended 163283625Sdim or an external command has been run, if the window size 164283625Sdim has changed. 165283625Sdim 166283625Sdim sysV88 support. 167283625Sdim 168283625Sdim Server Specific: 169283625Sdim 170283625Sdim Support flowcontrol option in non-linemode servers. 171283625Sdim 172283625Sdim -k Server supports Kludge Linemode, but will default to 173283625Sdim either single character mode or real Linemode support. 174283625Sdim The user will have to explicitly ask to switch into 175283625Sdim kludge linemode. ("stty extproc", or escape back to 176283625Sdim to telnet and say "mode line".) 177283625Sdim 178283625Sdim -u Specify the length of the hostname field in the utmp 179283625Sdim file. Hostname longer than this length will be put 180283625Sdim into the utmp file in dotted decimal notation, rather 181283625Sdim than putting in a truncated hostname. 182283625Sdim 183283625Sdim -U Registered hosts only. If a reverse hostname lookup 184296417Sdim fails, the connection will be refused. 185296417Sdim 186283625Sdim -f/-F 187283625Sdim Allows forwarding of credentials for KRB5. 188283625Sdim 189283625SdimFebrurary 22, 1991: 190283625Sdim 191283625Sdim Features: 192283625Sdim 193283625Sdim This version of telnet/telnetd has support for both 194283625Sdim the AUTHENTICATION and ENCRYPTION options. The 195283625Sdim AUTHENTICATION option is fairly well defined, and 196283625Sdim an option number has been assigned to it. The 197283625Sdim ENCRYPTION option is still in a state of flux; an 198283625Sdim option number has been assigned to, but it is still 199283625Sdim subject to change. The code is provided in this release 200283625Sdim for experimental and testing purposes. 201283625Sdim 202283625Sdim The telnet "send" command can now be used to send 203283625Sdim do/dont/will/wont commands, with any telnet option 204283625Sdim name. The rules for when do/dont/will/wont are sent 205283625Sdim are still followed, so just because the user requests 206283625Sdim that one of these be sent doesn't mean that it will 207283625Sdim be sent... 208283625Sdim 209283625Sdim The telnet "getstatus" command no longer requires 210283625Sdim that option printing be enabled to see the response 211283625Sdim to the "DO STATUS" command. 212283625Sdim 213283625Sdim A -n flag has been added to telnetd to disable 214283625Sdim keepalives. 215283625Sdim 216283625Sdim A new telnet command, "auth" has been added (if 217283625Sdim AUTHENTICATE is defined). It has four sub-commands, 218283625Sdim "status", "disable", "enable" and "help". 219283625Sdim 220283625Sdim A new telnet command, "encrypt" has been added (if 221283625Sdim ENCRYPT is defined). It has many sub-commands: 222283625Sdim "enable", "type", "start", "stop", "input", 223283625Sdim "-input", "output", "-output", "status", and "help". 224283625Sdim 225283625Sdim The LOGOUT option is now supported by both telnet 226283625Sdim and telnetd, a new command, "logout", was added 227283625Sdim to support this. 228283625Sdim 229283625Sdim Several new toggle options were added: 230283625Sdim "autoencrypt", "autodecrypt", "autologin", "authdebug", 231283625Sdim "encdebug", "skiprc", "verbose_encrypt" 232283625Sdim 233283625Sdim An "rlogin" interface has been added. If the program 234283625Sdim is named "rlogin", or the "-r" flag is given, then 235283625Sdim an rlogin type of interface will be used. 236283625Sdim ~. Terminates the session 237283625Sdim ~<susp> Suspend the session 238283625Sdim ~^] Escape to telnet command mode 239283625Sdim ~~ Pass through the ~. 240283625Sdim BUG: If you type the rlogin escape character 241283625Sdim in the middle of a line while in rlogin 242283625Sdim mode, you cannot erase it or any characters 243283625Sdim before it. Hopefully this can be fixed 244283625Sdim in a future release... 245283625Sdim 246283625Sdim General changes: 247283625Sdim 248283625Sdim A "libtelnet.a" has now been created. This libraray 249283625Sdim contains code that is common to both telnet and 250283625Sdim telnetd. This is also where library routines that 251283625Sdim are needed, but are not in the standard C library, 252283625Sdim are placed. 253283625Sdim 254283625Sdim The makefiles have been re-done. All of the site 255283625Sdim specific configuration information has now been put 256283625Sdim into a single "Config.generic" file, in the top level 257283625Sdim directory. Changing this one file will take care of 258283625Sdim all three subdirectories. Also, to add a new/local 259 definition, a "Config.local" file may be created 260 at the top level; if that file exists, the subdirectories 261 will use that file instead of "Config.generic". 262 263 Many 1-2 line functions in commands.c have been 264 removed, and just inserted in-line, or replaced 265 with a macro. 266 267 Bug Fixes: 268 269 The non-termio code in both telnet and telnetd was 270 setting/clearing CTLECH in the sg_flags word. This 271 was incorrect, and has been changed to set/clear the 272 LCTLECH bit in the local mode word. 273 274 The SRCRT #define has been removed. If IP_OPTIONS 275 and IPPROTO_IP are defined on the system, then the 276 source route code is automatically enabled. 277 278 The NO_GETTYTAB #define has been removed; there 279 is a compatability routine that can be built into 280 libtelnet to achive the same results. 281 282 The server, telnetd, has been switched to use getopt() 283 for parsing the argument list. 284 285 The code for getting the input/output speeds via 286 cfgetispeed()/cfgetospeed() was still not quite 287 right in telnet. Posix says if the ispeed is 0, 288 then it is really equal to the ospeed. 289 290 The suboption processing code in telnet now has 291 explicit checks to make sure that we received 292 the entire suboption (telnetd was already doing this). 293 294 The telnet code for processing the terminal type 295 could cause a core dump if an existing connection 296 was closed, and a new connection opened without 297 exiting telnet. 298 299 Telnetd was doing a TCSADRAIN when setting the new 300 terminal settings; This is not good, because it means 301 that the tcsetattr() will hang waiting for output to 302 drain, and telnetd is the only one that will drain 303 the output... The fix is to use TCSANOW which does 304 not wait. 305 306 Telnetd was improperly setting/clearing the ISTRIP 307 flag in the c_lflag field, it should be using the 308 c_iflag field. 309 310 When the child process of telnetd was opening the 311 slave side of the pty, it was re-setting the EXTPROC 312 bit too early, and some of the other initialization 313 code was wiping it out. This would cause telnetd 314 to go out of linemode and into single character mode. 315 316 One instance of leaving linemode in telnetd forgot 317 to send a WILL ECHO to the client, the net result 318 would be that the user would see double character 319 echo. 320 321 If the MODE was being changed several times very 322 quickly, telnetd could get out of sync with the 323 state changes and the returning acks; and wind up 324 being left in the wrong state. 325 326September 14, 1990: 327 328 Switch the client to use getopt() for parsing the 329 argument list. The 4.3Reno getopt.c is included for 330 systems that don't have getopt(). 331 332 Use the posix _POSIX_VDISABLE value for what value 333 to use when disabling special characters. If this 334 is undefined, it defaults to 0x3ff. 335 336 For non-termio systems, TIOCSETP was being used to 337 change the state of the terminal. This causes the 338 input queue to be flushed, which we don't want. This 339 is now changed to TIOCSETN. 340 341 Take out the "#ifdef notdef" around the code in the 342 server that generates a "sync" when the pty oputput 343 is flushed. The potential problem is that some older 344 telnet clients may go into an infinate loop when they 345 receive a "sync", if so, the server can be compiled 346 with "NO_URGENT" defined. 347 348 Fix the client where it was setting/clearing the OPOST 349 bit in the c_lflag field, not the c_oflag field. 350 351 Fix the client where it was setting/clearing the ISTRIP 352 bit in the c_lflag field, not the c_iflag field. (On 353 4.3Reno, this is the ECHOPRT bit in the c_lflag field.) 354 The client also had its interpretation of WILL BINARY 355 and DO BINARY reversed. 356 357 Fix a bug in client that would cause a core dump when 358 attempting to remove the last environment variable. 359 360 In the client, there were a few places were switch() 361 was being passed a character, and if it was a negative 362 value, it could get sign extended, and not match 363 the 8 bit case statements. The fix is to and the 364 switch value with 0xff. 365 366 Add a couple more printoption() calls in the client, I 367 don't think there are any more places were a telnet 368 command can be received and not printed out when 369 "options" is on. 370 371 A new flag has been added to the client, "-a". Currently, 372 this just causes the USER name to be sent across, in 373 the future this may be used to signify that automatic 374 authentication is requested. 375 376 The USER variable is now only sent by the client if 377 the "-a" or "-l user" options are explicity used, or 378 if the user explicitly asks for the "USER" environment 379 variable to be exported. In the server, if it receives 380 the "USER" environment variable, it won't print out the 381 banner message, so that only "Password:" will be printed. 382 This makes the symantics more like rlogin, and should be 383 more familiar to the user. (People are not used to 384 getting a banner message, and then getting just a 385 "Password:" prompt.) 386 387 Re-vamp the code for starting up the child login 388 process. The code was getting ugly, and it was 389 hard to tell what was really going on. What we 390 do now is after the fork(), in the child: 391 1) make sure we have no controlling tty 392 2) open and initialize the tty 393 3) do a setsid()/setpgrp() 394 4) makes the tty our controlling tty. 395 On some systems, #2 makes the tty our controlling 396 tty, and #4 is a no-op. The parent process does 397 a gets rid of any controlling tty after the child 398 is fork()ed. 399 400 Use the strdup() library routine in telnet, instead 401 of the local savestr() routine. If you don't have 402 strdup(), you need to define NO_STRDUP. 403 404 Add support for ^T (SIGINFO/VSTATUS), found in the 405 4.3Reno distribution. This maps to the AYT character. 406 You need a 4-line bugfix in the kernel to get this 407 to work properly: 408 409 > *** tty_pty.c.ORG Tue Sep 11 09:41:53 1990 410 > --- tty_pty.c Tue Sep 11 17:48:03 1990 411 > *************** 412 > *** 609,613 **** 413 > if ((tp->t_lflag&NOFLSH) == 0) 414 > ttyflush(tp, FREAD|FWRITE); 415 > ! pgsignal(tp->t_pgrp, *(unsigned int *)data); 416 > return(0); 417 > } 418 > --- 609,616 ---- 419 > if ((tp->t_lflag&NOFLSH) == 0) 420 > ttyflush(tp, FREAD|FWRITE); 421 > ! pgsignal(tp->t_pgrp, *(unsigned int *)data, 1); 422 > ! if ((*(unsigned int *)data == SIGINFO) && 423 > ! ((tp->t_lflag&NOKERNINFO) == 0)) 424 > ! ttyinfo(tp); 425 > return(0); 426 > } 427 428 The client is now smarter when setting the telnet escape 429 character; it only sets it to one of VEOL and VEOL2 if 430 one of them is undefined, and the other one is not already 431 defined to the telnet escape character. 432 433 Handle TERMIOS systems that have seperate input and output 434 line speed settings imbedded in the flags. 435 436 Many other minor bug fixes. 437 438June 20, 1990: 439 Re-organize makefiles and source tree. The telnet/Source 440 directory is now gone, and all the source that was in 441 telnet/Source is now just in the telnet directory. 442 443 Seperate makefile for each system are now gone. There 444 are two makefiles, Makefile and Makefile.generic. 445 The "Makefile" has the definitions for the various 446 system, and "Makefile.generic" does all the work. 447 There is a variable called "WHAT" that is used to 448 specify what to make. For example, in the telnet 449 directory, you might say: 450 make 4.4bsd WHAT=clean 451 to clean out the directory. 452 453 Add support for the ENVIRON and XDISPLOC options. 454 In order for the server to work, login has to have 455 the "-p" option to preserve environment variables. 456 457 Add the SOFT_TAB and LIT_ECHO modes in the LINEMODE support. 458 459 Add the "-l user" option to command line and open command 460 (This is passed through the ENVIRON option). 461 462 Add the "-e" command line option, for setting the escape 463 character. 464 465 Add the "-D", diagnostic, option to the server. This allows 466 the server to print out debug information, which is very 467 useful when trying to debug a telnet that doesn't have any 468 debugging ability. 469 470 Turn off the literal next character when not in LINEMODE. 471 472 Don't recognize ^Y locally, just pass it through. 473 474 Make minor modifications for Sun4.0 and Sun4.1 475 476 Add support for both FORW1 and FORW2 characters. The 477 telnet escpape character is set to whichever of the 478 two is not being used. If both are in use, the escape 479 character is not set, so when in linemode the user will 480 have to follow the escape character with a <CR> or <EOF) 481 to get it passed through. 482 483 Commands can now be put in single and double quotes, and 484 a backslash is now an escape character. This is needed 485 for allowing arbitrary strings to be assigned to environment 486 variables. 487 488 Switch telnetd to use macros like telnet for keeping 489 track of the state of all the options. 490 491 Fix telnetd's processing of options so that we always do 492 the right processing of the LINEMODE option, regardless 493 of who initiates the request to turn it on. Also, make 494 sure that if the other side went "WILL ECHO" in response 495 to our "DO ECHO", that we send a "DONT ECHO" to get the 496 option turned back off! 497 498 Fix the TERMIOS setting of the terminal speed to handle both 499 BSD's seperate fields, and the SYSV method of CBAUD bits. 500 501 Change how we deal with the other side refusing to enable 502 an option. The sequence used to be: send DO option; receive 503 WONT option; send DONT option. Now, the sequence is: send 504 DO option; receive WONT option. Both should be valid 505 according to the spec, but there has been at least one 506 client implementation of telnet identified that can get 507 really confused by this. (The exact sequence, from a trace 508 on the server side, is (numbers are number of responses that 509 we expect to get after that line...): 510 511 send WILL ECHO 1 (initial request) 512 send WONT ECHO 2 (server is changing state) 513 recv DO ECHO 1 (first reply, ok. expect DONT ECHO next) 514 send WILL ECHO 2 (server changes state again) 515 recv DONT ECHO 1 (second reply, ok. expect DO ECHO next) 516 recv DONT ECHO 0 (third reply, wrong answer. got DONT!!!) 517 *** send WONT ECHO (send WONT to acknowledge the DONT) 518 send WILL ECHO 1 (ask again to enable option) 519 recv DO ECHO 0 520 521 recv DONT ECHO 0 522 send WONT ECHO 1 523 recv DONT ECHO 0 524 recv DO ECHO 1 525 send WILL ECHO 0 526 (and the last 5 lines loop forever) 527 528 The line with the "***" is last of the WILL/DONT/WONT sequence. 529 The change to the server to not generate that makes this same 530 example become: 531 532 send will ECHO 1 533 send wont ECHO 2 534 recv do ECHO 1 535 send will ECHO 2 536 recv dont ECHO 1 537 recv dont ECHO 0 538 recv do ECHO 1 539 send will ECHO 0 540 541 There is other option negotiation going on, and not sending 542 the third part changes some of the timings, but this specific 543 example no longer gets stuck in a loop. The "telnet.state" 544 file has been modified to reflect this change to the algorithm. 545 546 A bunch of miscellaneous bug fixes and changes to make 547 lint happier. 548 549 This version of telnet also has some KERBEROS stuff in 550 it. This has not been tested, it uses an un-authorized 551 telnet option number, and uses an out-of-date version 552 of the (still being defined) AUTHENTICATION option. 553 There is no support for this code, do not enable it. 554 555 556March 1, 1990: 557CHANGES/BUGFIXES SINCE LAST RELEASE: 558 Some support for IP TOS has been added. Requires that the 559 kernel support the IP_TOS socket option (currently this 560 is only in UNICOS 6.0). 561 562 Both telnet and telnetd now use the cc_t typedef. typedefs are 563 included for systems that don't have it (in termios.h). 564 565 SLC_SUSP was not supported properly before. It is now. 566 567 IAC EOF was not translated properly in telnetd for SYSV_TERMIO 568 when not in linemode. It now saves a copy of the VEOF character, 569 so that when ICANON is turned off and we can't trust it anymore 570 (because it is now the VMIN character) we use the saved value. 571 572 There were two missing "break" commands in the linemode 573 processing code in telnetd. 574 575 Telnetd wasn't setting the kernel window size information 576 properly. It was using the rows for both rows and columns... 577 578Questions/comments go to 579 David Borman 580 Cray Research, Inc. 581 655F Lone Oak Drive 582 Eagan, MN 55123 583 dab@cray.com. 584 585README: You are reading it. 586 587Config.generic: 588 This file contains all the OS specific definitions. It 589 has pre-definitions for many common system types, and is 590 in standard makefile fromat. See the comments at the top 591 of the file for more information. 592 593Config.local: 594 This is not part of the distribution, but if this file exists, 595 it is used instead of "Config.generic". This allows site 596 specific configuration without having to modify the distributed 597 "Config.generic" file. 598 599kern.diff: 600 This file contains the diffs for the changes needed for the 601 kernel to support LINEMODE is the server. These changes are 602 for a 4.3BSD system. You may need to make some changes for 603 your particular system. 604 605 There is a new bit in the terminal state word, TS_EXTPROC. 606 When this bit is set, several aspects of the terminal driver 607 are disabled. Input line editing, character echo, and 608 mapping of signals are all disabled. This allows the telnetd 609 to turn of these functions when in linemode, but still keep 610 track of what state the user wants the terminal to be in. 611 612 New ioctl()s: 613 614 TIOCEXT Turn on/off the TS_EXTPROC bit 615 TIOCGSTATE Get t_state of tty to look at TS_EXTPROC bit 616 TIOCSIG Generate a signal to processes in the 617 current process group of the pty. 618 619 There is a new mode for packet driver, the TIOCPKT_IOCTL bit. 620 When packet mode is turned on in the pty, and the TS_EXTPROC 621 bit is set, then whenever the state of the pty is changed, the 622 next read on the master side of the pty will have the TIOCPKT_IOCTL 623 bit set, and the data will contain the following: 624 struct xx { 625 struct sgttyb a; 626 struct tchars b; 627 struct ltchars c; 628 int t_state; 629 int t_flags; 630 } 631 This allows the process on the server side of the pty to know 632 when the state of the terminal has changed, and what the new 633 state is. 634 635 However, if you define USE_TERMIO or SYSV_TERMIO, the code will 636 expect that the structure returned in the TIOCPKT_IOCTL is 637 the termio/termios structure. 638 639stty.diff: 640 This file contains the changes needed for the stty(1) program 641 to report on the current status of the TS_EXTPROC bit. It also 642 allows the user to turn on/off the TS_EXTPROC bit. This is useful 643 because it allows the user to say "stty -extproc", and the 644 LINEMODE option will be automatically disabled, and saying "stty 645 extproc" will re-enable the LINEMODE option. 646 647telnet.state: 648 Both the client and server have code in them to deal 649 with option negotiation loops. The algorithm that is 650 used is described in this file. 651 652telnet: 653 This directory contains the client code. No kernel changes are 654 needed to use this code. 655 656telnetd: 657 This directory contains the server code. If LINEMODE or KLUDGELINEMODE 658 are defined, then the kernel modifications listed above are needed. 659 660libtelnet: 661 This directory contains code that is common to both the client 662 and the server. 663 664arpa: 665 This directory has a new <arpa/telnet.h> 666 667libtelnet/Makefile.4.4: 668telnet/Makefile.4.4: 669telnetd/Makefile.4.4: 670 These are the makefiles that can be used on a 4.3Reno 671 system when this software is installed in /usr/src/lib/libtelnet, 672 /usr/src/libexec/telnetd, and /usr/src/usr.bin/telnet. 673 674 675The following TELNET options are supported: 676 677 LINEMODE: 678 The LINEMODE option is supported as per RFC1116. The 679 FORWARDMASK option is not currently supported. 680 681 BINARY: The client has the ability to turn on/off the BINARY 682 option in each direction. Turning on BINARY from 683 server to client causes the LITOUT bit to get set in 684 the terminal driver on both ends, turning on BINARY 685 from the client to the server causes the PASS8 bit 686 to get set in the terminal driver on both ends. 687 688 TERMINAL-TYPE: 689 This is supported as per RFC1091. On the server side, 690 when a terminal type is received, termcap/terminfo 691 is consulted to determine if it is a known terminal 692 type. It keeps requesting terminal types until it 693 gets one that it recongnizes, or hits the end of the 694 list. The server side looks up the entry in the 695 termcap/terminfo data base, and generates a list of 696 names which it then passes one at a time to each 697 request for a terminal type, duplicating the last 698 entry in the list before cycling back to the beginning. 699 700 NAWS: The Negotiate about Window Size, as per RFC 1073. 701 702 TERMINAL-SPEED: 703 Implemented as per RFC 1079 704 705 TOGGLE-FLOW-CONTROL: 706 Implemented as per RFC 1080 707 708 TIMING-MARK: 709 As per RFC 860 710 711 SGA: As per RFC 858 712 713 ECHO: As per RFC 857 714 715 LOGOUT: As per RFC 727 716 717 STATUS: 718 The server will send its current status upon 719 request. It does not ask for the clients status. 720 The client will request the servers current status 721 from the "send getstatus" command. 722 723 ENVIRON: 724 This option is currently being defined by the IETF 725 Telnet Working Group, and an RFC has not yet been 726 issued, but should be in the near future... 727 728 X-DISPLAY-LOCATION: 729 This functionality can be done through the ENVIRON 730 option, it is added here for completeness. 731 732 AUTHENTICATION: 733 This option is currently being defined by the IETF 734 Telnet Working Group, and an RFC has not yet been 735 issued. The basic framework is pretty much decided, 736 but the definitions for the specific authentication 737 schemes is still in a state of flux. 738 739 ENCRYPTION: 740 This option is currently being defined by the IETF 741 Telnet Working Group, and an RFC has not yet been 742 issued. The draft RFC is still in a state of flux, 743 so this code may change in the future. 744