Discussion:
Need help regarding PPP client on Linux.
(too old to reply)
p***@gmail.com
2006-09-13 09:59:42 UTC
Permalink
We are working on development of a Virtual serial port driver over
ethernet on Linux. We need to support PPP data transfer over this
serial port.

It will be of great help, if you could kindly throw
some light on the following,

1. What are the basic support required within our
serial port driver for a PPP packet to get routed
through it

2. What ioctls need to be supported in order for our
driver to handle PPP connections

Regards,
Pavan
James Carlson
2006-09-13 10:59:48 UTC
Permalink
This post might be inappropriate. Click to display it.
Unruh
2006-09-13 16:51:15 UTC
Permalink
Post by p***@gmail.com
We are working on development of a Virtual serial port driver over
ethernet on Linux. We need to support PPP data transfer over this
serial port.
???? Why? This on the face of it sounds completely insane.
Post by p***@gmail.com
It will be of great help, if you could kindly throw
some light on the following,
1. What are the basic support required within our
serial port driver for a PPP packet to get routed
through it
That signals be transmitted both outgoing and ingoing. And that distinct
signals sent out, are received as distinct signals at the other end. You
could impliment ppp over smoke signals if you wished.

Now, if you want to use an existing ppp implimentation, with an existing
serial port driver, then look at that implimentation and see what it
demands from the serial port driver.
Post by p***@gmail.com
2. What ioctls need to be supported in order for our
driver to handle PPP connections
None. Just write the ppp driver for the serial port
driver.
Post by p***@gmail.com
Regards,
Pavan
p***@gmail.com
2006-09-14 05:30:10 UTC
Permalink
One more problem.
During device open, pppd displays the following error
messges.

Sep 11 11:40:31 localhost pppd[3771]: Couldn't make tty exclusive:
Operation not permitted
Sep 11 11:40:31 localhost pppd[3771]: Couldn't attach to channel 0: No
such device or address

Can you please tell me what pppd is looking for?
Post by Unruh
Post by p***@gmail.com
We are working on development of a Virtual serial port driver over
ethernet on Linux. We need to support PPP data transfer over this
serial port.
???? Why? This on the face of it sounds completely insane.
Post by p***@gmail.com
It will be of great help, if you could kindly throw
some light on the following,
1. What are the basic support required within our
serial port driver for a PPP packet to get routed
through it
That signals be transmitted both outgoing and ingoing. And that distinct
signals sent out, are received as distinct signals at the other end. You
could impliment ppp over smoke signals if you wished.
Now, if you want to use an existing ppp implimentation, with an existing
serial port driver, then look at that implimentation and see what it
demands from the serial port driver.
Post by p***@gmail.com
2. What ioctls need to be supported in order for our
driver to handle PPP connections
None. Just write the ppp driver for the serial port
driver.
Post by p***@gmail.com
Regards,
Pavan
James Carlson
2006-09-14 12:27:50 UTC
Permalink
Post by p***@gmail.com
One more problem.
During device open, pppd displays the following error
messges.
Operation not permitted
Sep 11 11:40:31 localhost pppd[3771]: Couldn't attach to channel 0: No
such device or address
Can you please tell me what pppd is looking for?
Do you have access to the pppd source? The messages are fairly easy
to find with grep.

/*
* Ensure that the tty device is in exclusive mode.
*/
if (ioctl(tty_fd, TIOCEXCL, 0) < 0) {
if ( ! ok_error ( errno ))
warn("Couldn't make tty exclusive: %m");
}
[...]
if (ioctl(fd, PPPIOCATTCHAN, &chindex) < 0) {
error("Couldn't attach to channel %d: %m", chindex);
goto err_close;
}

Getting these errors means that the kernel module you're using doesn't
behave like a normal tty.

TIOCEXCL is normally handled in drivers/char/tty_io.c, which is the
common set of interface functions used by all tty drivers.

PPPIOCATTCHAN is handled in drivers/net/ppp_generic.c. If that fails,
I think it means that the kernel you're using is malfunctioning in
some way. I don't see how that failure is possible -- I think it
should have failed on PPPIOCGCHAN first.

It sounds like the questions you need to have answered are related to
Linux kernel internals, and not specifically related to PPP itself.
You may have more success if you look for a group or support forum
related to the Linux kernel.
--
James Carlson, KISS Network <***@sun.com>
Sun Microsystems / 1 Network Drive 71.232W Vox +1 781 442 2084
MS UBUR02-212 / Burlington MA 01803-2757 42.496N Fax +1 781 442 1677
p***@gmail.com
2006-09-15 04:41:24 UTC
Permalink
Thanks James. What I understand from your points is that pppd is
calling ioctls TIOCEXCL defined in tty_io.c and PPPIOCATTCHAN
ppp_generic.c and they are failing.

