Eddy DK Programmer Guide
105
6.6
Ethernet functions
These functions deal with the network-related information of Eddy.
These functions are optimized socket API for Eddy, and user can use other API for development by using his or her
own POSIX compatible standard socket API.
SB_GetIp
Function
Reads IP address assigned to Eddy.
Format
Unsigned int SB_GetIp (char *interface);
Parameter
Interface
Network interface name.
“eth0” for WAN port.
“eth1” for LAN port.
Returns
Unsigned int
returns IP address in unsigned int type.
Notice
Note that the function returns operating IP address, not the IP address
configured in Eddy. When Eddy is operating as a DHCP Client, this function
read network IP address assigned from DHCP server.
Please see below for transforming IP address into string type.
struct in_addr addr;
addr.s_addr = SB_GetIp ();
printf ("IP Address : %s ", inet_ntoa(addr));
Содержание Eddy DK
Страница 1: ...1 Eddy DK Programmer Guide Ver 2 5 1 1 2011 02 15...
Страница 10: ...Eddy DK Programmer Guide 10 2 3 Eddy CPU v2 1 v2 5...
Страница 36: ...Eddy DK Programmer Guide 36 2 4 4 External Device Interface Description...
Страница 47: ...Eddy DK Programmer Guide 47 Eddy S4M v2 1 Eddy S4M v2 5...