[BusyBox] (fwd) BusyBox - telnet
Vladimir N. Oleynik
dzo at simtreas.ru
Thu Apr 4 08:28:04 UTC 2002
Przemyslaw,
> Is someone interested in it?
Yes.
> There was three problems:
>
> 1. busybox-telnet dosn't inform server about the size of terminal screen.
> In the world of xterminals and frame buffers it's rather horrible
> to use fixed 80x24 region in upper-left corner of screen/window.
>
> 2. If client sends character 0x0d to the server then sends character 0x0a
> the server eat the second byte (0x0a) - it's described in telnet RFC.
> Client should send two bytes ( 0x0d + 0x0a or 0x0d + 0x00 ) insted of
> one 0x0d byte.
>
> 3. busybox telnet implementation wasn't 8bit clean (look at 0xff byte).
> I need it because I have to use binray transfer like rz/sz. So when
> I resloved the problem (2) I corrected this one two.
Good work.
> --------------------------------------------------------------------------------
> Name: busybox.patch.gz
> busybox.patch.gz Type: unspecified type (application/octet-stream)
> Encoding: base64
-+ byte outbuf[2048];
++ byte outbuf[4*DATABUFSIZE];
+ for (i = len, j = 0; i > 0; i--, p++)
+ {
+ if (*p == 0x1d)
+ {
+ conescape();
+ return;
+ }
+ outbuf[j++] = *p;
+ if (*p == 0xff)
+ outbuf[j++] = 0xff;
+ else if (*p == 0x0d)
+ outbuf[j++] = 0x00;
+
-+ if ( j >= sizeof(outbuf)-2 )
-+ {
-+ write(G.netfd, outbuf, j);
-+ j = 0;
-+ }
+ }
+ if (j > 0 )
+ write(G.netfd, outbuf, j);
+/*
More information about the busybox
mailing list