I am sure that ppp_generic was inserted successfully. No idea why it
failed.

I strongly feel that TIOCEXCL should be defined in my serial port
driver module. Is that right?
So my next plan will be to support or define all the standard serial
port ioctls in my driver module.

Can I get the pppd source code please?

Thanks a lot.

Regards,
Pavan
Post by James Carlson
Post by p***@gmail.com
One more problem.
During device open, pppd displays the following error
messges.
Operation not permitted
Sep 11 11:40:31 localhost pppd[3771]: Couldn't attach to channel 0: No
such device or address
Can you please tell me what pppd is looking for?
Do you have access to the pppd source? The messages are fairly easy
to find with grep.
/*
* Ensure that the tty device is in exclusive mode.
*/
if (ioctl(tty_fd, TIOCEXCL, 0) < 0) {
if ( ! ok_error ( errno ))
warn("Couldn't make tty exclusive: %m");
}
[...]
if (ioctl(fd, PPPIOCATTCHAN, &chindex) < 0) {
error("Couldn't attach to channel %d: %m", chindex);
goto err_close;
}
Getting these errors means that the kernel module you're using doesn't
behave like a normal tty.
TIOCEXCL is normally handled in drivers/char/tty_io.c, which is the
common set of interface functions used by all tty drivers.
PPPIOCATTCHAN is handled in drivers/net/ppp_generic.c. If that fails,
I think it means that the kernel you're using is malfunctioning in
some way. I don't see how that failure is possible -- I think it
should have failed on PPPIOCGCHAN first.
It sounds like the questions you need to have answered are related to
Linux kernel internals, and not specifically related to PPP itself.
You may have more success if you look for a group or support forum
related to the Linux kernel.
--
Sun Microsystems / 1 Network Drive 71.232W Vox +1 781 442 2084
MS UBUR02-212 / Burlington MA 01803-2757 42.496N Fax +1 781 442 1677
Unruh
2006-09-15 18:28:09 UTC
Permalink
Post by p***@gmail.com
Thanks James. What I understand from your points is that pppd is
calling ioctls TIOCEXCL defined in tty_io.c and PPPIOCATTCHAN
ppp_generic.c and they are failing.
I am sure that ppp_generic was inserted successfully. No idea why it
failed.
I strongly feel that TIOCEXCL should be defined in my serial port
driver module. Is that right?
What are you trying to do? If you want to support the standard Linux pppd,
then yes, you should make your module as similar to the Linux serial port
driver as you can. On the other hand, I still have no idea what you are
trying to do. There exist pppoe ( ppp over ethernet) modules/drivers for
linux already and included in the linux distros. Why would you want a
serial port over ethernet driver in the first place? Ethernet already
supports all of the transport that ppp via the serial port driver over
ethernet would support.
Post by p***@gmail.com
So my next plan will be to support or define all the standard serial
port ioctls in my driver module.
Can I get the pppd source code please?
Sure. It is part of any Linux distribution, or get it from
ftp.samba.org/pub/ppp
Post by p***@gmail.com
Thanks a lot.
Regards,
Pavan
Post by James Carlson
Post by p***@gmail.com
One more problem.
During device open, pppd displays the following error
messges.
Operation not permitted
Sep 11 11:40:31 localhost pppd[3771]: Couldn't attach to channel 0: No
such device or address
Can you please tell me what pppd is looking for?
Do you have access to the pppd source? The messages are fairly easy
to find with grep.
/*
* Ensure that the tty device is in exclusive mode.
*/
if (ioctl(tty_fd, TIOCEXCL, 0) < 0) {
if ( ! ok_error ( errno ))
warn("Couldn't make tty exclusive: %m");
}
[...]
if (ioctl(fd, PPPIOCATTCHAN, &chindex) < 0) {
error("Couldn't attach to channel %d: %m", chindex);
goto err_close;
}
Getting these errors means that the kernel module you're using doesn't
behave like a normal tty.
TIOCEXCL is normally handled in drivers/char/tty_io.c, which is the
common set of interface functions used by all tty drivers.
PPPIOCATTCHAN is handled in drivers/net/ppp_generic.c. If that fails,
I think it means that the kernel you're using is malfunctioning in
some way. I don't see how that failure is possible -- I think it
should have failed on PPPIOCGCHAN first.
It sounds like the questions you need to have answered are related to
Linux kernel internals, and not specifically related to PPP itself.
You may have more success if you look for a group or support forum
related to the Linux kernel.
--
Sun Microsystems / 1 Network Drive 71.232W Vox +1 781 442 2084
MS UBUR02-212 / Burlington MA 01803-2757 42.496N Fax +1 781 442 1677
Loading...