Re: Re: about generic_establish_ppp()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxx 
抄送: linux-ppp 
主题: Re: about generic_establish_ppp() 
 
On Tue, May 06, 2008 at 11:49:29AM +0800, cyx_mail@xxxxxxxxxxx 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@xxxxxxxxxxxxxxx
__________ NOD32 3072 (20080503) Information __________
This message was checked by NOD32 antivirus system.
http://www.nod32cn.com
?韬{.n?????%??檩??w?{.n???{炳???骅w*jg????????G??⒏⒎?:+v????????????"??????

[Index of Archives]     [Linux Audio Users]     [Linux for Hams]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Fedora Users]

  Powered by Linux