152
"C" Programming Guide For Optimus S/R
inet_addr
SO_DONTROUTE
SO_BROADCAST
SO_BINDTODEVI
CE
SO_LINGER
SO_OOBINLINE
SO_SNDBUF
SO_RCVBUF
SO_ERROR
SO_TYPE
level = IPPROTO_TCP
TCP_MAXSEG
TCP_NODELAY
level = IPPROTO_IP
IP_OPTIONS
The value associated with the selected option is returned in the optval
buffer.
The integer pointed to by optlen should originally contain the size of this
buffer; on return, it will be set to the size of the value returned.
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
setsockopt
Purpose
To convert an IP address string in standard dot notation to a network byte order
unsigned long integer.
Syntax
unsigned long inet_addr (char *dotted);
dotted
Example
struct sockaddr_in name;
name.sin_addr .s_addr = inet_addr ("192.168.1.1");
Description
This routine converts an IP address string in standard dot notation to a network
byte order unsigned long integer.
Return
If successful, it returns a value of conversion.
Otherwise (?)
inet_ntoa
See Also
Enables routing bypass for outgoing messages
Enables permission to transmit broadcast messages
(?)
Returns the current Linger option
Enables reception of out-of-band data in band
Gets buffer size for sends
Gets buffer size for receives
Gets and clear error on the socket
Gets the type of the socket
Gets TCP maximum-segment size
Disables the Nagle algorithm for send coalescing
Get options in IP header
An IP address in standard dot notation to be converted