aboutsummaryrefslogtreecommitdiff
path: root/networking/telnet.c
AgeCommit message (Collapse)Author
2020-12-29randomconfig fixesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2020-11-29libbb: introduce and use sleep1()Denys Vlasenko
function old new delta sleep1 - 9 +9 run_shutdown_and_kill_processes 97 95 -2 restore_state_and_exit 116 114 -2 reread_partition_table 67 65 -2 flush_buffer_cache 80 78 -2 chat_main 1302 1300 -2 timeout_main 310 307 -3 telnet_main 1235 1232 -3 stop_handler 86 83 -3 process_action 1078 1075 -3 nbdclient_main 1185 1182 -3 init_main 789 786 -3 getty_main 1541 1538 -3 do_time 410 407 -3 runsv_main 1682 1677 -5 pause_and_low_level_reboot 59 54 -5 inetd_main 1917 1911 -6 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 0/16 up/down: 9/-50) Total: -41 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2019-10-18telnet: add disabled code to emit EC and IPDenys Vlasenko
> I'm trying to connect to a Korenix 3005 switch through telnet > for management purposes, and all is well except for the backspace character > - seems like my switch doesn't handle it too well and instead of erasing > the last character all it does is print some garbage to the screen. > I've had the same issue before while using putty, but saw a solution that > suggests to enable "Telnet special commands" in the options menu, and it > worked. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2019-09-25telnet: fix uninitialized variable bugDenys Vlasenko
function old new delta telnet_main 1236 1238 +2 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2019-01-09telnet: placate compiler's warningDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2019-01-06telnet: provide feedback after successful connectDanijel Tasov
The real telnet provides some feedback: Trying 127.0.0.1... Connected to localhost.localdomain. Escape character is '^]'. We should do this to, because people are sitting there and think a firewall is dropping packets. function old new delta telnet_main 1270 1279 +9 Signed-off-by: Danijel Tasov <m@rbfh.de> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2019-01-06telnet: code shrinkDenys Vlasenko
function old new delta put_iac3_IAC_x_y_merged - 21 +21 put_iac4_msb_lsb - 19 +19 put_iac2_msb_lsb - 19 +19 put_iac 20 34 +14 iac_flush 32 36 +4 put_iac2_merged 46 - -46 telnet_main 1492 1270 -222 ------------------------------------------------------------------------------ (add/remove: 3/1 grow/shrink: 2/1 up/down: 77/-268) Total: -191 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2019-01-06telnet: speed up processing of network inputDenys Vlasenko
function old new delta telnet_main 1482 1492 +10 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-12-28config: update size informationDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-04-17libbb: new option FEATURE_ETC_SERVICES: if off, /etc/services reads often ↵Denys Vlasenko
avoided In practice, "wget http://host.com/" always uses port 80. People explicitly set non-standard ports via options or parameters ("telnet 1.2.3.4 567" or "telnet 1.2.3.4 ftp") instead of modifying /etc/services. function old new delta telnet_main 1466 1464 -2 rdate_main 215 198 -17 fakeidentd_main 269 252 -17 parse_url 459 392 -67 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/4 up/down: 0/-103) Total: -103 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-04-07telnet: move winsize detection closer to I/O loop, delete non-functioning ↵Denys Vlasenko
debug code Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-10-05whitespace and comment format fixes, no code changesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-08-17telnet: "-a" + "-l USER" should respect USERDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-08-02config: do not use `a' quoting in help textsDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-07-21config: deindent all help textsDenys Vlasenko
Those two spaces after tab have no effect, and always a nuisance when editing. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-07-18Update menuconfig items with approximate applet sizesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-01-11Move FEATURE_AUTOWIDTH config option to two applets which use itDenys Vlasenko
No code changes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-11-23Convert all networking/* applets to "new style" applet definitionsDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-10-12telnet: code shrinkDenys Vlasenko
put_iac2(w,c) is mostly used with constants, fold them into one arg function old new delta put_iac2_merged - 46 +46 telnet_main 1603 1583 -20 con_escape 285 257 -28 put_iac2 50 - -50 ------------------------------------------------------------------------------ (add/remove: 1/1 grow/shrink: 0/2 up/down: 46/-98) Total: -52 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-04-21*: add most of the required setup_common_bufsiz() callsDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-04-21libbb: make bb_common_bufsiz1 1 kbyte, add capability to use bss tail for itDenys Vlasenko
The config item is FEATURE_USE_BSS_TAIL. When it is off (default): function old new delta read_config 210 228 +18 doCommands 2279 2294 +15 ipneigh_list_or_flush 763 772 +9 ipaddr_list_or_flush 1256 1261 +5 display_process_list 1301 1306 +5 conspy_main 1378 1383 +5 do_lzo_compress 352 355 +3 do_lzo_decompress 565 567 +2 push 46 44 -2 inetd_main 2136 2134 -2 uevent_main 421 418 -3 addLines 97 92 -5 bb_common_bufsiz1 8193 1024 -7169 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 8/5 up/down: 62/-7181) Total: -7119 bytes text data bss dec hex filename 829850 4086 9080 843016 cdd08 busybox_old 829901 4086 1904 835891 cc133 busybox_unstripped FEATURE_USE_BSS_TAIL=y: read_config 210 228 +18 doCommands 2279 2294 +15 ipneigh_list_or_flush 763 772 +9 ipaddr_list_or_flush 1256 1261 +5 display_process_list 1301 1306 +5 conspy_main 1378 1383 +5 do_lzo_compress 352 355 +3 do_lzo_decompress 565 567 +2 inetd_main 2136 2134 -2 bb_common_bufsiz1 8193 - -8193 ------------------------------------------------------------------------------ (add/remove: 0/1 grow/shrink: 8/1 up/down: 62/-8195) Total: -8133 bytes text data bss dec hex filename 829850 4086 9080 843016 cdd08 busybox_old 829911 4086 880 834877 cbd3d busybox_unstripped FIXME: setup_common_bufsiz() calls are missing. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-10-13*: more BUILD_BUG_ON conversionsDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-08-24libbb: add setsockopt_foo helpersDenys Vlasenko
function old new delta setsockopt_int - 23 +23 do_load 918 934 +16 setsockopt_SOL_SOCKET_int - 14 +14 setsockopt_keepalive - 10 +10 setsockopt_SOL_SOCKET_1 - 10 +10 buffer_fill_and_print 169 178 +9 setsockopt_1 - 8 +8 nfsmount 3560 3566 +6 redirect 1277 1282 +5 tcpudpsvd_main 1782 1786 +4 d6_send_kernel_packet 272 275 +3 i2cget_main 380 382 +2 ed_main 2544 2545 +1 scan_recursive 380 378 -2 nbdclient_main 492 490 -2 hash_find 235 233 -2 cmdputs 334 332 -2 parse_command 1443 1440 -3 static.two 4 - -4 ntpd_main 1039 1035 -4 const_int_1 4 - -4 const_IPTOS_LOWDELAY 4 - -4 RCVBUF 4 - -4 ntp_init 474 469 -5 change_listen_mode 316 310 -6 uevent_main 416 409 -7 arping_main 1697 1690 -7 telnet_main 1612 1603 -9 socket_want_pktinfo 42 33 -9 setsockopt_reuseaddr 21 10 -11 setsockopt_broadcast 21 10 -11 httpd_main 772 757 -15 get_remote_transfer_fd 109 94 -15 make_new_session 503 487 -16 ftpd_main 2177 2160 -17 read_bunzip 1896 1866 -30 common_traceroute_main 4099 4058 -41 common_ping_main 1836 1783 -53 ------------------------------------------------------------------------------ (add/remove: 5/4 grow/shrink: 8/21 up/down: 111/-283) Total: -172 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-05-12telnet: code shrinkDenys Vlasenko
function old new delta telnet_main 1519 1515 -4 con_escape 296 285 -11 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-09-17telnet: convert Enter -> CR LF in line mode tooDenys Vlasenko
function old new delta handle_net_output 87 98 +11 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-09-17telnet: shrink literal string sizeDenys Vlasenko
text data bss dec hex filename 888483 497 7584 896564 dae34 busybox_old 888450 497 7584 896531 dae13 busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-09-13telnet: convert CR -> CR LF, not CR -> CR NUL when sending data to serverDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-07-08more tweak for bionicDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-06-05*: remove "Options:" string from help textsDenys Vlasenko
function old new delta packed_usage 28706 28623 -83 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-04-11move remaining help text from include/usage.src.hPere Orga
Signed-off-by: Pere Orga <gotrunks@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-29telnet: do not check for 0 return from poll (it's impossible)Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-29telnet: convert CR NUL -> CR on input. Closes bug 2569Denys Vlasenko
function old new delta telnet_main 1558 1594 +36 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-08-16*: make GNU licensing statement forms more regularDenys Vlasenko
This change retains "or later" state! No licensing _changes_ here, only form is adjusted (article, space between "GPL" and "v2" and so on). Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-26*: mass cosmetic removal of extra empty lines. no code changesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-07bbconfig: make it independent from printf functionsDenys Vlasenko
function old new delta full_write2_str - 25 +25 full_write1_str - 25 +25 clear_main 21 20 -1 telnet_main 1488 1477 -11 getty_main 1932 1918 -14 full_write22_str 25 - -25 ------------------------------------------------------------------------------ (add/remove: 2/1 grow/shrink: 0/3 up/down: 50/-51) Total: -1 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-04-27telnet: prevent SEGV if we are requested TELOPT_NEW_ENVIRON.Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-02*: do not check for POLLIN/POLLOUT only, just in case it's POLHUP/POLERRDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-02-04*: suppress ~60% of "aliased warnings" on gcc-4.4.1Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-12*: add/remove safe_, it seems we had a few incorrect usesDenys Vlasenko
function old new delta chat_main 1359 1361 +2 microcom_main 712 713 +1 ifplugd_main 1109 1110 +1 arpping 465 466 +1 acpid_main 440 441 +1 script_main 1069 1067 -2 cgi_io_loop_and_exit 594 591 -3 telnet_main 1475 1469 -6 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 5/3 up/down: 6/-11) Total: -5 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-30find: add zeroing of G.xxx; ftpd - remove extraneous zeroing of G.xxxDenys Vlasenko
Brought "G trick" to the same shape in a few more places. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2008-11-25ash,hush: add TODO for rare build failureDenis Vlasenko
*: remove some redundant includes
2008-11-11telnetd: correctly output 0xff char. ~100 bytes.Denis Vlasenko
telnet: fix some atrocious names and style. no code changes
2008-09-11runsvd: shrink by VladimirDenis Vlasenko
*: use unified trivial signal handler function old new delta record_signo - 10 +10 process_stdin 433 443 +10 bbunpack 383 391 +8 wc_main 598 605 +7 conescape 293 296 +3 nmeter_main 670 672 +2 fallbackSort 1717 1719 +2 bb_got_signal - 1 +1 microcom_main 713 712 -1 signalled 2 - -2 pack_gzip 1661 1659 -2 evalvar 1376 1374 -2 compare_keys 737 735 -2 parse_command 1460 1456 -4 expand 1748 1744 -4 s_term 37 29 -8 s_hangup 8 - -8 fgotsig 10 - -10 find_pair 187 169 -18 signal_handler 190 170 -20 runsvdir_main 1701 1583 -118 ------------------------------------------------------------------------------ (add/remove: 2/3 grow/shrink: 6/10 up/down: 43/-199) Total: -156 bytes
2008-07-21telnet: shrinkDenis Vlasenko
telnetd: shrink, and fix issue file printing test: better and shorter usage text function old new delta putiac2 51 50 -1 putiac 24 20 -4 handlenetoutput 95 91 -4 telnet_main 1480 1475 -5 iacflush 37 32 -5 make_new_session 436 421 -15 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/6 up/down: 0/-34) Total: -34 bytes
2008-07-05*: rename ATTRIBUTE_XXX to just XXX.Denis Vlasenko
2008-05-19- use STD*_FILENO some more. No object-code changesBernhard Reutner-Fischer
2008-05-19- use EXIT_{SUCCESS,FAILURE}. No object-code changesBernhard Reutner-Fischer
2008-05-18more -Wall warning fixes. -Wall is enabled now.Denis Vlasenko
2007-11-06telnet: use poll, it's shorterDenis Vlasenko
*: style fixes
2007-10-11add -fvisibility=hidden to CC flags, mark XXX_main functionsDenis Vlasenko
EXTERNALLY_VISIBLE. 5% size reduction of libbusybox.so