Re: [PATCH] char nvtty: Network Virtual Terminal support

Previous thread: Re: [PATCH 01/15]arch:m68k:ifpsp060:src:fpsp.S Typo change diable to disable. by Jiri Kosina on Monday, January 3, 2011 - 8:07 am. (1 message)

Next thread: Network Virtual Terminal by Rodolfo Giometti on Monday, January 3, 2011 - 8:15 am. (2 messages)
From: Rodolfo Giometti
Date: Monday, January 3, 2011 - 8:15 am

A Network Virtual terminal (NVT tty) is a software device consisting
of one halves: a client device, which is identical to a physical
terminal, who, is turn, get connected with a remote server where real
tty devices are located.

These devices are specified by RFC 854 and RFC 2217 and ther name into
the system is /dev/nvttyX (by default you have 4 devices).

By using these devices and a proper compatible server (not included
here but you can use sredird) you can get access to a remote tty
device as the tty device itself was conneted with your local host.
All data and settings are sent and received through the network.

Signed-off-by: Rodolfo Giometti <giometti@linux.it>
---
 Documentation/ABI/testing/sysfs-nvtty |   35 +
 drivers/char/Kconfig                  |   22 +
 drivers/char/Makefile                 |    1 +
 drivers/char/nvtty.c                  | 1557 +++++++++++++++++++++++++++++++++
 4 files changed, 1615 insertions(+), 0 deletions(-)
 create mode 100644 Documentation/ABI/testing/sysfs-nvtty
 create mode 100644 drivers/char/nvtty.c

diff --git a/Documentation/ABI/testing/sysfs-nvtty b/Documentation/ABI/testing/sysfs-nvtty
new file mode 100644
index 0000000..a52d319
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-nvtty
@@ -0,0 +1,35 @@
+What:		/sys/class/tty/nvttyX/
+Date:		January 2011
+Contact:	Rodolfo Giometti <giometti@linux.it>
+Description:
+		The /sys/class/tty/nvttyX/ directory is related to X-th
+		NVT tty device into the system. Each directory will
+		contain files to manage and control its NVT tty device.
+
+What:		/sys/class/tty/nvttyX/connection
+Date:		January 2011
+Contact:	Rodolfo Giometti <giometti@linux.it>
+Description:
+		The /sys/class/tty/nvttyX/connection file reports 1 if the
+		related NVT tty device is connected with remote server and
+		0 otherwise.
+
+What:		/sys/class/tty/nvttyX/ip
+Date:		January 2011
+Contact:	Rodolfo Giometti <giometti@linux.it>
+Description:
+		The /sys/class/tty/nvttyX/ip file reports the IP ...
From: Alan Cox
Date: Monday, January 3, 2011 - 10:14 am

Interesting but would it not be better to keep all the network stuff in
user space given that most sane environments will have crypto on them ?

It's also a less than ideal protocol in that it can't represent some of
the things termios can, nor can it report arbitary speeds properly.

Is there a reason it couldn't use pty/tty pairs either as is or tweaked
to better report termios changes and allow modem line reporting ?

Alan
--

From: Rodolfo Giometti
Date: Monday, January 3, 2011 - 11:02 am

Yes, but in most cases this is used on not-crypted connections (as far
as I know there are no crypted server for this protocol yet), however
we can easily get a crypted connection by connecting with localhost

I see, but it is widely used and also it can be enhanced to better fit
termios capabilities.

However by using this protocol "as is" we can do several useful

This is the solution that cyclades-serial-client uses (the userland
program where my patch is derived from) but as far as I know pty/tty
pairs cannot be used to report termios settings but only data... is
that right? =:-o

Ciao,

Rodolfo

-- 

GNU/Linux Solutions                  e-mail: giometti@enneenne.com
Linux Device Driver                          giometti@linux.it
Embedded Systems                     phone:  +39 349 2432127
UNIX programming                     skype:  rodolfo.giometti
Freelance ICT Italia - Consulente ICT Italia - www.consulenti-ict.it
--

From: Samuel Thibault
Date: Monday, January 3, 2011 - 11:22 am

ptys are meant to let you deal with termios, precisely (contrary to mere
pipes for instance).

Samuel
--

From: Randy Dunlap
Date: Monday, January 3, 2011 - 4:32 pm

---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
desserts:  http://www.xenotime.net/linux/recipes/
--

Previous thread: Re: [PATCH 01/15]arch:m68k:ifpsp060:src:fpsp.S Typo change diable to disable. by Jiri Kosina on Monday, January 3, 2011 - 8:07 am. (1 message)

Next thread: Network Virtual Terminal by Rodolfo Giometti on Monday, January 3, 2011 - 8:15 am. (2 messages)