Walter, thanks, this could be the trick yes, we will have a look at that one! /Arne > -----Original Message----- > From: walter harms [mailto:wharms@xxxxxx] > 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) > > re, > wh > > > Arne Lie schrieb: > > Hi, > > > > We have a HW/SW set-up using Linux PPP over slow links, and have > recently abandoned a solution with a dedicated kernel module driver for > our specific hardware, and are now trying a pure user-mode solution > using the pty option in pppd. Most if its performance is quite OK, but > we see that we do not have complete control of the buffering along the > packet signal path. From the PPPD MAN page it says that pty script > starts a pseudo-tty instance, and that our script shall read data from > it as it was from stdin using read(0,...). THIS WORKS. HOWEVER, since > our link is slow we have implemented flow control, and in periods we do > not read from stdio. In that period data builds up in stdio, but we see > no sigh of data being dropped in the ppp0 interface queue (which is set > to 3 packets as is the default value). > > > > Question: It seems that the stdin interface has a large buffer, much > larger than we appreciate. Is there any way we can configure its size, > making it smaller? > > > > Best regards, > > > > > > Arne Lie > > SINTEF ICT, Dept. of Communication Systems > > NO-7465 Trondheim, NORWAY > > Dir. phone +47 73 59 27 03 - mobile +47 450 20 040 > > e-mail: arne.lie@xxxxxxxxx > > > > > NïïïïïrïïyïïïbïXïïÇvï^ï)Þ{.nï+ïïïï{ïïïbïï^nïrïïzïïïhïïïï&ïïïGïïïhï(ï > éïÝj"ïïïmïïïïïzïÞïïïfïïïhïïï~ïmml== ÿô.nÇ·®+%˱é¥wÿº{.nÇ·¥{±þiþ)íèjg¬±¨¶Ýjÿ¾«þG«é¸¢·¦j:+v¨wèm¶ÿþø®w¥þ࣢·hâÿÙ