Add Book to My BookshelfPurchase This Book Online

Chapter 14 - Networking with Sockets

UNIX Systems Programming for SVR4
David A. Curry
 Copyright © 1996 O'Reilly & Associates, Inc.

Chapter 14: Networking with Sockets
Overview
These days, nearly every UNIX system is connected to some type of network. Desktop systems are connected via a network to file servers, and they use the network to access system and user files. Most universities and government organizations, and more and more companies, are connected to the Internet, and use the network to communicate with users, access data, and distribute information world-wide. Even many home computers now connect to the Internet or a private network via dial-up networking.
The de facto standard network protocol suite in use today is called TCP/IP, for Transmission Control Protocol/Internet Protocol. This protocol suite was developed by the Internet Engineering Task Force, and is the protocol suite used world-wide by hosts connected to the Internet. TCP/IP is also used for most UNIX-based local-area networking applications such as remote login and network file service. Another international standard protocol suite, usually called OSI (Open Systems Interconnect), has been standardized by the International Standards Organization (ISO). Although fairly popular in Europe, this protocol suite has never caught on in the United States, for a wide variety of both technical and political reasons. Although there was much talk of TCP/IP becoming obsolete when the ISO/OSI standards were first released, it is now clear that TCP/IP is here to stay, and even organizations that use ISO/OSI internally must also support TCP/IP if they want to connect to the outside world and the Internet.
Because TCP/IP development was funded by the U.S. Defense Advanced Research Projects Agency (DARPA), and DARPA also provided principal funding for the development of Berkeley UNIX, BSD UNIX was the first version of the operating system to support internetworking via TCP/IP. The Berkeley networking paradigm, usually called the socket interface, has since spread to nearly every other version of UNIX, SVR4 included.
In Chapter 13, Interprocess Communication, we introduced the Berkeley socket interface as it applied to UNIX-domain sockets, used for communicating between two or more processes on the same machine. In this chapter, we will again examine the socket interface, but this time as it applies to Internet-domain sockets, used for communicating between two or more processes on different machines. In the next chapter, we will examine the Transport Layer Interface (TLI), an alternate interface to the network first introduced in SVR3.
All programs that make use of the socket library functions must be linked with the -lnsl and -lsocket libraries on Solaris 2.x, and with the -lnsl library on IRIX 5.x.

Previous SectionNext Section
Books24x7.com, Inc © 2000 –  Feedback