Watt-32 tcp/ip  2.2 dev-rel.10
Functions
inet.h File Reference

Go to the source code of this file.

Functions

__BEGIN_DECLS W32_FUNC int W32_CALL ascii2addr (int, const char *, void *)
 
W32_FUNC char *W32_CALL addr2ascii (int, const void *, int, char *)
 
W32_FUNC struct in_addr W32_CALL inet_makeaddr (u_long, u_long)
 Formulate an Internet address from network + host (with subnet address). More...
 
W32_FUNC u_long W32_CALL inet_addr (const char *)
 
W32_FUNC u_long W32_CALL inet_lnaof (struct in_addr)
 Return the local network address portion of an internet address; handles class A/B/C network number formats only. More...
 
W32_FUNC u_long W32_CALL inet_netof (struct in_addr)
 Return the network number from an internet address; handles class A/B/C network #'s.
 
W32_FUNC u_long W32_CALL inet_network (const char *)
 
W32_FUNC int W32_CALL inet_aton (const char *s, struct in_addr *adr)
 
W32_FUNC char *W32_CALL inet_ntoa (struct in_addr)
 
W32_FUNC char *W32_CALL inet_ntoa_r (struct in_addr adr, char *buf, int buflen)
 
W32_FUNC char *W32_CALL inet_nsap_ntoa (int binlen, const u_char *binary, char *ascii)
 
W32_FUNC u_int W32_CALL inet_nsap_addr (const char *ascii, u_char *binary, int maxlen)
 
W32_FUNC const char *W32_CALL inet_ntop (int af, const void *src, char *dst, size_t size)
 Convert a network format address to presentation format. More...
 
W32_FUNC int W32_CALL inet_pton (int af, const char *src, void *dst)
 Convert from presentation format (which usually means ASCII printable) to network format (which is usually some kind of binary format). More...
 

Detailed Description

Address conversions.

Definition in file inet.h.

Function Documentation

W32_FUNC u_long W32_CALL inet_lnaof ( struct in_addr  addr)

Return the local network address portion of an internet address; handles class A/B/C network number formats only.

Note
return value is host-order.

Definition at line 360 of file netaddr.c.

W32_FUNC struct in_addr W32_CALL inet_makeaddr ( u_long  net,
u_long  host 
)

Formulate an Internet address from network + host (with subnet address).

Note
'net' is on host-order.

Definition at line 377 of file netaddr.c.

W32_FUNC const char* W32_CALL inet_ntop ( int  af,
const void src,
char *  dst,
size_t  size 
)

Convert a network format address to presentation format.

Return values
pointerto presentation format address (`dst'),
NULLon error (see errno).
Author
Paul Vixie, 1996.

Definition at line 40 of file presaddr.c.

References inet_ntop4(), and inet_ntop6().

W32_FUNC int W32_CALL inet_pton ( int  af,
const char *  src,
void dst 
)

Convert from presentation format (which usually means ASCII printable) to network format (which is usually some kind of binary format).

Return values
1the address was valid for the specified address family.
0the address wasn't valid (`dst' is untouched in this case).
-1some other error occurred (`dst' is untouched in this case, too).
Author
Paul Vixie, 1996.

Definition at line 66 of file presaddr.c.

References inet_pton4(), and inet_pton6().