Using pppd as a library
Hello,
I have system requirement in which I need to invoke pppd from a user application. This user application needs to do configuration, get status etc of the PPP links.
Well there are various ways of doing it, I am exploring the option of including pppd as a library in my build. With this,
-I can spawn my application as a thread.
-I can avoid use of fork and exec operations for executing pppd for different links.
Can somebody help me with this. Is there any pppd library already available?
Thanks and regards
Neha Chatrath
Disclaimer :
This email communication may contain privileged and confidential information and is intended for the use of the addressee only.If you are not an intended recipient you are requested not to reproduce,copy disseminate or in any manner distribute this email communication as the same is strictly prohibited. If you have received this email in error, Please notify the sender immediately by return e-mail and delete the communication sent in error.Email communications cannot be guaranteed to be secure & error free and INDIABULLS is not liable for any errors in the email communication or for the proper, timely and complete transmission thereof.
Quoted 10 lines · neha chatrath
Hello,
I have system requirement in which I need to invoke pppd from a user application. This user application needs to do configuration, get status etc of the PPP links.
Well there are various ways of doing it, I am exploring the option of including pppd as a library in my build. With this,(quoted diff) +0
-2-I can spawn my application as a thread. -I can avoid use of fork and exec operations for executing pppd for differentlinks.
Why do you want to avoid such useful constructs? I suggest you google for "make a rod for your own back".
Quoted 4 lines
Can somebody help me with this. Is there any pppd library already available?
Thanks and regards
Neha Chatrath
Really, the following is true?
Quoted 3 lines
Disclaimer : This email communication may contain privileged and confidential information and is intended for the use of the addressee only.
Total bullcrap...
Quoted 18 lines
If you are not an intended recipient you are
requested not to reproduce,copy
disseminate or in any manner distribute this email communication as the same is strictly prohibited. If
you have received this email in error, Please notify the sender immediately by return e-mail and delete
the communication sent in error.Email communications cannot be guaranteed to be secure & error free
and INDIABULLS is not liable for any errors in the email communication or for the proper, timely and
complete transmission thereof.--
To unsubscribe from this list: send the line "unsubscribe linux-ppp" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
On Tue, 14 Aug 2012, Charlie Brady wrote:
It is legal crap some companies require, not realising that using it like this makes it worthless as a legal bulwark. Anyone they try to prosecute need only point out that this disclaimer is used on material for which the disclaimer is clearly nonsense, and thus that the company does not take it seriously itself, so why should the court.
Quoted 20 lines
Really, the following is true?
Quoted 3 lines
Disclaimer : This email communication may contain privileged and confidential information and is intended for the use of the addressee only.
Total bullcrap...
Quoted 11 lines
If you are not an intended recipient you are
requested not to reproduce,copy
disseminate or in any manner distribute this email communication as the same is strictly prohibited. If
you have received this email in error, Please notify the sender immediately by return e-mail and delete
the communication sent in error.Email communications cannot be guaranteed to be secure & error free
and INDIABULLS is not liable for any errors in the email communication or for the proper, timely and
complete transmission thereof.
Quoted 8 lines · neha chatrath
I have system requirement in which I need to invoke pppd from a user application. This user application needs to do configuration, get status etc of the PPP links.
Well there are various ways of doing it, I am exploring the option of including pppd as a library in my build. With this,(quoted diff) +0
-2-I can spawn my application as a thread. -I can avoid use of fork and exec operations for executing pppd fordifferent links.
You'll need to somehow deal with the event loop that handles both timers and control path I/O. And you may also have to deal with blocking operations, such as name service look-ups that occur during configuration parsing, that the rest of your application may not be expecting in a library.
It sounds like a non-trivial thing to get right, at least to me. (Of course, it's probably possible to do it wrong with less effort. ;-})
Note also that the current code assumes that it's running in a single process per PPP link. It's littered with statics and other things that would need to be cleaned up if you were to make it useful for multiple links in a single process.
I wouldn't do it this way. Instead, I would use some IPC mechanism to get at the data necessary. Then it's just a matter of figuring out how to get the IPC into the existing event loop (or go multi-threaded if you dare). Suitable IPCs (UDP sockets, named pipes, Solaris Doors) will vary depending on OS, and suitable protocols to use over the IPC will also vary depending on the application. In some cases, it may make sense to build an SNMP agent into the pppd code.
If fork+exec is expensive in your neighborhood (it certainly shouldn't be, but I don't live where you do), then I think you have a long row to hoe.
Quoted 2 lines
Can somebody help me with this. Is there any pppd library already available?
To my knowledge, it's never been done. When I was with a start-up many years ago, I did modify the code so that it could handle multiple links at once, because we scaled to many thousands of links, but I still did the control and monitoring through an IPC. (No, I don't have that code ... it went with the start-up. :-<)
Signature · 1 line
James Carlson 42.703N 71.076W <[email protected]>
Hi James,
Quoted 8 lines
Quoted 2 lines
Can somebody help me with this. Is there any pppd library already available?
To my knowledge, it's never been done. When I was with a start-up many years ago, I did modify the code so that it could handle multiple links at once, because we scaled to many thousands of links, but I still did the control and monitoring through an IPC. (No, I don't have that code ... it went with the start-up. :-<)
we have written PPP from scratch for the oFono project for exactly the same reason. We needed something in form of a library and not a daemon.
http://git.kernel.org/?p=network/ofono/ofono.git
Look under gatchat directory.
Especially when it comes to intermixing of 3GPP 27.007 and 27.010 with PPP for online mode, the current pppd causes too much overhead. It is not only that you have to spawn the pppd process and its extra plugin for handling feedback. You also need to have a TTY or PTY to use it. And that was causing overhead that was not acceptable to us.
Regards
Marcel
Am 15.08.2012 08:20, schrieb Marcel Holtmann:
Quoted 16 lines
Hi James,
Quoted 8 lines
Quoted 2 lines
Can somebody help me with this. Is there any pppd library already available?
To my knowledge, it's never been done. When I was with a start-up many years ago, I did modify the code so that it could handle multiple links at once, because we scaled to many thousands of links, but I still did the control and monitoring through an IPC. (No, I don't have that code ... it went with the start-up. :-<)
we have written PPP from scratch for the oFono project for exactly the same reason. We needed something in form of a library and not a daemon.
Quoted 8 lines
Look under gatchat directory.
Especially when it comes to intermixing of 3GPP 27.007 and 27.010 with PPP for online mode, the current pppd causes too much overhead. It is not only that you have to spawn the pppd process and its extra plugin for handling feedback. You also need to have a TTY or PTY to use it. And that was causing overhead that was not acceptable to us.
hi,
The question is do they need ppp at all ? I certainly has advantages to use tcp/ip but it is no requirement is several cases. Going with a more simple protocol can reduce the overhead considerable.
re,
wh
Quoted 3 lines · walter harms
The question is do they need ppp at all ? I certainly has advantages to use tcp/ip but it is no requirement is several cases. Going with a more simple protocol can reduce the overhead considerable.
Please explain. What "more simple protocol" are you suggesting? SLIP, perhaps?
I expect that the original poster's design constraints include having an interoperable implementation -- that is, being able to talk to peer machines built by other vendors. Whether the overhead is "considerable" or not doesn't seem to factor into the choice.
Signature · 1 line
James Carlson 42.703N 71.076W <[email protected]>