From: James Cameron <james.cameron@hp.com>
To: linux-ppp@vger.kernel.org
Subject: Re: about generic_establish_ppp()
Date: Tue, 06 May 2008 06:50:44 +0000 [thread overview]
Message-ID: <20080506065044.GT5141@hp.com> (raw)
In-Reply-To: <200805061149289843689@foxmail.com>
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/
next prev parent reply other threads:[~2008-05-06 6:50 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 [this message]
2008-05-06 7:25 ` cyx_mail
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=20080506065044.GT5141@hp.com \
--to=james.cameron@hp.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).