Amiga Developer Site by i n n o i d e a | MorphOS | Amiga Developers | Compilers | Documents | Dev-HardFile v1.11 for UAE / real Amiga - readme - shot) | Unique/All Visitors: 77257/570053
Search manual for function in the   
GeekGadgets/inet_ntoa
NAME 

inet_aton, inet_addr, inet_network, inet_ntoa, inet_makeaddr, inet_lnaof, 
inet_netof - Internet address manipulation routines

SYNOPSIS 


#include <sys/socket.h> 
#include <netinet/in.h> 
#include <arpa/inet.h> 


int inet_aton(const char *cp, struct in_addr *inp);


in_addr_t inet_addr(const char *cp);


in_addr_t inet_network(const char *cp);


char *inet_ntoa(struct in_addr in);


struct in_addr inet_makeaddr(int net, int host);


in_addr_t inet_lnaof(struct in_addr in);


in_addr_t inet_netof(struct in_addr in);


DESCRIPTION 

inet_aton() converts the Internet host address cp from the
standard numbers-and-dots notation into binary data and stores it in
the structure that inp points to. inet_aton returns
nonzero if the address is valid, zero if not.


The inet_addr() function converts the Internet host address
cp from numbers-and-dots notation into binary data in network
byte order.  If the input is invalid, INADDR_NONE (usually -1) is returned.
This is an obsolete interface to inet_aton, described
immediately above; it is obsolete because -1 is a valid address
(255.255.255.255), and inet_aton provides a cleaner way
to indicate error return.


The inet_network() function extracts the network number in
host byte order from the address cp in numbers-and-dots
notation.  If the input is invalid, -1 is returned.


The inet_ntoa() function converts the Internet host address
in given in network byte order to a string in standard
numbers-and-dots notation.  The string is returned in a statically
allocated buffer, which subsequent calls will overwrite.


The inet_makeaddr() function makes an Internet host address
in network byte order by combining the network number net
with the local address host in network net, both in
local host byte order.


The inet_lnaof() function returns the local host address part
of the Internet address in.  The local host address is returned
in local host byte order.


The inet_netof() function returns the network number part of
the Internet Address in.  The network number is returned in
local host byte order.


The structure in_addr as used in inet_ntoa(),
inet_makeaddr(), inet_lnoaf() and inet_netof()
is defined in netinet/in.h as:



struct in_addr {
	unsigned long int s_addr;
}



Note that on the i80x86 the host byte order is Least Significant Byte
first, whereas the network byte order, as used on the Internet, is
Most Significant Byte first.

CONFORMING TO 

BSD 4.3

SEE ALSO 

gethostbyname(3),
getnetent(3),
inet_ntop(3),
inet_pton(3),
hosts(5),
networks(5)


20040403101119 - LouiSe - for (GeekGadgets/inet_ntoa)
Example #1 is an inet_ntoa() function implementation...

Logo by Emeric/SH
GeekGadgets/inet_ntoa

Example #1 Download / View

Functions with "i":
icmp
icmp_var.h
iconv
iconv_close
iconv_open
idle
if
if.h
if_arp.h
if_dl.h
if_ether.h
if_llc.h
if_loop_protos.h
if_protos.h
if_sana.h
if_slvar.h
if_types.h
imaxabs
in.h
in_cksum_protos.h
in_pcb.h
in_pcb_protos.h
in_proto_protos.h
in_protos.h
in_systm.h
in_var.h
inb
inb_p
index
inet
inet.h
inet_MakeAddr
inet_addr
inet_aton
inet_lnaof
inet_makeaddr
inet_netof
inet_network
inet_ntoa
inet_ntop
inet_pton
inetd.h
infnan
init.h
initgroups
initstate
inl
inl_p
insb
insl
insque
insw
int
intro
inw
inw_p
ioccom.h
ioctl
ioctl.h
ioctl_compat.h
ioctl_list
ioperm
iopl
ios1.h
ip
ip.h
ip_icmp.h
ip_icmp_protos.h
ip_input_protos.h
ip_output_protos.h
ip_var.h
ipc
ipc.h
iruserok
isalnum
isalpha
isascii
isatty
isblank
iscntrl
isdigit
isgraph
isinf
islower
isnan
isprint
ispunct
isspace
isupper
iswalnum
iswalpha
iswblank
iswcntrl
iswctype
iswdigit
iswgraph
iswlower
iswprint
iswpunct
iswspace
iswupper
iswxdigit
isxdigit
ix.h
ixnet_syscall.def
ixnet_syscall.h

Last 15 uploaded Examples:

20071229151342 AmiSSL/X509_STORE_CTX_cleanup
20070708011052 GeekGadgets/getlogin
20060705053954 AmigaOS/OpenWorkbenchObjectA
20050801035639 SDL/SDL_Surface
20050727092732 BlitzBasic/LSL
20050718102843 SDL/SDL_WarpMouse
20050718072844 GeekGadgets/fread
20050714051528 SDL/SDL_ActiveEvent
20050714051514 SDL/SDL_ActiveEvent
20050701171401 GeekGadgets/errno
20050701171347 GeekGadgets/errno
20050627101951 SDL/SDL_FreeSurface
20050623152729 GeekGadgets/fork
20050619153102 GeekGadgets/tcdrain
20050615182849 AmigaOS/OpenScreen

Last 25 posts:

20050613235812 SDL/SDL_SetGammaRamp
20050526065000 AmiTCP/unistd.h
20050413041558 AmiSSL/X509_STORE_set_default_paths
20050409155750 AmigaDOS/Status
20050129230614 MUI/Calendar.mcc
20050128185620 GeekGadgets/hstrerror
20041126154558 BlitzBasic/LoadBank
20041123170704 GeekGadgets/gcvt
20041105222909 AmigaOS/CheckSignal
20040712190839 SDL/SDL_SetVideoMode
20040627090529 SDL/SDL_Init
20040519133228 GeekGadgets/fork
20040407124555 AmigaOS/AllocMem
20040403101120 GeekGadgets/inet_ntoa
20040327172814 GeekGadgets/random
20040327172714 GeekGadgets/srandom
20040313211937 BlitzBasic/ANALYZEDISK
20040303135237 GeekGadgets/mktemp
20040301131355 GeekGadgets/realpath
20040301123615 GeekGadgets/gcvt
20040301114000 GeekGadgets/htonl
20040301100209 GeekGadgets/realpath
20040229095437 GeekGadgets/time
20040211132618 GeekGadgets/getpid
20040209102818 AmigaOS/OpenWindow




Amiga.sf
AMIGIFT

Locations of visitors to this page

Page took 0.77038 seconds to load.