[Top] [All Lists]

PPP over socket?

To: linux-kernel@xxxxxxxxxxxxxxx, linux-net@xxxxxxxxxxxxxxx, netdev@xxxxxxxxxxx
Subject: PPP over socket?
From: fabrizio.gennari@xxxxxxxxxxx
Date: Fri, 11 Jan 2002 10:13:57 +0100
Sender: owner-netdev@xxxxxxxxxxx

I was wondering whether the socket architecture could be modified in order to support PPP connections over a generic socket (of type SOCK_DGRAM or SOCK_SEQPACKET), by mapping each PPP packet to a socket packet. This idea is not completely new: somebody raised is in the past, see for example or .

The PPPoE sockets are an example of sockets which can be turned into PPP channels (in fact, they were thought to be used as PPP channels!), but they work even without PPP. Probably some features of it can be applied to the generic socket architecture.

1) add in the struct sock a flag, called for example bound_to_ppp
2) support in sock_ioctl the PPPIOCGCHAN ioctl: this would register a PPP channel in the PPP driver, set bound_to_ppp and return the channel index (in fact, in PPPoX/PPPoE only the two latter actions are done in PPPIOCGCHAN)
3) support an analogous ioctl for unbinding
3) add among the family-specific functions a PPP xmit function for the PPP channel, which passes the skb coming from PPP to the family-specific sendmsg
4) modify sock_queue_rcv_skb so, if bound_to_ppp is set, the packets are sent to ppp_input instead of being put in the receive queue
5) when the socket is disconnected, and bound_to_ppp is set, the channel should be unregistered and the relevant PPP interface brought down.

Although it requires changes to socket architecture, this is probably feasible, and would simplify development of PPP support over different physical layers.

Fabrizio Gennari
Philips Research Monza
via G.Casati 23, 20052 Monza (MI), Italy
tel. +39 039 2037816, fax +39 039 2037800
<Prev in Thread] Current Thread [Next in Thread>