Skip to contentSkip to conversation

question for ip packet

DISCUSSION 梁红军 2 participants 2 messages Apr 24, 2008 PPP protocol drivers and compressors

lore
Share & tools
lore

梁红军

author
#0 lore raw

linux-ppp£¬ÄúºÃ£¡
the following is the description about ppp in the Readme of linux PPPD:
the kernel module assembles/disassembles PPP frames, handles error
detection, and forwards packets between the serial port and either the
kernel network code or the user-level program pppd. IP packets go
directly to the kernel network code. So once pppd has negotiated the
link, it in practice lies completely dormant until you want to take
the link down, when it negotiates a graceful disconnect.
question:
1.after pppd has negotiated the link ,what it tell information to the kernel network ppp code ,
which make kernel transmit IP packets directly?
2. where to receive the IP packets from ppp kernel ? how to know the ip packet come from not other
device but PPP?

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡ÖÂ
Àñ£¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡Áººì¾ü
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡[email protected]
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡2008-04-24 ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ¥Šwÿº{.nÇ+‰·¥Š{±şšiş)í…æèw*jg¬±¨¶‰š�Šİ¢jÿ¾«şG«�éÿ¢¸ ¢·¦j:+v‰¨ŠwèjØm¶Ÿÿşø¯ù®w¥şŠàşf£¢·hš�â�úÿ†Ù¥

#1 lore raw
Quoted 3 lines · ??????

1. after pppd has negotiated the link, what it tell information to the kernel network ppp code, which make kernel transmit IP packets directly?

Briefly, in function tty_establish_ppp() in sys-linux.c, an ioctl(2) syscall sets the TTY into PPP discipline (N_PPP). Once the interface is up, the kernel transmits network packets through the PPP link.

Quoted 2 lines

2. where to receive the IP packets from ppp kernel? how to know the ip packet come from not other device but PPP?

I don't understand. It is very clear the packets are from the PPP link because they can be captured from the new network interface.

Signature · 3 lines
James Cameron                         http://quozl.netrek.org/
HP Open Source, Volunteer             http://opensource.hp.com/
PPTP Client Project, Release Engineer http://pptpclient.sourceforge.net/