Chapter 3 Terminal Specific Function Library
153
inet_ntoa
Purpose
To convert an IP address to a string in standard dot notation.
Syntax
char *inet_ntoa (struct in_addr addr);
addr
A in_addr structure containing the IP address to be converted
Example
struct sockaddr_in name;
char ip_addr[16];
strcpy (ip_addr, inet_ntoa (name.sin_addr));
printf ("Remote IP: %s", ip_addr);
Description
This routine converts an IP address stored in a struct in_addr structure to a
string in standard dot notation.
Return
If successful, it returns a pointer to the string.
Otherwise (?)
See Also
inet_addr
ioctlsocket
Purpose
To provide controls on the I/O mode of a socket.
Syntax
int ioctlsocket (int fildes, int request, ...);
Example
(?)
Description
This routine manipulates the underlying device parameters of special files. In
particular, many operating characteristics of character special files (e.g.
terminals) may be controlled with ioctlsocket() requests.
The argument fildes must be an open file descriptor.
Return
If successful, it returns 0.
On error, it returns -1.
The global variable
errno
is set to indicate the error condition encountered.
See Also
fcntlsocket
listen
Purpose
To listen for connections on a socket.
Syntax
int listen (SOCKET s, int backlog);
s
Descriptor identifying a bound, unconnected socket
backlog
Number of connections that will be held in a queue waiting to
be accepted
Содержание Optimus R
Страница 1: ...Printed on 20 March 2006 C Programming Guide Version 3 04 02 Optimus S Optimus R...
Страница 6: ......
Страница 8: ...2 C Programming Guide For Optimus S R...
Страница 12: ...6 C Programming Guide For Optimus S R The flow is illustrated as shown below...
Страница 23: ...Chapter 2 Development Environment 17 Different types signed unsigned Different types same size...
Страница 24: ...18 C Programming Guide For Optimus S R...
Страница 220: ...214 C Programming Guide For Optimus S R See Also FlashSize free_memory...
Страница 232: ...226 C Programming Guide For Optimus S R 4 11 Implementation defined Limits limits h float h Refer to limit h and float h...
Страница 238: ...232 C Programming Guide For Optimus S R...