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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Index page<br />

PPP_Option<br />

Comments<br />

This data structure and associated constants are defined in TCPIPAPI.H header file. It is used to control PPP options for<br />

both the PPP server and client.<br />

typedef struct tag_ppp_option<br />

{<br />

int protocolLevel; // PPP_LCP_PROTOCOL or PPP_IPCP_PROTOCOL<br />

int remoteLocalFlag; // PPP_OPTION_WANT or PPP_OPTION_ALLOW<br />

int optionName; // From constants defined below<br />

const char far *optionValuePtr; // To buffer provided by user<br />

int optionLength; // Number of bytes at *optionValuePtr<br />

} PPP_Option;<br />

// PPP Protocol levels<br />

#define PPP_LCP_PROTOCOL 0x21c0<br />

#define PPP_IPCP_PROTOCOL 0x2180<br />

// For .remoteLocalFlag<br />

#define PPP_OPTION_WANT 0<br />

#define PPP_OPTION_ALLOW 1<br />

// Protocol options for .optionName field<br />

// LCP protocol<br />

#define PPP_LCP_ACCM 2<br />

#define PPP_LCP_PROTO_COMP 7<br />

#define PPP_LCP_ADDRCTRL_COMP 8<br />

// IPCP protocol<br />

#define PPP_IPCP_COMP_PROTOCOL 2<br />

#define PPP_IPCP_DNS_PRI 29<br />

#define PPP_IPCP_DNS_SEC 31<br />

The type of data found at the location referenced by the optionValue member varies depending on the particular PPP<br />

option that is being dealt with.<br />

When manipulating socket options, the protocol_level at which the option resides and the name of the option<br />

(optionName member) must be specified.<br />

The size of the buffer required pointed to by the optionValue member depends on the option. These sizes (in bytes) are<br />

stated at the descriptions list below. The parameters optionValue and optionLength are used to access option values.<br />

The structure member remoteLocalFlag can have two possible values:<br />

PPP_OPTION_WANT or PPP_OPTION_ALLOW.<br />

With remoteLocalFlag set to PPP_OPTION_WANT, the <strong>IPC<strong>@CHIP</strong></strong> sends a PPP configuration request to the connected<br />

peer which contains the specified option.<br />

With remoteLocalFlag set to PPP_OPTION_ALLOW, the <strong>IPC<strong>@CHIP</strong></strong> accepts an incoming PPP configuration request from<br />

the connected peer for the specified option.<br />

The following list specifies the PPP options for the two different protocol levels, including a short description and the length of<br />

the option needed for setting the optionLength member. Protocol level and optionName constants referred to here are<br />

defined in TCPIPAPI.H<br />

protocolLevel=PPP_LCP_PROTOCOL (Link Control Protocol level options)<br />

❍ optionName=PPP_LCP_ADDRCONTROL_COMP: Size: 8 bit, sizeof(char) - Activate/Deactivate address control<br />

compression, default 0: Deactivated<br />

❍ optionName=PPP_LCP_PROTO_COMP: Size: 8 bit, sizeof(char) - Value 1: Protocol field compression, default 0: No<br />

compression<br />

❍ optionName=PPP_LCP_ACCM: Size: 32 bit, sizeof(long) - Set Async control character map. Each bit position of the<br />

unsigned long value represents the corresponding character which should be escaped or not during PPP session.<br />

protocolLevel=PPP_IPCP_PROTOCOL (IpCp level options)<br />

❍ optionName=PPP_IPCP_COMP_PROTOCOL: Size: 16 bit, sizeof(int) - Value 1: VJ TCP/IP header compression,<br />

default 0: No compression<br />

Page 174 / 400

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

Saved successfully!

Ooh no, something went wrong!