Appendix A – Included Application
Returns '1' if it reads "ON", otherwise returns '0'.
$num_of_checks is the number of attempts to read the file
'/tmp/pppstat.log'.
function ppp_start()
{
...
}
Called from ppp_online().
Sends SIGUSR1 (10) to the currently running ppp-wrapper.
If the wrapper isn't running the function returns '-1' and an error is
logged in the syslog.
function ppp_stop()
{
...
}
Called from ppp_offline(). Sends SIGUSR2 (12) to the currently
running ppp-wrapper.
If the wrapper isn't running the function returns '-1'and an error is
logged in the syslog.
function ppp_online($behavior, $max_attempt,
$ppp_interval)
{
...
}
Initialize ppp connection.
Returns '1' if connection is established, '-1' on error and logs the error
in the syslog.
$behavior describes the type of behavior of the ppp connection (used
when closing the connection) and be either "CloseAfter" or
"Optimized".
$max_attempt is the number of attempts to connect before failing.
$ppp_interval is the delay in seconds between connection attempts.
Axis Communications AB does not provide support for application development of any kind. The
information here is provided "as is", and there is no guarantee that any of the examples shown
will work in your particular application.
Revision 0.91 June 2001
29
Need help?
Do you have a question about the 2400 - PHP3 GUIDE and is the answer not in the manual?
Questions and answers