Solvline PB2xxxUG User Manual
Page 84
![background image](/manuals/711383/84/background.png)
U_read_lan
Read
TCP
Socket
Description This function reads a number of bytes (less than or equal to buff_size) from a
specified file descriptor and places them in buff.
Synopsis
int U_read_lan (int fd, char *buff, int buff_size)
Parameters fd
: File descriptor from which to read
buff
: Pointer to buffer to receive bytes
buff_size
: The maximum size of bytes to read into buffer
Returns
-1
: If the file descriptor does not exist
0
: If end of file
n
: The number of bytes read (between 1 and buff_size)
U_get_mac
Read
Mac
Address
Description This function gets the MAC address.
Synopsis
int U_get_mac (char *buff)
Parameters buff
: Where to return MAC address
Returns
-1
: If failed
0
: If successfully gets
U_msnow
Read
Timer
Description This function returns the interval between turning Portbase on and current in
10 m second.
Synopsis
int msnow ()
Parameters
Returns
0~n
: Interval time in 10 m second
84