 | RL-ARM User's Guide |  |
|
|
| PPP Network InterfaceThis section describes the configuration of the Point-to-Point Protocol (PPP) Network Interface. The options are set in the file Net_Config.c directly or using the Configuration Wizard. 
Where - PPP Network Interface switch enables or disables the PPP Network interface. When the PPP Interface is not used, it should be disabled to reduce the application code size. It is enabled when this value is set to 1.
#define PPP_ENABLE 1
- IP Address specifies your local static four-byte IP address.
#define _IP1P 192
#define _IP2P 168
#define _IP3P 125
#define _IP4P 1
- Subnet Mask specifies the Net Mask. This is normally class C for small LANs: 255.255.255.0. The system uses it to route packets to network interfaces.
#define _MSK1P 255
#define _MSK2P 255
#define _MSK3P 255
#define _MSK4P 0
- Primary DNS Server specifies the IP address of the primary DNS Server. The DNS Client sends IP address resolution requests to this address. This setting is irrelevant when the DNS Client is disabled by configuration.
#define _pDNS1P 194
#define _pDNS2P 25
#define _pDNS3P 2
#define _pDNS4P 129
- Secondary DNS Server specifies the IP address of the secondary DNS Server. This DNS Server is used when the primary DNS Server is down or not accessible. In this case, the DNS Client automatically switches to a backup secondary DNS Server if a non-zero address is provided.
#define _sDNS1P 194
#define _sDNS2P 25
#define _sDNS3P 2
#define _sDNS4P 130
- Logon Authentication switch enables or disables the logon authentication. When the authentication is not used, it should be disabled to reduce the application code size. It is enabled when this value is set to 1.
If your application is dialing the remote PPP server, you should enable the authentication or your application might fail to connect. The logon authentication is usually requested by remote PPP server.
#define PPP_AUTHEN 1
- Unsecured password (PAP) switch enables or disables the Password Authentication Protocol. PAP transmits unencrypted ASCII passwords over the network and is therefore considered insecure.
#define PPP_PAPEN 1
- Secured password (CHAP-MD5) switch enables or disables the Challenge Handshake Authentication Protocol with MD5 digest algorithm. CHAP requires that both the client and server know the plaintext of the secret password, although it is never sent over the network.
#define PPP_CHAPEN 1
- Obtain Client IP address automatically option applies when the PPP dial-up connection dials to a remote PPP Server. If it is enabled, the local PPP IP address is obtained from the remote server automatically.
When this option is enabled the Local IP address and Subnet Mask configuration settings are ignored. The Subnet Mask is automatically set to 255.255.255.255 when the PPP link is connected.
#define PPP_GETIP 1
- Use Default Gateway on remote Network option applies when both Ethernet and PPP dial-up networks are used simultaneously. When TCPNet finds a packet with a destination IP address does not belong to either the LAN or the PPP interface, this option determines which gateway to use.
If this option is disabled, these packets are forwarded to the default gateway on the LAN. If this option is enabled, these packets are forwarded to the Dial-up PPP network.
#define PPP_DEFGW 1
- Async Control Character Map specifies the Map of Control Characters that are transmitted with an escape character. All 32 control characters are mapped into a 4-byte map table. For example:
- ASCII control character NULL (0) is mapped to the least significant bit of PPP_ACCM.
- Control character STX (1) is mapped to bit 1 of PPP_ACCM.
- Control character CR (13) is mapped to bit 13 of PPP_ACCM.
By default, no control characters are mapped.
#define PPP_ACCM 0x00000000
When the XON/XOFF protocol is used for the flow control, the data bytes 0x11 and 0x13 should never be sent in a packet. Those values are used to start and stop the RS232 stream. They must be sent as a 2 byte sequence containing the ESCAPE character followed by the XON/XOFF character xor-ed with 0x20.- XON (17 = 0x11) is sent as 0x7D, 0x31
- XOFF (19 = 0x13) is sent as 0x7D, 0x33
Control Character Map for XON/XOFF protocol would then be:
#define PPP_ACCM 0x000A0000
- LCP Echo Interval in seconds configures the idle timeout. If no frames are received within this time interval, PPP sends an Echo Request and expects an Echo Response from the peer. If the response is not received, after certain number of retries, the link is terminated. A value of 0 disables the LCP Echo test.
#define PPP_ECHOTOUT 30
- Number of Retries specifies the number of retransmissions before the PPP protocol module gives up.
#define PPP_MAXRETRY 3
- Retry Timeout in seconds is the timeout after which the PPP protocol module retransmits the packet.
#define PPP_RETRYTOUT 2
|
|