EXIT STATUS

The exit status of pppd is set to indicate whether any error was detected, or the reason for the link being terminated. The values used are:
0	Pppd has detached, or otherwise the connection was successfully
	established and terminated at the peer's request.

1	An immediately fatal error of some kind occurred, such as an
	essential system call failing, or running out of virtual memory.

2	An error was detected in processing the options given, such as two
	mutually exclusive options being used.

3	Pppd is not setuid-root and the invoking user is not root.

4	The kernel does not support PPP, for example, the PPP kernel driver
	is not included or cannot be loaded.

5	Pppd terminated because it was sent a SIGINT, SIGTERM or SIGHUP
	signal.

6	The serial port could not be locked.

7	The serial port could not be opened.

8	The connect script failed (returned a non-zero exit status).

9	The command specified as the argument to the pty option could not
	be run.

10	The PPP negotiation failed, that is, it didn't reach the point where
	at least one network protocol (e.g. IP) was running.

11	The peer system failed (or refused) to authenticate itself.

12	The link was established successfully and terminated because it was
	idle.

13	The link was established successfully and terminated because the
	connect time limit was reached.

14	Callback was negotiated and an incoming call should arrive shortly.

15	The link was terminated because the peer is not responding to echo
	requests.

16	The link was terminated by the modem hanging up.

17	The  PPP negotiation failed because serial loopback was detected.

18	The init script failed (returned a non-zero exit status).

19	We failed to authenticate ourselves to the peer.
SCRIPTS

     Pppd invokes scripts at various stages in its processing which can be used to perform site-specific ancillary processing. These scripts are usually shell scripts, but could be executable code files instead. Pppd does not wait for the scripts to finish. The scripts are executed as root (with the real and effective user-id set to 0), so that they can do things such as update routing tables or run privileged daemons. Be careful that the contents of these scripts do not compromise your system's security. Pppd runs the scripts with standard input, output and error redirected to /dev/null, and with an environment that is empty except for some environment variables that give information about the link. The environment variables that pppd sets are:
DEVICE
	The name of the serial tty device being used.

IFNAME
	The name of the network interface being used.

IPLOCAL
	The IP address for the local end of the link. This is only set when
	IPCP has come up.

IPREMOTE
	The IP address for the remote end of the link.
	This is only set when IPCP has come up.

PEERNAME
	The authenticated name of the peer. This is only
	set if the peer authenticates itself.

SPEED
	The baud rate of the tty device.

ORIG_UID
	The real user-id of the user who invoked pppd.

PPPLOGNAME
	The username of the real user-id that invoked pppd.
	This is always set.

For the ip-down and auth-down scripts, pppd also sets  the following
variables giving statistics for the connection:

CONNECT_TIME
	The number of seconds from when the PPP negotiation
	started until the connection was terminated.

BYTES_SENT
	The number of bytes sent (at the level of the serial port)
	during the connection.

BYTES_RCVD
	The number of bytes received (at the level of the
	serial port) during the connection.

LINKNAME
	The logical name of the link, set with the linkname option.


Pppd  invokes the following scripts, if they exist.  It is
not an error if they don't exist.


/etc/ppp/auth-up
	A program or script which is executed after the remote system
	successfully authenticates itself. It is executed with the
	parameters:

	interface-name
	peer-name
	user-name
	tty-device
	speed

Note that this script is not executed if the peer doesn't authenticate
itself, for example when the noauth option is used.

/etc/ppp/auth-down
	A program or script which is executed when the link goes down, if
	/etc/ppp/auth-up was previously  executed. It is executed in the
	same manner with the same parameters as /etc/ppp/auth-up.

/etc/ppp/ip-up
	A program or script which is executed when the link is available for
	sending and receiving IP packets (that is, IPCP has come up). It is
	executed with the parameters

	interface-name
	tty-device
	speed
	local-IP-address
	remote-IP-address
	ipparam

/etc/ppp/ip-down
	A program or script which is executed when the link is no longer
	available for sending and receiving IP packets. This script can be
	used for undoing the effects of the /etc/ppp/ip-up script. It is
	invoked in the same manner and with the same parameters as the ip-up
	script.

/etc/ppp/ipv6-up
	Like /etc/ppp/ip-up, except that it is executed when the link is
	available for sending and  receiving IPv6 packets. It is executed
	with the parameters

	interface-name
	tty-device
	speed
	local-link-local-address
	remote-link-local-address
	ipparam

/etc/ppp/ipv6-down
	Similar to /etc/ppp/ip-down, but it is executed when IPv6 packets
	can no longer be transmitted on the link. It is executed with the
	same parameters as the ipv6-up script.

/etc/ppp/ipx-up
	A program or script which is executed when the link is available for
	sending and receiving IPX packets (that is, IPXCP has come up). It is
	executed with the parameters

	interface-name tty-device speed network-number
	local-IPX-node-address remote-IPX-node-address
	local-IPX-routing-protocol remote-IPX-routing-protocol
	local-IPX-router-name remote-IPX-router-name
	ipparam pppd-pid

	The local-IPX-routing-protocol and remote-IPX-routing-protocol field
	may be one of the following:

	NONE      to indicate that there is no routing protocol
	RIP       to indicate that RIP/SAP should be used
	NLSP      to indicate  that Novell NLSP should be used
	RIP NLSP  to indicate that both RIP/SAP and NLSP should be used

/etc/ppp/ipx-down
	A program or script which is executed when the link is no longer
	available for sending and receiving IPX packets. This script can
	be used for undoing the effects of the /etc/ppp/ipx-up script. It
	is invoked in the same manner and with the same parameters as the
	ipx-up script.
FILES

/var/run/pppn.pid
	Process-ID for pppd process on ppp interface unit n.

/var/run/ppp-name.pid
	Process-ID for pppd process for logical link name.

/etc/ppp/pap-secrets
	Usernames, passwords and IP addresses for PAP authentication. This
	file should be owned by root and not readable or writable by any
	other user. Pppd will log a warning if this is not the case.

/etc/ppp/chap-secrets
	Names, secrets and IP addresses for CHAP authentication. As for
	/etc/ppp/pap-secrets, this file should be owned by root and not
	readable or writable by any other user. Pppd will log a warning
	if this is not the case.

/etc/ppp/options
	System default options for pppd, read before user default options
	or command-line options.

~/.ppprc
	User default options, read before /etc/ppp/options.ttyname.

/etc/ppp/options.ttyname
	System default options for the serial port being used, read after
	~/.ppprc. Informing the ttyname part of this filename, an initial
	/dev/ is stripped from the port name (if present), and any slashes
	in the remaining part are converted to dots.

/etc/ppp/peers
	A directory containing options files which may contain privileged
	options, even if pppd was invoked by a user other than root. The
	system administrator can create options files in this directory to
	permit non-privileged users to dial out without requiring the peer
	to authenticate.
NOTES

The following signals have the specified effect when sent to pppd.

SIGINT, SIGTERM
	These signals cause pppd to terminate the link (by closing LCP),
	restore the serial device settings, and exit.

SIGHUP
	This signal causes pppd to terminate the link, restore the serial
	device settings, and close the serial device. If the persist or
	demand option has been specified, pppd will try to reopen the serial
	device and start another connection (after the holdoff period).
	Otherwise pppd will exit. If this signal is received during the
	holdoff period, it causes pppd to end the holdoff period immediately.

SIGUSR1
	This signal toggles the state of the debug option.

SIGUSR2
	This signal causes pppd to renegotiate compression. This can be
	useful to re-enable compression after it has been disabled as a
	result of a fatal decompression error. (Fatal decompression errors
	generally indicate a bug in one or other implementation.)