This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Porting of PPP to the eCos operating system.


Porting of PPP to the eCos operating system.

The TCP/IP stack implemented under eCos is a port of the OpenBSD TCP/IP 
stack. It seems therefore to me that the PPP, which will require the least 
effort to port will be the OpenBSD PPP. This software consists of two 
parts:

- Kernel code, which establishes a network interface and passes
packets between the serial port, the kernel networking code and the
PPP daemon (pppd).

- The PPP daemon (pppd), which negotiates with the peer to establish
the link and sets up the ppp network interface.  Pppd includes support
for authentication, so you can control which other systems may make a
PPP connection and what IP addresses they may use.

Redhat has published a document, which describes how to integrate network 
drivers into eCos.Unfortunately this description does not fit very well to 
the OpenBSD PPP. The problem is that the OpenBSD PPP is implemented as a 
line discipline (UNIX concept) to a tty driver. It passes non IP incoming 
data to a process reading from the device, and accepts outgoing non IP data 
from a process writing to the device. The PPP interface passes incoming IP 
packets to the IP input queue, and accepts outgoing IP packets through the 
if_output function in the PPP ifnet structure. There are thus two 
directions for i/o through the PPP driver. One goes through the tty line 
discpline and the other goes through the net interface. TCP/IP code uses 
the net interface and the pppd daemon uses the tty line discipline.

The Redhat procedure for integrating network drivers into eCos does not 
seem to cope very well with this. It only allows the net interface.

Instead it seems to me a better idea to implement the PPP driver as a 
device driver for the devfs pseudo file system (/dev) in eCos. This driver 
will be a layered driver on top of some transport driver (a serial driver).

Drivers for the devfs pseudo file system does not support ioctl. It should 
not be very complicated to implement this support though. It can be done by 
means of the cyg_io_get_config and cyg_io_set_config functions. It requires 
that the support is implemented in the file io/fileio/current/src/devfs.cxx 
(now it only returns ENOSYS for ioctl calls).

The eCos port of OpenBSD TCP/IP stack implements software interrupts by 
means of eCos flags. The PPP port requires a NETISR_PPP software interrupt. 
This should be included in the network software interrupt handler 
cyg_netint in net/tcpip/current/src/eCos/support.c. An entry for NETISR_PPP 
should be included (it should call pppintr() in if_ppp.c).

I would very much like to have response to the above. Objections etc.



Erik Aagaard Knudsen
Phone direct:			+45 9652 0356
E-mail:			eak@penell.com
--------------------------------------------
Penell A/S - An RTX company
Plastvaenget 9
DK-9560 Hadsund
Denmark.
Phone: 			+45 9857 2666
Fax:			+45 9857 2664
E-mail:			penell@penell.com
--------------------------------------------



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]