Re: Way how frames are read in pppd
James Carlson <carlsonj <at> workingcode.com>
2006-10-30 13:56:16 GMT
Christian writes:
> OK, maybe i do not understand everything correctly, let me in short
> explain what i have:
>
> I have a device which gives me a function to transmit data in a hdlc
> frame, so i can just call some function like:
>
> tx_frame(char *p, int l);
OK. Is that in the kernel or outside of the kernel?
If it's in the kernel, then it sounds like that should be used to
construct a device driver that works as a synchronous serial
interface. Pppd can then open the driver and work normally -- no pty
needed. (This -- writing a device driver -- isn't a really PPP
issue.)
If it's in user space, then I believe you'll need to re-encode the
data using AHDLC so that you can pass it over a pty.
> then i tried to use pppd with stdin/stdout, but this obviously did not
> work, because there is no boundaries in stdin/stdout so it will fail
> when data packets increase in size or in speed, also i needed to enable
> the sync option which made it work for a few small slowly coming packets.
>
> I assume sync=no hdlc,
"Sync" means that the device driver is assumed to perform basic
HDLC-like framing. This means that when pppd writes a single frame,
it'll be transmitted raw (no prepended octets, such as HDLC address or
(Continue reading)