
SDK Programming Guide Version 1.511
ABLELink
R
Ethernet-Serial Server MAXI Series
GetLocalIPAddr()
Description:
Get the local device IP address.
Include:
tcpapi.h, tcpdef.h
Usage:
int GetLocalIPAddr ( char far *
buf
)
Input Parameters:
buf
buffer to store the IP address
Return Value:
SUCCESS successful
others error, the definition of ERROR number please refer to the file
“
tcpdef.h
”
Example:
Get the Serial Server’s own IP address
uchar
buf[4];
GetLocalIPAddr ( buf );
// assume IP address = 10.0.52.100
// buf[0] = 0x0a
// buf[1] = 0x00
// buf[2] = 0x34
// buf[3] = 0x64
Remarks:
This function is used to get the Serial Server local IP address. Each Serial
Server must have its own IP address to identify the node on the local
network via TCP/IP. The IP address can be set by a keyboard.
GetLocalEthAddr()
Description:
Get the Serial Server’s ETHERNET address
Include:
tcpapi.h, tcpdef.h
Usage:
int GetLocalEthAddr (
char far *
buf
)
Input Parameters:
buf
buffer to store the ETHERNET address
Return Value:
SUCCESS successful
others error, the definition of ERROR number please refer to the file
“
tcpdef.h
”
Copyright © 2004 Atop Technologies, Inc.
All rights reserved. Designed in Taiwan.