C

Bundled PPP, SLIP, and CSLIP



C.1    Introduction


*      
NOTE: The bundled PPP, SLIP and CSLIP implementations described in this appendix are now deprecated for future use and will be removed from the next major release of Tornado. For more information on the discontinuance of these features, please contact your local Wind River account manager.

If you require a PPP solution, please ask your Wind River account manager about WindNet PPP. WindNet PPP is a reliable and manageable PPP solution built upon an extensible Remote Access Framework.


PPP Implementation Limitations

This PPP implementation is very limited. It works with a serial driver only, not with other such options as a modem or an Ethernet driver. It does not provide an API for modem support, and modem drivers are not provided for it. It is limited to sixteen connections. It also supports only standard CHAP, not the Microsoft CHAP extensions.

This implementation of PPP was originally intended for debugging purposes and to provide an additional means for downloading a boot image. This version of PPP should not be used for remote access applications.



C.2    Serial Driver Support

The VxWorks target can support IP communication with the host operating system over serial connections using the following protocols:

  • Serial Line IP (SLIP)
  • Compressed Serial Line IP (CSLIP)

SLIP and CSLIP (SLIP with compressed headers) provide a simple form of encapsulation for IP datagrams on serial lines. Using SLIP or CSLIP as a network interface driver is a straightforward way to use TCP/IP software with point-to-point configurations such as long-distance telephone lines or RS-232 serial connections between machines.

C.2.1   SLIP and CSLIP Configuration

Configuring your system for SLIP requires configuring both target and host systems. See your host system's manual for information on configuring your host.


*      
CAUTION: If you choose to use CSLIP, remember to make sure your host is also using CSLIP. If your host is configured for SLIP, the VxWorks target receives packets from the host, but the host cannot correctly decode the CSLIP packets from the target. Eventually TCP resends the packets as SLIP packets, at which time the host receives and acknowledge them. However, the whole process is slow. To avoid this, configure the host and target to use the same serial protocol.

To use SLIP with your VxWorks target, make the following configuration changes (for more information on configuring VxWorks, see the Tornado User's Guide: Projects):

  1. Reconfigure VxWorks to include SLIP support. The relevant configuration parameter is INCLUDE_SLIP.
  1. Specify the device to be used for the SLIP connection, the SLIP Channel Identifier. The relevant configuration parameter is SLIP_TTY. By default this is set to 1, which sets the serial device to /tyCo/1.
  1. Specify the baud rate or SLIP Channel Speed (optional). The relevant configuration parameter is SLIP_BAUDRATE. If this is not defined, SLIP uses the baud rate defined by your serial driver.
  1. Specify the SLIP Channel Capacity (optional). The relevant configuration parameter is SLIP_MTU. If you do not set this, the default value (576) will be used.
  1. You can force the use of CSLIP when communicating with the host by setting the Transmit Header Compression Flag. The relevant configuration parameter is CSLIP_ENABLE.
  1. Otherwise, you can allow the use of plain SLIP unless the VxWorks target receives a CSLIP packet (in which case the target also uses CSLIP) by setting the Receive Header Compression Flag. The relevant configuration parameter is CSLIP_ALLOW.


*      
CAUTION: If you want to use VxSim for Solaris with PPP as the backend, you must configure VxWorks without BSD 4.3 compatibility. (The relevant configuration parameter is BSD43_COMPATIBLE). Otherwise, you get an exception in the WDB task when the target server tries to connect to the WDB agent.



C.3    PPP, the Point-to-Point Protocol for Serial Line IP

PPP provides for the encapsulation of data in frames. It also supports the following protocols:

  • Link Control Protocol (LCP)
  • Internet Protocol Control Protocol (IPCP)
  • Password Authentication Protocol (PAP)
  • Challenge-Handshake Authentication Protocol (CHAP)

This implementation of PPP includes three main components:

  • A method for encapsulating multi-protocol datagrams.

  • A Link Control Protocol (LCP) for establishing, configuring, and testing the data-link connection.

  • A family of Network Control Protocols (NCPs) for establishing and configuring different network-layer protocols.

Reference Material on PPP

The following is a list of Requests for Comments (RFCs) associated with this unsupported PPP implementation:

RFC 1332: The PPP Internet Protocol Control Protocol (IPCP)

RFC 1334: PPP Authentication Protocols

RFC 1548: The Point-to-Point Protocol (PPP)

The USENET news group, comp.protocols.ppp, is dedicated to the discussion of PPP-related issues. Information presented in this forum is often of a general nature (such as equipment, setup, or troubleshooting), but technical details concerning specific PPP implementations are discussed as well.

C.3.1   PPP Configuration

Configuring your environment for PPP requires both host and target software installation and configuration. See your host's operating system manual for information on installing and configuring PPP on your host.1

To include the default PPP configuration, configure VxWorks with PPP support. The relevant configuration parameter is INCLUDE_PPP.


*      
CAUTION: A VxWorks image that includes PPP sometimes fails to load. This failure is due to the static maximum size of the VxWorks image allowed by the loader. This problem can be fixed by either reducing the size of the VxWorks image (by removing unneeded options), or by burning new boot ROMs. If you receive a warning from vxsize when building VxWorks, or if the size of your image becomes greater than that supported by the current setting of RAM_HIGH_ADRS, see Creating Bootable Applications in the Tornado User's Guide: Cross-Development for information on how to resolve the problem.

You can include the optional DES cryptographic package for use with the Password Authentication Protocol (PAP). The relevant configuration parameter is INCLUDE_PPP_CRYPT. It is not included in the standard Tornado Release; contact your WRS Sales Representative to inquire about the availability of this optional package.

The DES package allows user passwords to be stored in encrypted form on the VxWorks target. If the package is installed, then it is useful only when the VxWorks target is acting as a PAP server, that is, when VxWorks is authenticating the PPP peer. Its absence does not preclude the use of PAP. For detailed information about using the DES package with PAP, see Using PAP, p.307).

