AcornSearch - Acorn and RISC OS information searching
RISC OS Search
containing
"Nutty quip goes here!"
Home  |  About  |  Filebase Archive  |  StrongHelp Manuals  |  Newsgroups  |  Module Database
The format of an internet addresses block is:

Offset     Contents

0     Size of block in bytes
1     Address family
2     Port number
4     IPv4 address
8     Reserved (should be zero)
12     Reserved (should be zero)

Note: Port and IP address should be in network byte order - also known as 'big endian' - the reverse of the format used by the ARM processor on RISC OS machines.

The internet form of an address is (in C):
struct sockaddr_in {
unsigned char  sin_len;       /* length of this structure */
unsigned char  sin_family;    /* address family (AF_INET) */
unsigned short sin_port;      /* port number */
struct in_addr sin_addr;      /* internet address (sin_addr.s_addr) */
char           sin_zero[8];   /* zero padding */
};

This address format was introduced with Internet 5.00 and should be used in preference to the obsolete sockaddr used by Internet 4.xx.

[sh-index] Back to list of manuals