TCP/IP

This section describes the TCP/IP concepts as implemented by the Symbian platform.

The TCP/IP is a plug-in architecture. Clients access its services through the generic Sockets Server Client API, and specify protocol-specific behaviour through TCP/IP specific utility types and constants.

The TCP/IP API has the following three key concepts:

  • TCP/IP Socket

  • Domain Name Resolver

  • Internet Addresses

TCP/IP Socket

The TCP/IP protocol module (tcpip.prt) provides TCP/IP communication services to client applications. This module provides the following four fundamental transport and network layer protocols:

  • Internet Protocol (IP) RFC791

  • Internet Control Message Protocol (ICMP) RFC792 and RFC950

  • Transmission Control Protocol (TCP) RFC793

  • User Datagram Protocol (UDP) RFC768

Clients do not access the protocol module directly. Clients use the protocol module through the Sockets Server Client API. The module also provides a DNS service that can be accessed through the Sockets Server Client API standard host name resolution interface, RHostResolver(). Socket services are provided through the generic interface RSocket(). It is possible for TCP/IP services to be used over many types of network interface. To enable access to TCP/IP networks through a dial-up serial connection, Point-to-Point protocol (PPP) is provided.

Domain Name Resolver

Domain name resolver is a program that extracts the information from name servers in response to client requests. The domain name resolution service uses the normal sockets API, for example, UDP and TCP to communicate with the name servers. Resolvers must access at least one name server and uses its information to answer a query directly. A resolver is a system procedure that is accessible to the user programs, for example, mail programs, TELNET and FTP. This indicates that the protocol is not required between the resolver and the user programs.

A very important goal of the resolver is to eliminate the network delay and the load on the name server.

Internet Addresses

The TCP/IP program uses a socket address encapsulated in a TInetAddr object. The TInetAddr object stores the IP address and port of a socket. This is the expected form for passing address information when using RSocket() and RHostResolver() for TCP/IP.

The TCP/IP program also handles IP addresses represented in the following formats:

  • As a dotted-decimal string, For example, 194.129.2.54 stored in a descriptor.

  • As an unsigned 32-bit integer - the usual binary representation of an IP address. This can be used to initialise a TInetAddr through the relevant constructor.

  • The 4 integers forms a dotted-decimal address and the macro INET_ADDR is used to convert this into integer format in the appropriate byte-order.

Note: All addresses are handled in the native byte order. It means the user do not need to use byte-order conversion functions, for example, BSD’s htonl() or htons().

Routes and Interfaces

The TCP/IP protocol must establish the following information to communicate with a remote host through a socket:

  • the IP address and port of the socket

  • a route to the remote host

  • a network interface by which to access that route

The actions to do this are performed when: