The GNU C Library - Internet Namespace

Node: Internet Namespace Next: Misc Namespaces Prev: File Namespace Up: Sockets

The Internet Namespace

This section describes the details the protocols and socket naming conventions used in the Internet namespace.

To create a socket in the Internet namespace, use the symbolic name PF_INET of this namespace as the namespace argument to socket or socketpair . This macro is defined in `sys/socket.h'.

Macro int PF_INET
This designates the Internet namespace and associated family of protocols.

A socket address for the Internet namespace includes the following components:

You must ensure that the address and port number are represented in a canonical format called network byte order. See Byte Order, for information about this.

Internet Address Format How socket addresses are specified in the
Internet namespace.
Host Addresses All about host addresses of internet host.
Protocols Database Referring to protocols by name.
Ports Internet port numbers.
Services Database Ports may have symbolic names.
Byte Order Different hosts may use different byte
ordering conventions; you need to
canonicalize host address and port number.
Inet Example Putting it all together.


Next: Misc Namespaces Up: Sockets