Linux PPP protocol development
 help / color / mirror / Atom feed
From: James Carlson <carlsonj@workingcode.com>
To: linux-ppp@vger.kernel.org
Subject: Re: pty
Date: Wed, 28 Oct 2009 20:20:06 +0000	[thread overview]
Message-ID: <4AE8A776.5060202@workingcode.com> (raw)
In-Reply-To: <W5658327625161531256756882@webmail25>

tony.chamberlain@lemko.com wrote:
> I am curious how the pppd pty process (in this case ppp_relay) communicates
> to pppd?  We did a netstat and found pppd but no TCP nor UDP ports were
> associated with it.  It was just a UNIX-type process.

The ppp_relay process will have stdin and stdout connected to the master
side of a pty pair.  Pppd then configures PPP to run on the slave side.
 Pppd is completely unaware of what that child process is doing; it
won't have any network ports open.

The process run by the pppd "pty" option should read and write
AHDLC-encoded PPP packets on standard input and output.  Where and how
it gets those packets are a problem for the person writing ppp_relay.

Or, as the fine man page says:

       pty script
        Specifies  that  the command script is to be used to communicate
        rather than a specific  terminal  device.   Pppd  will  allocate
        itself  a  pseudo-tty master/slave pair and use the slave as its
        terminal device.  The script will be run in a child process with
        the  pseudo-tty  master  as  its  standard input and output.  An
        explicit device name may not be given if this  option  is  used.
        (Note:  if  the record option is used in conjuction with the pty
        option, the child process will have pipes on its standard  input
        and output.)

-- 
James Carlson         42.703N 71.076W         <carlsonj@workingcode.com>

  parent reply	other threads:[~2009-10-28 20:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-28 19:08 pty tony.chamberlain
2009-10-28 19:43 ` pty Charlie Brady
2009-10-28 20:20 ` James Carlson [this message]
2009-10-28 20:23 ` pty Bill Unruh
2009-10-28 22:48 ` pty tony.chamberlain
2009-10-28 23:38 ` pty James Carlson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4AE8A776.5060202@workingcode.com \
    --to=carlsonj@workingcode.com \
    --cc=linux-ppp@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox