01.06.2013 Views

IPC@CHIP Documentation - SC12 @CHIP-RTOS V1.10

IPC@CHIP Documentation - SC12 @CHIP-RTOS V1.10

IPC@CHIP Documentation - SC12 @CHIP-RTOS V1.10

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

AH<br />

ES:DI<br />

0x45 (= PPPCLIENT_SET_OPTIONS)<br />

Pointer to an array of PPP_Option data structures. This array is terminated by first PPP_Option structure<br />

with a null optionValuePtr member (see example below).<br />

Return Value<br />

Comments<br />

AX = -3 PPP Connection already established AX = -2 PPP client is not installed.<br />

AX = -1 Invalid Option(s) AX = 0 Success<br />

If you want to use this function, you have to call it before opening a connection (see related links below).<br />

Settings options during an established connection will not work!<br />

The settings are only valid for the next established connection. The data structures referenced here with<br />

ES:DI must persist until after the subsequent PPP client open function completes.<br />

A C-Library function is available in the CLIB file TCPIP.C. Here is an example which sets three PPP options<br />

using the C-Library wrapper functions:<br />

// Allow remote peer to set primary DNS IP.<br />

unsigned long DNS_Pri_IP = 0L;<br />

// Allow remote peer to set secondary DNS IP.<br />

unsigned long DNS_Sec_IP = 0L;<br />

// Allow remote peer to use VJ TCPIP header compression.<br />

unsigned int ipcp_comp = 1;<br />

PPP_Option My_Options[] = {<br />

{ PPP_IPCP_PROTOCOL, PPP_OPTION_ALLOW, PPP_IPCP_COMP_PROTOCOL,<br />

(const char *)&ipcp_comp, sizeof(ipcp_comp)},<br />

{ PPP_IPCP_PROTOCOL, PPP_OPTION_WANT, PPP_IPCP_DNS_PRI,<br />

(const char *)&DNS_Pri_IP, sizeof(DNS_Pri_IP)},<br />

{ PPP_IPCP_PROTOCOL, PPP_OPTION_WANT, PPP_IPCP_DNS_SEC,<br />

(const char *)&DNS_Sec_IP, sizeof(DNS_Sec_IP)},<br />

// This last PPP_Option is used to terminate array.<br />

{ 0, 0, 0, NULL, 0}<br />

} ;<br />

//***** Call the C-Library functions as follows ****<br />

// Install options with CLIB function<br />

PPP_Client_SetOptions(&My_Options[0]); // Point to first member of array<br />

PPP_Client_Open(&pppclient); // Open the connection<br />

Related Topics<br />

Top of list<br />

Index page<br />

PPPCLIENT_OPEN open a PPP connection<br />

PPPCLIENT_CLOSE close a PPP connection<br />

Interrupt 0xAC service 0x50: PPPSERVER_INSTALLED, Check if PPP server installed<br />

Page 128 / 400

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!