
SDK Programming Guide Version 1.511
ABLELink
R
Ethernet-Serial Server MAXI Series
Example:
Gets the Serial Server’s ETHERNET address
uchar
buf[6];
GetLocalEthAddr ( buf ); // assume ETHERNET address =
// buf[0] = 0x00
// 0x0060E9010203
// buf[1] = 0x60
// buf[2] = 0xE9
// buf[3] = 0x01
// buf[4] = 0x02
// buf[5] = 0x03
Remarks:
This function is used to get the Serial Server’s physical address, it is
also called the MAC (Medium Access Control) address. An example
of the ETHERNET address shown below
manufacture
board
| 0x00 0x60 0xE9 | 0x01 0x02 03 |
GetDefaultGateway()
Description:
Get the Serial Server’s default gateway address.
Include:
tcpapi.h, tcpdef.h
Usage:
int GetDefaultGateway (char far *
buf
)
Input Parameters:
buf
buffer to store the default gateway 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 default gateway IP address
uchar
buf[4];
GetDefaultGateway ( buf );
// assume default gateway IP address =
// buf[0] = 0x0a
// 10.0.52.250
// buf[1] = 0x00
// buf[2] = 0x34
// buf[3] = 0xfa
Remarks:
This function is used to get the default gateway IP address in the Serial
Server. A keyboard can be used to set this address. Each Serial Server
has a default gateway IP address to forward the TCP/IP packet to another
segment of the network.
Copyright © 2004 Atop Technologies, Inc.
All rights reserved. Designed in Taiwan.