There are three methods of configuration:

  • At compile-time, by reconfiguring VxWorks as described in the Tornado User's Guide: Projects. Use this method with usrPPPInit( ). (See Initializing a PPP Link, p.304.)

  • At run-time, by setting options in a PPP options file. Use this method with either usrPPPInit( ) or pppInit( ). You can also use it to change the selection of PPP options previously configured by one of the other two configuration methods, although this assumes that the PPP options file is readable without using the PPP link (for example, an options file located on a target's local disk).

Each of these methods is described in a section that follows. For brief descriptions of the various PPP options, see C.3.4 PPP Option Descriptions, p.312.

Setting PPP Options when Configuring VxWorks

The various configuration options offered by this PPP implementation can be initialized at build-time by defining a number of configuration parameters.


*      
NOTE: See the Tornado User's Guide for information on how to set configuration parameters.

First, make sure the PPP_OPTIONS_STRUCT configuration parameter is set (it is set by default). Unless PPP_OPTIONS_STRUCT configuration parameter is set, these configuration options cannot be enabled.

Then, specify the default serial interface that will be used by usrPPPInit( ) by setting the PPP_TTY configuration parameter. Configuration options can be selected using configuration constants only when usrPPPInit( ) is invoked to initialize PPP. Specify the number of seconds usrPPPInit( ) will wait for a PPP link to be established between a target and peer by defining the PPP_CONNECT_DELAY configuration parameter. Table 1 lists the principal configuration parameters used with PPP.

Table 1 :   PPP Configuration Parameters   


Constant
Purpose

INCLUDE_PPP
Include PPP. 1
INCLUDE_PPP_CRYPT
Include DES cryptographic package.2
PPP_OPTIONS_STRUCT
Enable configuration parameters.
PPP_TTY
Define default serial interface.
PPP_CONNECT_DELAY
Define time-out delay for link establishment.

1:  If you want to use VxSim for Solaris with PPP as the backend, you must configure VxWorks with BSD 4.3 compatibility off. The relevant configuration parameter is BSD43_COMPATIBLE. Otherwise, you get an exception in the WDB task when the target server tries to connect to the WDB agent.

2:  This option is not included in the standard Tornado Release; contact your Wind River Sales Representative to inquire about the availability of this optional package.

The full list of configuration options available with PPP appears under C.3.4 PPP Option Descriptions, p.312. By default, all of these options are disabled.

Setting PPP_OPTIONS_STRUCT, PPP_TTY, and PPP_CONNECT_DELAY as well as any additional configuration parameters, constitutes a modification to the configuration. These changes do not actually take effect until after you have recompiled VxWorks and initialized PPP. To initialize PPP, call usrPPPInit( ). You can make this call manually from a target shell (see Initializing a PPP Link, p.304).

Setting PPP Options Using an Options Structure

PPP options may be set at run-time by filling in a PPP options structure and passing the structure location to the pppInit( ) routine. This routine is the standard entry point for initializing a PPP link (see Initializing a PPP Link, p.304).

The PPP options structure is typedefed to PPP_OPTIONS, and its definition is located in h/netinet/ppp/options.h, which is included through h/pppLib.h.

The first field of the structure is an integer, flags, which is a bit field that holds the ORed value of the OPT_option macros displayed under C.3.4 PPP Option Descriptions, p.312. Definitions for OPT_option are located in h/netinet/ppp/options.h. The remaining structure fields in column 2 are character pointers to the various PPP options specified by a string.

The following code fragment is one way to set configuration options using the PPP options structure. It initializes a PPP interface that uses the target's second serial port (/tyCo/1). The local IP address is 90.0.0.1; the IP address of the remote peer is 90.0.0.10. The baud rate is the default rate for the tty device. The VJ compression and authentication options have been disabled, and LCP (Link Control Protocol) echo requests have been enabled.

PPP_OPTIONS pppOpt;   /* PPP configuration options */ 

void routine ()
{
pppOpt.flags = OPT_PASSIVE_MODE | OPT_NO_PAP | OPT_NO_CHAP |
OPT_NO_VJ;
pppOpt.lcp_echo_interval = "30";
pppOpt.lcp_echo_failure = "10";

pppInit (0, "/tyCo/1", "90.0.0.1", "90.0.0.10", 0, &pppOpt, NULL);
}

Setting PPP Options Using an Options File

PPP options are most conveniently set using an options file. There is one restriction: the options file must be readable by the target without there being an active PPP link. Therefore the target must either have a local disk or RAM disk or an additional network connection. For more information about using file systems, see VxWorks Programmer's Guide: Local File Systems.

This configuration method can be used with either usrPPPInit( ) or pppInit( ). It also can be used to modify the selection of PPP options previously configured using configuration parameters or the option structure PPP_OPTION.

When using usrPPPInit( ) to initialize PPP, define the configuration parameter PPP_OPTIONS_FILE to be the absolute pathname of the options file (NULL by default). When using pppInit( ), pass in a character string that specifies the absolute pathname of the options file.

The options file format is one option per line; comment lines begin with #. For a description of option syntax, see the manual entry for pppInit( ).

The following code fragment generates the same results as the code example in C.3.4 PPP Option Descriptions, p.312. The difference is that the configuration options are obtained from a file rather than a structure.

pppFile = "mars:/tmp/ppp_options"; /* PPP config. options file */ 

void routine ()
{
pppInit (0, "/tyCo/1", "90.0.0.1", "90.0.0.10", 0, NULL, pppFile);
}

In this example, mars:/tmp/ppp_options is a file that contains the following:

passive 
no_pap
no_chap
no_vj
lcp_echo_interval 30
lcp_echo_failure 10

C.3.2   Using PPP

After it is configured and initialized, PPP attaches itself into the VxWorks TCP/IP stack at the driver (link) layer. After a PPP link has been established with the remote peer, all normal VxWorks IP networking facilities are available; the PPP connection is transparent to the user.

Initializing a PPP Link

A PPP link is initialized by calls to either usrPPPInit( ) or pppInit( ). When either of these routines is invoked, the remote peer should be initialized. When a peer is running in passive mode, it must be initialized first (see C.3.4 PPP Option Descriptions, p.312.).

You can initialize the PPP interface by calling usrPPPInit( ):

  • From the VxWorks shell.
  • By user application code.

Use either syntax when calling usrPPPInit( ):

usrPPPInit ("bootDevice", unitNum, "localIPAddress", "remoteIPAddress")  
usrPPPInit ("bootDevice", unitNum, "localHostName", "remoteHostName")

You can use host names in usrPPPInit( ) provided the hosts have been previously added to the host database. For example, you can call usrPPPInit( ) in the following way:

usrPPPInit ("ppp=/tyCo/1,38400", 1, "147.11.90.1", "147.11.90.199")

The usrPPPInit( ) routine calls pppInit( ), which initializes PPP with the configuration parameters that were specified at compile-time (see Setting PPP Options when Configuring VxWorks, p.301). The pppInit( ) routine can be called multiple times to initialize multiple channels.2 The connection timeout is specified by PPP_CONNECT_DELAY. The return value of this routine indicates whether the link has been successfully established. If the return value is OK, the network connection should be fully operational.

The pppInit( ) routine is the standard entry point for initializing a PPP link. All available PPP options can be set using parameters specified for this routine (see C.3.4 PPP Option Descriptions, p.312). Unlike usrPPPInit( ), the return value of pppInit( ) does not indicate the status of the PPP link; it merely reports whether the link could be initialized. To check whether the link is actually established, call pppInfoGet( ) and make sure that the state of IPCP is OPENED. The following code fragment demonstrates use of this mechanism for PPP unit 2:

PPP_INFO    pppInfo; 

if ((pppInfoGet (2, &pppInfo) == OK) &&
(pppInfo.ipcp_fsm.state == OPENED))
return (OK);                           /* link established */
else
return (ERROR);                        /* link down */

Deleting a PPP Link

There are two ways to delete a PPP link:

  • By receiving a terminate request packet from the peer.
  • By calling pppDelete( ) to terminate the link.

Merely deleting the VxWorks tasks that control PPP or rebooting the target severs the link only at the TCP/IP stack, but does not delete the link on the remote peer end.

The return value of pppDelete( ) does not indicate the status of the PPP link. To check whether the link is actually terminated, call pppInfoGet( ) and make sure the return value is ERROR. The following code fragment demonstrates the usage of this mechanism for PPP unit 4:

PPP_INFO    pppInfo; 

if (pppInfoGet (4, &pppInfo) == ERROR)
return (OK);                          /* link terminated */
else
return (ERROR);                       /* link still up */

PPP Authentication

PPP provides security through two authentication protocols: PAP and CHAP. This section introduces the use of PPP link-layer authentication and describes the format of the secrets files.


*      
NOTE: This version of CHAP does not support RFC 2433 - Microsoft PPP CHAP Extensions ("MS-CHAP" or "CHAP-0x80"), which is used by some NT servers.

In this implementation, the default behavior of PPP is to provide authentication when requested by a peer but not to require authentication from a peer. If additional security is required, choose PAP or CHAP by enabling the corresponding option. This PPP implementation can act as a client (the peer authenticating itself) or a server (the authenticator).

Authentication for both PAP and CHAP is based on secrets, selected from a secrets file or from the secrets database built by the user (which can hold both PAP and CHAP secrets). A secret is represented by a record, which itself is composed of fields. The secrets file and the secrets database contain secrets that authenticate other clients, as well as secrets used to authenticate the VxWorks client to its peer. In the case that a VxWorks target cannot access the secrets file through the file system, use pppSecretAdd( ) to build a secrets database.

Secrets files for PAP and CHAP use identical formats. A secrets record is specified in a file by a line containing at least three words that specify the contents of the fields client, server, and secret, in that order. For PAP, secret is a password that must match the password entered by the client seeking PAP authentication. For CHAP, both client and server must have identical secrets records in their secrets files; the secret consists of a string of one or more words (for example, "an unguessable secret").

Table 2 is an example of a secrets file. It could be either a PAP or CHAP secrets file, since their formats are identical.

Table 2 :   Secrets File Format   


client
server
secret
IP address

vxTarget
mars
"vxTargetSECRET"
venus
vxTarget
"venusSECRET"
147.11.44.5
*
mars
"an unguessable secret"
venus
vxTarget
"venusSECRET"
-
vxTarget
mars
@host:/etc/passwd

At the time of authentication, for a given record, PPP interprets any words following client, server, and secret as acceptable IP addresses for the client and secret specified. If there are only three words on the line, it is assumed that any IP address is acceptable; to disallow all IP addresses, use a dash (-). If the secret starts with an @, what follows is assumed to be the name of a file from which to read a secret. An asterisk (*) as the client or server name matches any name. When authentication is initiated, a best-match algorithm is used to find a match to the secret, meaning that, given a client and server name, the secret returned is for the closest match found.

On receiving an authentication request, PPP checks for the existence of secrets either in an internal secrets database or in a secrets file. If PPP does not find the secrets information, the connection is terminated.

The secrets file contains secrets records used to authenticate the peer, and those used to authenticate the VxWorks client to the peer. Selection of a record is based on the local and remote names. By default, the local name is the host name of the VxWorks target, unless otherwise set to a different name by the option local_auth_name in the options file. The remote name is set to a NULL string by default, unless otherwise set to a name specified by the option remote_auth_name in the options file. (Both local_auth_name and remote_auth_name can be specified in two other forms, as can other configuration options listed under C.3.4 PPP Option Descriptions, p.312.)

Using PAP

The default behavior of PPP is to authenticate itself if requested by a peer but not to require authentication from a peer. For PPP to authenticate itself in response to a server's PAP authentication request, it only requires access to the secrets. For PPP to act as an authenticator, you must turn on the PAP configuration option.

Secrets can be declared in a file or built into a database. The secrets file for PAP can be specified in one of the following ways:

  • By reconfiguring VxWorks with the PSP file specified. The relevant configuration parameter is PPP_STR_PAP_FILE.

  • By setting the pap_file member of the PPP_OPTIONS structure passed to pppInit( ).

  • By adding the following line entry in the PPP options file specified in your configuration:

pap_file  /xxx/papSecrets

If the VxWorks target is unable to access the secrets file, call pppSecretAdd( ) to build a secrets database.

If PPP requires the peer to authenticate itself using PAP, the necessary configuration option can be set in one of the following ways:

  1. By reconfiguring VxWorks with PAP required. The relevant configuration parameter is PPP_OPT_REQUIRE_PAP.
  1. By setting the flag OPT_REQUIRE_PAP in the flags bit field of the PPP_OPTIONS structure passed to pppInit( );
  1. By adding the following line entry in the options file.
require_pap

Secrets records are first searched in the secrets database; if none are found there, then the PAP secrets file is searched. The search proceeds as follows:

  • VxWorks as an authenticator:.  

PPP looks for a secrets record with a client field that matches the user name specified in the PAP authentication request packet and a server field matching the local name. If the password does not match the secrets record supplied by the secrets file or the secrets database, it is encrypted, provided the optional DES cryptographic package is installed. Then it is checked against the secrets record again. Secrets records for authenticating the peer can be stored in encrypted form if the optional DES package is used. If the login option was specified, the user name and the password specified in the PAP packet sent by the peer are checked against the system password database. This enables restricted access to certain users.

  • VxWorks as a client:.  

When authenticating the VxWorks target to the peer, PPP looks for the secrets record with a client field that matches the user name (the local name unless otherwise set by the PAP user name option in the options file) and a server field matching the remote name.

Using CHAP

The default behavior of PPP is to authenticate itself if requested by a peer but not to require authentication from a peer. For PPP to authenticate itself in response to a server's CHAP authentication request, it only requires access to the secrets. For PPP to act as an authenticator, you must turn on the CHAP configuration option.

CHAP authentication is instigated when the authenticator sends a challenge request packet to the peer, which responds with a challenge response. Upon receipt of the challenge response from the peer, the authenticator compares it with the expected response and thereby authenticates the peer by sending the required acknowledgment. CHAP uses the MD5 algorithm for evaluation of secrets.

The secrets file for CHAP can be specified in any of the following ways:

  • By reconfiguring VxWorks with the CHAP file specified. The relevant configuration parameter is PPP_STR_CHAP_FILE.

  • By setting the chap_file member of the PPP_OPTIONS structure passed to pppInit( ).

  • By adding the following line entry in the options file:

chap_file  /xxx/chapSecrets

If PPP requires the peer to authenticate itself using CHAP, the necessary configuration option can be set in one of the following ways:

  • By reconfiguring VxWorks with CHAP required. The relevant configuration parameter is PPP_OPT_REQUIRE_CHAP.

  • By setting the flag OPT_REQUIRE_CHAP in the flags bit field of the PPP_OPTIONS structure passed to pppInit( ).

  • By adding the following line entry in the options file:

require_chap

Secrets are first searched in the secrets database; if none are found there, then the CHAP secrets file is searched. The search proceeds as follows:

  • VxWorks as an authenticator:.  

When authenticating the peer, PPP looks for a secrets record with a client field that matches the name specified in the CHAP response packet and a server field matching the local name.

  • VxWorks as a client:.  

When authenticating the VxWorks target to the peer, PPP looks for the secrets record with a client field that matches the local name and a server field that matches the remote name.

Connect and Disconnect Hooks

PPP provides connect and disconnect hooks for use with user-specific software. Use the pppHookAdd( ) routine to add a connect hook that executes software before initializing and establishing the PPP connection or a disconnect hook that executes software after the PPP connection has been terminated. The pppHookDelete( ) routine deletes connect and disconnect hooks.

The routine pppHookAdd( ) takes three arguments: the unit number, a pointer to the hook routine, and the hook type (PPP_HOOK_CONNECT or PPP_HOOK_DISCONNECT). The routine pppHookDelete( ) takes two arguments: the unit number and the hook type. The hook type distinguishes between the connect hook and disconnect hook routines.

Two arguments are used to call the connect and disconnect hooks: unit, which is the unit number of the PPP connection, and fd, the file descriptor associated with the PPP channel. If the user hook routines return ERROR, then the link is gracefully terminated and an error message is logged.


*      
CAUTION: In VxWorks AE, hooks such as the connect and disconnect hooks described here must be in the kernel domain.

The code in Example 1 demonstrates how to hook the example routines, connectRoutine( ) and disconnectRoutine( ), into the PPP connection establishment mechanism and termination mechanism, respectively.

Example 1 :   Using Connect and Disconnect Hooks

#include <vxWorks.h> 
#include <pppLib.h>

void attachRoutine(void);
static int connectRoutine(int, int);
static int disconnectRoutine(int, int);


void attachRoutine(void)
{
                     /* add connect hook to unit 0 */
pppHookAdd(0, connectRoutine, PPP_HOOK_CONNECT);
                     /* add disconnect hook to unit 0 */
pppHookAdd(0, disconnectRoutine, PPP_HOOK_DISCONNECT);
}

static int connectRoutine
(
int unit,
int fd
)
BOOL connectOk = FALSE;
                    
                     /* user specific connection code */
                      {
                      .......................
                     connectOk = TRUE;
if(connectOk)
{
return(OK);
else
return(ERROR);
}

static int disconnectRoutine
(
int unit, 
int fd
)
{
BOOL disconnectOk = FALSE;
                     /* user specific code */
{
                      ............................................
disconnectOk = TRUE;
}
if(disconnectOk)
   return(OK);
else
   return(ERROR);
}

C.3.3   Troubleshooting PPP

Because of the complex nature of PPP, you may encounter problems using it in conjunction with VxWorks. Give yourself the opportunity to get familiar with running VxWorks configured with PPP by starting out using a default configuration. Additional options for the local peer should be disabled. (You can always add these options later.) Problems with PPP generally occur in either of two areas: when establishing links and when using authentication. The following sections offer checklists for troubleshooting errors that have occurred during these processes.

Link Establishment

The link is the basic operating element of PPP; a proper connection ensures the smooth functioning of PPP, as well as VxWorks. The following steps should help resolve simple problems encountered when establishing a link.

  1. Make sure that the serial port is connected properly to the peer. A null modem may be required.
  1. Make sure that the serial driver is correctly configured for the default baud rate of 9600, no parity, 8 DATA bits, and 1 STOP bit.
  1. Make sure that there are no problems with the serial driver. PPP may not work if there is a hang up in the serial driver.
  1. Start the PPP daemon on the peer in the passive mode.
  1. Boot the VxWorks target and start the PPP daemon by typing:
% usrPPPInit

If no arguments are supplied, the target configures the default settings. If a timeout error occurs, reconfigure VxWorks with a larger connect delay time. The relevant configuration parameter is PPP_CONNECT_DELAY. By default, the delay is set to 15 seconds, which may not be sufficient in some environments.

  1. Once the connection is established, add and test additional options.

Authentication

Authentication is one of the more robust features of this PPP implementation. The following steps may help you troubleshoot basic authentication problems.

  1. Turn on the debug option for PPP. The relevant configuration parameter is PPP_OPT_DEBUG. You can also use the alternative options in C.3.4 PPP Option Descriptions, p.312. By turning on the debug option, you can witness various stages of authentication.
  1. If the VxWorks target has no access to a file system, use pppSecretAdd( ) to build the secrets database.
  1. Make sure the secrets file is accessible and readable.
  1. Make sure the format of the secrets file is correct.
  1. PPP uses the MD5 algorithm for CHAP authentication of secrets. If the peer tries to use a different algorithm for CHAP, then the CHAP option should be turned off.
  1. Turn off the VJ compression. It can be turned on after you get authentication working.

C.3.4   PPP Option Descriptions

This section lists all the configurable options supported by this PPP implementation. You can configure each of these options from three different locations:

If you set the same option using more than one of the above methods, the option settings specified in the options file PPP_OPTIONS_FILE take precedence over any set using the VxWorks image configuration tool or by passing a PPP_OPTIONS structure into pppInit( ). For example:

  • If VxWorks is configured with the use of PAP negated, a subsequent setting of require_pap in PPP_OPTIONS_FILE overrides the earlier setting enabling PAP authentication. The relevant configuration parameter is PPP_OPT_NO_PAP.

  • If char * netmask has been passed in the options structure PPP_OPTIONS to pppInit( ) with a value of FFFF0000, and netmask FFFFFF00 is passed in PPP_OPTIONS_FILE to usrPPPInit( ), the network mask value is set to FFFFFF00.

Table C-1 :   Configuration Options for Bundled PPP


Set in config.h
Set Using Options Structure
Set Using Options File

PPP_OPT_DEBUG
OPT_DEBUG
debug
Enable PPP daemon debug mode.
PPP_OPT_DEFAULT_ROUTE
OPT_DEFAULT_ROUTE
default_route
After IPCP negotiation is successfully completed, add a default route to the system routing tables. Use the peer as the gateway. This entry is removed when the PPP connection is broken.
PPP_OPT_DRIVER_DEBUG
OPT_DRIVER_DEBUG
driver_debug
Enable PPP driver debug mode.
PPP_OPT_IPCP_ACCEPT_LOCAL
OPT_IPCP_ACCEPT_LOCAL
ipcp_accept_local
Set PPP to accept the remote peer's idea of the target's local IP address, even if the local IP address was specified.
PPP_OPT_IPCP_ACCEPT_REMOTE
OPT_IPCP_ACCEPT_REMOTE
ipcp_accept_remote
Set PPP to accept the remote peer's idea of its (remote) IP address, even if the remote IP address was specified.
PPP_OPT_LOGIN
OPT_LOGIN
login
Use the login password database for PAP authentication of peer.
PPP_OPT_NO_ACC
OPT_NO_ACC
no_acc
Disable address/control compression.
PPP_OPT_NO_ALL
OPT_NO_ALL
no_all
Do not request/allow any options.
PPP_OPT_NO_CHAP
OPT_NO_CHAP
no_chap
Do not allow CHAP authentication with peer.
PPP_OPT_NO_IP
OPT_NO_IP
no_ip
Disable IP address negotiation in IPCP.
PPP_OPT_NO_MN
OPT_NO_MN
no_mn
Disable magic number negotiation.
PPP_OPT_NO_MRU
OPT_NO_MRU
no_mru
Disable MRU (Maximum Receive Unit) negotiation.
PPP_OPT_NO_PAP
OPT_NO_PAP
no_pap
Do not allow PAP authentication with peer.
PPP_OPT_NO_PC
OPT_NO_PC
no_pc
Disable protocol field compression.
PPP_OPT_NO_VJ
OPT_NO_VJ
no_vj
Disable VJ (Van Jacobson) compression.
PPP_OPT_NO_VJCCOM
OPT_NO_ASYNCMAP
no_asyncmap
Disable async map negotiation.
PPP_OPT_NO_VJCCOMP
OPT_NO_VJCCOMP
no_vjccomp
Disable VJ (Van Jacobson) connection ID compression.
PPP_OPT_PASSIVE_MODE
OPT_PASSIVE_MODE
passive_mode
Set PPP in passive mode so it waits for the peer to connect, after an initial attempt to connect.
PPP_OPT_PROXYARP
OPT_PROXY_ARP
proxy_arp
Add an entry to this system's ARP (Address Resolution Protocol) table with the IP address of the peer and the Ethernet address of this system.
PPP_OPT_REQUIRE_CHAP
OPT_REQUIRE_CHAP
require_chap
Require CHAP authentication with peer.
PPP_OPT_REQUIRE_PAP
OPT_REQUIRE_PAP
require_pap
Require PAP authentication with peer.
PPP_OPT_SILENT_MODE
OPT_SILENT_MODE
silent_mode
Set PPP in silent mode. PPP does not transmit LCP packets to initiate a connection until a valid LCP packet is received from the peer.
PPP_STR_ASYNCMAP
char * asyncmap
asyncmap value
Set the desired async map to the specified value.
PPP_STR_CHAP_FILE
char * chap_file
chap_file file
Get CHAP secrets from the specified file. This option is necessary if either peer requires CHAP authentication.
PPP_STR_CHAP_INTERVAL
char * chap_interval
chap_interval value
Set the interval in seconds for CHAP rechallenge to the specified value.
PPP_STR_CHAP_RESTART
char * chap_restart
chap_restart value
Set the timeout in seconds for the CHAP negotiation to the specified value.
PPP_STR_ESACAPE_CHARS
char * escape_chars
escape_chars value
Set the characters to escape on transmission to the specified values.
PPP_STR_IPCP_MAX_CONFIGURE
char * ipcp_max_configure
ipcp_max_configure value
Set the maximum number of transmissions for IPCP configuration requests to the specified value.
PPP_STR_IPCP_MAX_FAILURE
char * ipcp_max_failure
ipcp_max_failure value
Set the maximum number of IPCP configuration NAKs to the specified value.
PPP_STR_IPCP_MAX_TERMINATE
char * ipcp_max_terminate
ipcp_max_terminate value
Set the maximum number of transmissions for IPCP termination requests to the specified value.
PPP_STR_IPCP_RESTART
char * ipcp_restart
ipcp_restart value
Set the timeout in seconds for the IPCP negotiation to the specified value.
PPP_STR_LCP_ECHO_FAILURE
char * lcp_echo_failure
lcp_echo_failure value
Set the maximum consecutive LCP echo failures to the specified value.
PPP_STR_LCP_ECHO_INTERVAL
char * lcp_echo_interval
lcp_echo_interval value
Set the interval in seconds for the LCP negotiation to the specified value.
PPP_STR_LCP_MAX_CONFIGURE
char * lcp_max_configure
lcp_max_configure value
Set the maximum number of transmissions for LCP configuration requests to the specified value.
PPP_STR_LCP_MAX_FAILURE
char * lcp_max_failure
lcp_max_failure value
Set the maximum number of LCP configuration NAKs to the specified value.
PPP_STR_LCP_MAX_TERMINATE
char * lcp_max_terminate
lcp_max_terminate value
Set the maximum number of transmissions for LCP termination requests to the specified value.
PPP_STR_LCP_RESTART
char * lcp_restart
lcp_restart value
Set the timeout in seconds for the LCP negotiation to the specified value.
PPP_STR_LOCAL_AUTH_NAME
char * local_auth_name
local_auth_name name
Set the local name for authentication to the specified name.
PPP_STR_MAX_CHALLENGE
char * max_challenge
max_challenge value
Set the maximum number of transmissions for CHAP challenge requests to the specified value.
PPP_STR_MRU
char * mru
mru value
Set MRU (Maximum Receive Unit) for negotiation to the specified value.
PPP_STR_MTU
char * mtu
mtu value
Set MTU (Maximum Transmission Unit) for negotiation to the specified value.
PPP_STR_NETMASK
char * netmask
netmask value
Set the network mask value for negotiation to the specified value.
PPP_STR_PAP_FILE
char * pap_file
pap_file file
Get PAP secrets from the specified file. This option is necessary if either peer requires PAP authentication.
PPP_STR_PAP_MAX_AUTHREQ
char * pap_max_authreq
pap_max_authreq value
Set the maximum number of transmissions for PAP authentication requests to the specified value.
PPP_STR_PAP_PASSWD
char * pap_passwd
pap_passwd passwd
Set the password for PAP authentication with the peer to the specified password.
PPP_STR_PAP_RESTART
char * pap_restart
pap_restart value
Set the timeout in seconds for the PAP negotiation to the specified value.
PPP_STR_PAP_USER_NAME
char * pap_user_name
pap_user_name name
Set the user name for PAP authentication with the peer to the specified name.
PPP_STR_REMOTE_AUTH_NAME
char * remote_auth_name
remote_auth_name name
Set the remote name for authentication to the specified name.
PPP_STR_VJ_MAX_SLOTS
char * vj_max_slots
vj_max_slots value
Set the maximum number of VJ compression header slots to the specified value.


1:  If your host operating system does not provide PPP facilities, you can use a publicly available implementation. One popular implementation for SunOS 4.1.x (and several other hosts) is the PPP version 2.1.2 implementation provided in the unsupported/ppp-2.1.2 directory. This code is publicly available and is included only as a convenience. This code is not supported by Wind River Systems.

2:  The usrPPPInit( ) routine can specify the unit number as a parameter. If this number is omitted, PPP defaults to 0.