45
ESOCK scans its
esock.ini
file (in
\system\data\
) each time it is started, to see which
protocols and services are defined, and which protocol modules can be loaded.
As with Communications Server modules and Telephony Server modules, Sockets Server protocol
modules are loaded and unloaded dynamically. A single protocol module can contain one or more
related protocols (a protocol family). They must be able to identify themselves and their
capabilities, and at least one protocol in a family must provide socket services. Protocol families
may also provide service registration and name space resolution services. Examples of protocol
families are TCP/IP, IrDA (consisting of raw IrMUX, IrTinyTP, IrLAP, IrLMP and IrObex), and
the PLP Link Protocol used by EPOC Connect.
8.4.4.3 TCP/IP
The TCP/IP sockets protocol family is the basis of all Internet applications, including Email and
Web. The stack EPOC provides in
tcpip.prt
implements the following protocols:
•
TCP (Transmission Control Protocol) as specified in RFC 793, together with the RFC
2001 Slow Start Algorithm
•
UDP (User Datagram Protocol) as specified in RFC 768
•
IP (Internet Protocol) as specified in RFC 791, together with datagram broadcasting as
specified in RFCs 919 and 922 and the RFC 1144 Low Speed Link Header Compression
•
ICMP (Internet Control Message Protocol) as specified in RFC 792, with RFC 950
Standard Subnetting
•
DNS (Domain Name System), consisting of those parts of RFCs 1034, 1035 and 1101
which are appropriate to IP clients.
The header file
in_sock.h
defines additional constants and types relevant to TCP/IP
networking. For instance,
TInetAddr
is derived from
TSockAddr
to represent an Internet
address: it provides functions which set and parse the underlying
TSockAddr
data according
to the rules of Internet addressing.
8.4.4.4 Network interface manager
A socket provides communications to a remote network entity specified by an address. In order to
send a packet to an address, a route must be identified. If a protocol (such as IP) has no route
available to some destination machine or destination network, the system uses the network
interface manager (NIFMAN) defined in
nifman.h
to start up an appropriate network interface.
In turn, NIFMAN uses an
agent
to establish an interface. The standard agent provided is
netdial.agt
which enables the use of dial-up networking via an Internet service provider and
EPOC’s NETDIAL component, which is defined in
netdial.h
.
For users of dial-up applications, the network connection status is of some importance. Firstly, it
shows whether the application is able to immediately perform network-oriented functions.
Secondly, it indicates whether connection charges are being incurred — particularly important on
EPOC machines integrated with mobile phones. For this reason, NIFMAN provides a monitoring
API which allows applications to monitor the status of the network connection, and display it to
their users. At any time, the
RNif:Progress
function can be used to obtain the last reported
connection status. Alternatively, making asynchronous calls to
RNif:ProgressNotification()
ensures that an application will be kept informed whenever
the network connection changes status or encounters an error.
8.4.4.5 PPP
Once an agent has established a connection, a data link protocol is used to drive that connection.
EPOC provides as standard a comprehensive implementation of the Point to Point Protocol (PPP)
as specified in RFC 1661. Among the features implemented are:
•
the use of LCP echo/reply packets to ensure link quality
•
PPP Authentication Protocol (PAP), and Challenge Handshake authentication protocol
(CHAP) with the Microsoft proprietary extensions
•
HDLC-like framing