lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sat, 25 Nov 2006 17:50:54 +0100
From:	Baurzhan Ismagulov <ibr@...ix50.net>
To:	Luke Kenneth Casson Leighton <lkcl@...l.net>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: tty line discipline driver advice sought, to do a 1-byte header and 2-byte CRC checksum on GSM data

Hello Luke,

On Sat, Nov 25, 2006 at 04:06:14AM +0000, Luke Kenneth Casson Leighton wrote:
> i've never encountered tty line discipline's before.  which one is the
> best example that i should start with to cut/paste?

The second link by Guennadi is very good.

You can think of ldiscs as a layer between the serial driver and the
application. You fill struct tty_ldisc and call tty_register_ldisc. The
app opens a tty device and calls the TIOCSETD ioctl on it. The app (the
"above") sees the usual driver API -- read, write, etc. Your routines
manipulate the data as you like; you call tty->driver.write to write to
the serial driver (the "below"). The serial driver can call your
routines to tell you that, e.g., it has data for you, etc. You may
convert the data, buffer it till the app calls your read, etc.

You can find many examples if you search for tty_register_ldisc in the
kernel tree. However, understanding how this works and reading
include/linux/tty_ldisc.h should be enough.

With kind regards,
Baurzhan.

P.S. I'm subscribed only to linux-arm-kernel.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