Re: about generic_establish_ppp()

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

 



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
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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