On Wednesday 03 August 2005 16:51, Gilad Ben-Yossef wrote:
> Suppose I have a bunch of PPP "packets" and suppose I want to push those 
> unto a serial line (tty device)

The first problem I see, is that PPP has some state information which
it negotiate at link startup via the LCP protocol (things like
header-compression, escape characters, etc.) So in general, I'm not
sure you can simply "push some packets" and expect a reply --
I think you should bring up the PPP link (with LCP).

> The magic words seems to be "PPP line decpline" and such

Yes they are (and not the "raw line discipline" mentioned
by someone else).

Here is the general idea:
        1. The tty driver is modular in its input/output processing.
        2. Just like any char-driver provide different implementation
           for its 'file_operations' -- any "line discipline" provides
           a different implementation for the tty "bussiness logic".
        3. These are replaceable in run time (just like the 'fops' are).
        4. There are several well known line disciplines:
                cooked, raw, ppp, slip

Now, if you think I know to point you to the relevant kernel code
you are very wrong (and you don't need me for this).

However, let's not leave the rest completely in the dark...
.. tty_ioctl(4) should introduce TIOCGETD, TIOCSETD.

You can start from these hooks either into the kernel source
or outward via the pppd(8) source [I didn't do neither].

See you all tommorow:
        August-Penguin-Four,
        we want more!

-- 
Oron Peled                             Voice/Fax: +972-4-8228492
[EMAIL PROTECTED]                  http://www.actcom.co.il/~oron
ICQ UIN: 16527398

"Emacs is a fine OS, but it lacks a good text editor"

=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to