Metrologic Optimus S Programming Manual page 159

"c" programming guide
Table of Contents

Advertisement

inet_ntoa
Purpose
To convert an IP address to a string in standard dot notation.
Syntax
char *inet_ntoa (struct in_addr addr);
addr
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.
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
backlog
Chapter 3 Terminal Specific Function Library
A in_addr structure containing the IP address to be converted
The argument fildes must be an open file descriptor.
Descriptor identifying a bound, unconnected socket
Number of connections that will be held in a queue waiting to
be accepted
153

Advertisement

Table of Contents
loading

This manual is also suitable for:

Optimus r

Table of Contents