beautypg.com

Solvline Eddy DK Ver 2.20 User Manual

Page 53

background image

Chapter 6. Library

6-10

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 Eddy Serial model

“eth1” for Eddy WiFi model.

Returns

Unsigned int

Read IP address and returns in unsigned int type.

Notice

Note that it 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));

SB_GetMask

Function

Reads subnet mask address assigned to Eddy.

Format

Unsigned int SB_GetMack (char *interface);

Parameter

Interface

Interface name to be read

“eth0” for Eddy Serial model

“eth1” for Eddy WiFi model

Returns

Unsigned int

Returns mask address in unsigned int type

Notice

Please see SB_GetIp also

SB_GetGateway

Function

Reads gate address assigned to Eddy.

Format

Unsigned int SB_SetGeteway(void);

Parameter None

Returns

Unsinged int

Returns gate address in unsigned int type

Notice

Please see SB_GetIp also