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.

typedef struct tag_ping_command<br />

{<br />

int sd; // Socket descriptor, set by PING_OPEN<br />

// User must set following four values prior to PING_OPEN API call<br />

char far *remoteHostNamePtr; // Remote IP<br />

int pingInterval; // seconds<br />

int pingDataLength; // Maximum 1024 bytes<br />

unsigned long count; // Limit number of pings sent. Set to<br />

// zero if ping should run forever (until PING_CLOSE)<br />

unsigned char pingstate; // ping socket state, 1: open 0: closed<br />

// Statistics, filled in by system inside PING_STATISTICS API:<br />

unsigned long transmitted; // Sent ping requests count<br />

unsigned long received; // Received replies count<br />

unsigned int lastsenderr; // Last send error<br />

unsigned int lastrcverr; // Last receive error<br />

unsigned long maxRtt; // Maximum round trip time (ms), rounded off to 100 ms step<br />

unsigned long minRtt; // Minimum round trip time (ms), (100 ms steps)<br />

unsigned long lastRtt; // Round trip time (100 ms steps) of<br />

// the last ping request/reply.<br />

} Ping;<br />

Comments<br />

Caller to PING_OPEN API must initialize structure members:<br />

remoteHostNamePtr... who to "ping"<br />

pingInterval... block repetition rate in seconds<br />

pingDataLength... size of ping data blocks<br />

count... set to zero, if ping should run forever<br />

The remainder of the data structure is managed within the API functions.<br />

Related Topics<br />

Top of list<br />

Index page<br />

API function PING_OPEN - Start ICMP echo requests<br />

PPPClient_Init<br />

typedef struct tag_ppp_client<br />

{<br />

int port; // serial port (0:EXT 1:COM)<br />

int auth; // 0: no authentication<br />

// 1:PAP Client must send user name and password<br />

// for PAP authentication to the peer<br />

// 2:CHAP Client must send user name and password<br />

// for CHAP authentication to the peer<br />

// 3:PAP Client expects PAP user name and password<br />

// from the peer<br />

// 4:CHAP Client expects CHAP user name and password<br />

// from the peer<br />

int modem; // modem usage (0:nullmodem 1:modem)<br />

int flow; // serial flow control (0: none, 1:XON/XOFF, 2:RTS/CTS)<br />

long baud; // Serial port BAUD rate<br />

unsigned long idletimeout; // Closing PPP after idle time seconds<br />

// (0: no closing after idle time)<br />

char username[50]; // Used if .auth != 0<br />

char password[50]; // Used if .auth != 0<br />

void far * dptr; // dummy ptr<br />

char PPPClieipAddrStr[16]; // If IP is set to "0.0.0.0" client expect IP from<br />

// the peer, IP is filled in after successful connection<br />

Page 171 / 400

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

Saved successfully!

Ooh no, something went wrong!