Modem driver for pppd.

Matthew J Fletcher mfletcher at serck-controls.co.uk
Thu Mar 22 09:07:19 UTC 2001


Hi,.

> MJF> You could write a driver our you could use the one that i
> have written, i
> MJF> posted the
> MJF> sources to this mailist a few weeks ago, if you search the
> archives for PPPD
> MJF> you should find it, or i can send it again.

> Your modem driver contains a lot of code independent from the hardware.
> This code exists in the pppd/ and modem/.
> I have written a driver, which works with my hardware, and
> I need to know how it must interact with this independent code:

The pppd driver is mostly hardware independent, most of it deals with the
diffrent
protocals that are used within ppp, chap, pap, mschap etc, and the various
compression
agents that can be applied jan vackobson etc,. i fixed up all this stuff and
wrote a
proper control function pppmain (IIRC), that you just need to call.

as you know ppp is not tied to any particular hardware, i think that and
hardware stuff should be seperated out into another driver, such as the
termio for dev/tty etc, or dev/winmodem or dev/strange_embedded_modem etc.

> >1. What must driver do, when interrupt of received data from my
> port occures?
> >   Must it call 'pppinput' function for characters from this data?

yes.

> >2. What must driver do then it's 'read' function calls?
> >3. What must driver do then it's 'write' function calls?
> >   Must it simple send data to my port?

my pppd code used the termio stuff in rtems to read or write a char to
tty0/1/2
depending on how you set it up. If you had a modem attached to that port it
should
works as expected as the AT command set seems to be supported.

> >4. What must be done in it's 'ioctl' function?

these are just used to turn echo / blocking / non-blocking etc modes on off.

-matthew


**********************************************************************
Serck Controls Ltd, Rowley Drive, Coventry, CV3 4FH, UK
Tel: 44 (0) 24 7630 5050   Fax: 44 (0) 24 7630 2437
Web: www.serck-controls.co.uk  Admin: post at serck-controls.co.uk
**********************************************************************
This email and any files transmitted with it are confidential and 
intended solely for the use of the individual or entity to whom they 
are addressed. If you have received this email in error please notify 
the above.  Any views or opinions presented are solely those of the 
author and do not necessarily represent those of Serck Controls Ltd. 
Please note that Serck Controls Ltd is able to, and reserves the right 
to, monitor e-mail communications passing through its network. 
This email has been checked for viruses.  Serck Controls Ltd shall not 
be responsible for damage caused by any undetected virus. 
**********************************************************************
Serck Controls Ltd is a subsidiary of Roxspur PLC. Registered Office:
The Lodge, Worting Park, Worting, Basingstoke RG23 8PY  
Registered in England No. 2147362
**********************************************************************



More information about the users mailing list