VxWorks Reference Manual : Libraries
pppSecretLib - PPP authentication secrets library
pppSecretAdd( ) - add a secret to the PPP authentication secrets table
pppSecretDelete( ) - delete a secret from the PPP authentication secrets table
This library provides routines to create and manipulate a table of "secrets" for use with Point-to-Point Protocol (PPP) user authentication protocols. The secrets in the secrets table can be searched by peers on a PPP link so that one peer (client) can send a secret word to the other peer (server). If the client cannot find a suitable secret when required to do so, or the secret received by the server is not valid, the PPP link may be terminated.
This library is automatically linked into the VxWorks system image when the configuration macro INCLUDE_PPP is defined.
pppLib.h
pppSecretLib, pppLib, pppShow, VxWorks Programmer's Guide: Network
pppSecretAdd( ) - add a secret to the PPP authentication secrets table
STATUS pppSecretAdd ( char * client, /* client being authenticated */ char * server, /* server performing authentication */ char * secret, /* secret used for authentication */ char * addrs /* acceptable client IP addresses */ )
This routine adds a secret to the Point-to-Point Protocol (PPP) authentication secrets table. This table may be used by the Password Authentication Protocol (PAP) and Challenge-Handshake Authentication Protocol (CHAP) user authentication protocols.
When a PPP link is established, a "server" may require a "client" to authenticate itself using a "secret". Clients and servers obtain authentication secrets by searching secrets files, or by searching the secrets table constructed by this routine. Clients and servers search the secrets table by matching client and server names with table entries, and retrieving the associated secret.
Client and server names in the table consisting of "*" are considered wildcards; they serve as matches for any client and/or server name if an exact match cannot be found.
If secret starts with "@", secret is assumed to be the name of a file, wherein the actual secret can be read.
If addrs is not NULL, it should contain a list of acceptable client IP addresses. When a server is authenticating a client and the client's IP address is not contained in the list of acceptable addresses, the link is terminated. Any IP address will be considered acceptable if addrs is NULL. If this parameter is "-", all IP addresses are disallowed.
OK, or ERROR if the secret cannot be added to the table.
pppSecretLib, pppSecretDelete( ), pppSecretShow( )
pppSecretDelete( ) - delete a secret from the PPP authentication secrets table
STATUS pppSecretDelete ( char * client, /* client being authenticated */ char * server, /* server performing authentication */ char * secret /* secret used for authentication */ )
This routine deletes a secret from the Point-to-Point Protocol (PPP) authentication secrets table. When searching for a secret to delete from the table, the wildcard substitution (using "*") is not performed for client and/or server names. The client, server, and secret strings must match the table entry exactly in order to be deleted.
OK, or ERROR if the table entry being deleted is not found.
pppSecretLib, pppSecretAdd( ), pppSecretShow( )