Ch 3. DATA COMMUNICATIONS [ COMMUNICATOR 3000 MPE MPE/iX RELEASE 4.0 ] MPE/iX Communicators
COMMUNICATOR 3000 MPE MPE/iX RELEASE 4.0
Chapter 3 DATA COMMUNICATIONS
Introducing Berkeley Sockets/iX
by Majid Mohazzab
Commercial Systems Division
The 4.3 version of Berkeley Software Distribution (BSD)tm(1) offers a
rich set of interprocess-communication (IPC) facilities referred to as
Berkeley Sockets or BSD Sockets. Berkeley Sockets provides a C language
application program interface (API) that is used as a de facto standard
in writing many of the current distributed applications. This API
provides a general interface to allow node isolated and network-based
applications to be constructed independently of the underlying
communication facilities. (The additional IPC facility, NETIPC, is still
fully supported.)
PRODUCT OVERVIEW
The basic building block for BSD Sockets communication is the socket.
Sockets are communication end points that allow programs running on the
same or different nodes to exchange messages and data. Sockets have
different types. A socket type defines a communication model that can be
connection-oriented or connectionless. In the connection model, a
connection must be established between two sockets prior to transmission
of any data. The common socket types are stream sockets and datagram
sockets. A stream socket is a connection-oriented model that supports
reliable, sequenced flow of data. A datagram socket is a connectionless
model that potentially may provide an unreliable and unsequenced flow of
data. Sockets can operate in different communication domains. Sockets
exchange data only with sockets in the same domain. The common sockets'
domains are UNIX (Local) domain and Internet (DARPA) domain. Sockets on
Local domain can only be used to communicate with processes on the same
node. Sockets on Internet domain can communicate with processes on the
same or different nodes.
PRODUCT FEATURES
This release of MPE/iX introduces the first portion of Berkeley Sockets
system calls. Berkeley Sockets/iX supports datagram and stream
communication types, and can operate on Local and Internet domains. The
following list of system calls are available with MPE/iX Release 4.0 and
are offered as part of the MPE/iX operating system.
* socket()
* bind()
* connect()
* listen()
* accept()
* send()
* sendto()
* recv()
* recvfrom()
* shutdown()
* getsockname()
* getpeername()
* socketpair()
4.3 BSD Sockets provides a set of routines referred by Name Service
Routines that are used with BSD Sockets to locate and construct network
addresses.
Naming Service Routines listed below are also available with this release
of MPE/iX. They are divided into four subsections; each subsection
describes a set of five related intrinsics:
GETHOSTENT GETNETENT GETPROTENT GETSERVENT
----------- ----------- ------------ -----------
gethostent getnetent getprotoent getservent
sethostent setnetent setprotoent setservent
gethostbyname getnetbyname getprotobyname getservbyname
gethostbyaddr getnetbyaddr getprotobynumber getservbyport
endhostent endnetent endprotoent endservent
Of the above Naming Service Routines, gethostbyname, and gethostbyaddr
are offered as part of the MPE/iX operating system. The rest of the
routines are bundled with the Link product and must be purchased
separately.
For more information about BSD Sockets and Naming Service Routines,
please refer to the related article in the "Technical Articles" section
in this Communicator.
(1) (c) Copyright 1979, 1980, 1983, 1985-1990 The Regents of the
University of California. This software and documentation is based in
part on materials licensed from the Regents of the University of
California. We acknowledge the role of the Computer Systems Research
Group and the Electrical Engineering and Computer Sciences Department of
the University of California at Berkeley and the other named contributors
in their development.
MPE/iX Communicators