From: "cyx_mail@foxmail.com" <cyx_mail@foxmail.com>
To: linux-ppp@vger.kernel.org
Subject: Re: Re: about generic_establish_ppp()
Date: Tue, 06 May 2008 07:25:23 +0000 [thread overview]
Message-ID: <200805061524533280202@foxmail.com> (raw)
In-Reply-To: <200805061149289843689@foxmail.com>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="windows-1254", Size: 1703 bytes --]
in link_required():
devfd = the_channel->connect();
fd_ppp = the_channel->establish_ppp(devfd);
if uses rp-pppoe plugin , I think devfd is the socket fd not the descriptor for "/dev/ppp0"
How to explain this?
2008-05-06
·¢¼þÈË£º James Cameron
·¢ËÍʱ¼ä£º 2008-05-06 14:51:16
ÊÕ¼þÈË£º cyx_mail@foxmail.com
³ËÍ£º linux-ppp
Ö÷Ì⣺ Re: about generic_establish_ppp()
On Tue, May 06, 2008 at 11:49:29AM +0800, cyx_mail@foxmail.com wrote:
> in generic_establish_ppp():
> ioctl(fd, PPPIOCATTCHAN, &chindex)
> 1.fd, is the parameter fd a channel's file descriptor or the file
> descriptor for "/dev/ppp0"?
In the PPPIOCATTCHAN, it is the fd opened from /dev/ppp, but in the
PPPIOCGCHAN just prior it is the fd of the tty. The same variable is
re-used.
> 2.chindex, is this a output parameter or input parameter? what is meaning?
At that time, input. In the previous ioctl, it is output. This is
obvious because of the error messages in each return status check, and
because it is used uninitialised first.
You would need to read the kernel source to be certain.
Read the Documentation/networking/ppp_generic.txt file. Focus on the
definition of channels.
Then read the ppp_generic.c source, concentrating on the PPPIOCGCHAN and
PPPIOCATTCHAN matches.
--
James Cameron
http://ftp.hp.com.au/sigs/jc/
--
To unsubscribe from this list: send the line "unsubscribe linux-ppp" in
the body of a message to majordomo@vger.kernel.org
__________ NOD32 3072 (20080503) Information __________
This message was checked by NOD32 antivirus system.
http://www.nod32cn.com
ÿôèº{.nÇ+·®+%Ëÿ±éݶ\x17¥wÿº{.nÇ+·¥{±þiþ)í
æèw*\x1fjg¬±¨\x1e¶Ý¢jÿ¾\a«þG«éÿ¢¸\f¢·¦j:+v¨wèjØm¶ÿþø\x1e¯ù\x1e®w¥þàþf£¢·hâúÿÙ¥
prev parent reply other threads:[~2008-05-06 7:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-06 3:49 about generic_establish_ppp() cyx_mail
2008-05-06 6:50 ` James Cameron
2008-05-06 7:25 ` cyx_mail [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200805061524533280202@foxmail.com \
--to=cyx_mail@foxmail.com \
--cc=linux-ppp@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.