Linux PPP protocol development
 help / color / mirror / Atom feed
From: James Carlson <carlsonj@workingcode.com>
To: linux-ppp@vger.kernel.org
Subject: Re: Using PPPD pty option and script: controlling stdin buffer size?
Date: Tue, 12 Oct 2010 15:18:33 +0000	[thread overview]
Message-ID: <4CB47C49.2090401@workingcode.com> (raw)
In-Reply-To: <291B2C7721AC7B49AD11449A2883992E2E0DF561DB@SINTEFEXMBX01.sintef.no>

Arne Lie wrote:
> Walter,
> 
> thanks, this could be the trick yes, we will have a look at that one!
> 
> /Arne
> 
>> -----Original Message-----
>> From: walter harms [mailto:wharms@bfs.de]
>> Sent: 12. oktober 2010 16:31
>> To: Arne Lie
>> Cc: ppp Linux
>> Subject: Re: Using PPPD pty option and script: controlling stdin buffer
>> size?
>>
>> I am not sure if i understand you correctly,
>> but can change the bufferhandling of stdio by setting the buffer size
>> using setbuf() (man 3 setbuf)

That only does something if you're reading through the stdio functions
(e.g., fread(3C)), and not through the recommended section low-level
read(2) function.  Using stdio to read/write from the master side of a
pty pair would be ... odd.

If you're seeing unwanted buffering here, I think you'll need to modify
either the kernel's pty subsystem or the PPP line discipline that it's
using.

I wouldn't recommend doing this, though.  Buffering is generally a good
thing.  If your application doesn't do sufficient congestion control to
avoid getting unacceptably stuck behind a long queue in the middle of
the network, then I'd call that a bug in the application, rather than a
problem with the network interface.

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

  parent reply	other threads:[~2010-10-12 15:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-12 11:39 Using PPPD pty option and script: controlling stdin buffer size? Arne Lie
2010-10-12 14:31 ` walter harms
2010-10-12 14:36 ` Arne Lie
2010-10-12 15:18 ` James Carlson [this message]
2010-10-13  6:48 ` Arne Lie
2010-10-13 12:08 ` James Carlson
2010-10-13 12:19 ` Arne Lie

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=4CB47C49.2090401@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