Cover V02, I06
Article

nov93.tar


Books: A User's Report

Elizabeth Zinkann

Due to the number of books released this month, the selection was difficult. However, I decided on a new TCP/IP book, a Korn Shell book, one that deals with UNIX and X, an Internet book, plus a new book on UNIX device drivers.

TCP/IP Illustrated Volume 1: The Protocols
by W. Richard Stevens
Addison-Wesley Professional Computing Series
ISBN 0-201-63346-9

With this book, Stevens gives his audience -- programmers, system administrators, and users -- the capability not only to understand the network protocols, but also to diagnose network problems. He presents an analysis of the TCP/IP protocol suite and, in the preface of the book, provides a unique chart that matches the TCP/IP protocol suite diagrams with the chapter(s) that discuss them. The examples presented in the book were run on an existing internet and are not merely theoretical illustrations. The author emphasizes that although most of the cases are demonstrated on UNIX systems, TCP/IP "is operating system-independent, and is available on almost every popular, non-UNIX system."

The TCP/IP protocol suite allows communication among varied computers with different operating systems. Networking protocols are implemented in layers, with each layer responsible for a different task. The protocol suite equals the combination of protocols at various levels.

Stevens not only enumerates the various levels of the TCP/IP, but also describes what each level does in detail. He demonstrates the differences between client and server, user and kernel, and peer-to-peer. He also illustrates end systems, intermediate systems, and hop-by-hop protocols. He explains what fragmentation is, when it is used ideally, and when it is used practically.

Stevens provides an excellent description of the Internet Protocol and IP Routing. In addition to an historical perspective and an explanation of how internetworking evolved, he includes possible solutions for the future, such as SIP, PIP, TUBA, and CIDR. He also explains the Reverse Address Resolution Protocol (RARP) for use with diskless systems.

Along with the introduction to TCP/IP, Stevens presents a detailed explanation of the individual protocols. Some of the protocols, such as TCP, warrant several chapters, whereas certain singular topics, such as IP Routing, each merit individual chapters. Since Stevens has chosen to display the TCP/IP protocols through a diagnostic program, two chapters on diagnostics are included. The ping program checks whether "another host is reachable." The traceroute program displays the route that an IP datagram takes "from one host to another."

TCP/IP Illustrated: Volume 1: The Protocols provides an excellent text on the TCP/IP protocol suite. The author covers the most important sections of the protocols in separate chapters, not only addressing each protocol, but also discussing the relationships between protocols. The diagrams he uses are excellent, and his writing style is clear and readable. In sum, Stevens has made a complex topic easy to understand. This book merits "everyone's" attention. Please read it and keep it on your bookshelf. TCP/IP Illustrated: Volume 1: The Protocols will be available in December 1993.

Learning the Korn Shell
by Bill Rosenblatt
O'Reilly & Associates, Inc.
ISBN 1-56592-054-6

Rosenblatt begins this book with a definition of the Korn shell and its relationship to both the Bourne and the C shells. Although the author addressed the text specifically to the casual UNIX user, there are several chapters that the experienced UNIX user and the system administrator will appreciate. The first two chapters, "Korn Shell Basics" and "Command Line Editing," introduce the concepts of shell programming and review the more elementary aspects of the Korn shell. In the first chapter, Rosenblatt presents a table of special characters and their meaning within shell command lines.

Chapter 3, "Customizing Your Environment," explains the concept of an environment and describes a non-computer-related environment as an example. Rosenblatt also presents the concepts of .profile, alias, options, shell variables, and environment variables. He uses particularly good examples when discussing the alias function. A useful table of basic shell options notes that all 22 of the options are listed in Appendix B. The description of the environment also identifies lapses in security that might allow hackers to install Trojan horses or other programs detrimental to your system.

Beginning with chapter 4, "Basic Shell Programming," Rosenblatt addresses the more complex issues of shell programming, particularly Korn shell programming. He describes different ways of running shell programs and explains how they are executed. He also discusses shell functions, which are new to the Korn shell, and the distinctions between functions and shell programs.

Chapters 5 and 6, "Flow Control" and ""Command-line Options and Typed Variables," will be very familiar to UNIX users who are also programmers. However, they focus on programming from the Korn shell viewpoint, so non-programmers will have no difficulty understanding the concepts. Experienced programmers may discover new ways to accomplish familiar tasks through command-line options or variables.

Chapter 7, "Input/Output and Command-line Processing," can help both new and experienced shell programmers learn more about input and output and different ways of accomplishing them efficiently. The chapter also offers a more in-depth look at "how the shell processes command lines." Rosenblatt presents a table of I/O redirectors supported by the Korn shell (he includes all sixteen of them, whether or not they exist in the Bourne shell). An informative diagram helps to explore issues related to command-line parsing.

The final chapters in the book -- "Process Handling," "Debugging Shell Programs," and "Korn Shell Administration" -- will help the system administrator. The first of these chapters addresses process IDs, job control, signals (and ignoring signals), coroutines, and subshells. In "Debugging Shell Programs," Rosenblatt demonstrates different ways to debug shell scripts, some new and some familiar to the reader. These include set options, fake signals, and kshdb (the Korn shell debugger). The final chapter covers customization and security.

The three appendices are well worth reading. Appendix A covers related shells, how to emulate the Korn shell on PCs, and the difference between the Bourne and the Korn shells, chapter by chapter. The second appendix contains reference lists, including built-in commands and keywords, shell variables, test operators, set and typeset options, and both emacs and vi mode commands. Appendix C explains how to obtain sample programs and answers through FTP, FTPMAIL, BITFTP, and UUCP.

This book is an excellent text for both new and experienced UNIX users. If you are new to the Korn shell, I advise reading the beginning chapters so that you can learn to distinguish the Korn shell from the Bourne and C shell capabilities. Rosenblatt presents exercises (called tasks) and their solutions as the book develops and is able to cover a broad range of subjects without oversimplifying any of the challenging concepts involved. This book merits a thorough examination by every UNIX shell programmer.

Getting Started with UNIX and X
by Torbjörn Andréasson and Jan Skansholm
Addison-Wesley
ISBN 0-201-63170-9

This very readable book about the UNIX operating system and the X windowing systems available on UNIX is organized so as to be applicable to users at the elementary, intermediate, and advanced levels. Distinctive symbols identify which sections of the text are devoted to which topics, such as X, Motif, OpenWindows, or the Korn shell. Each section is presented independently, so that one or more may be skipped without losing continuity.

The authors begin by recounting the history of UNIX and its components, then continue with a definition of X and an explanation of the differences among several window managers. They describe how to login, whether the user is new to UNIX, X, both, or neither. They carefully document which environment variables must be set before the programs mentioned will execute correctly. Their discussion of Xlib, Xt Intrinsics, Widgets, and application programs demonstrates the X protocol while providing a solution to the X novice's puzzle.

Later chapters describe how to navigate within Motif and introduce OpenLook and OpenWindows. The authors discuss the concepts of the file system, including the X file managers, how to traverse the X file tree, and how to accomplish various tasks within X. They also focus on the more advanced shell commands, such as redirection, filters, environment and shell variables, and the history capability, where applicable. One of the most informative chapters in the book deals with communications. This section explores remote copy (rcp), the file transfer program (FTP), remote shell (rsh), telnet, write and talk, and electronic mail (e-mail), and presents their X counterparts.

Other topics include text editing, both for UNIX and for X, and writing shell scripts for the four different shells. The authors also explain how to write, compile, and link a program in UNIX, and they address the difficulties of programming in X. The final section, on system administration, describes the superuser, startup and shutdown procedures, adding and removing users, and copying using tar or cpio. Andrasson and Skansholm also present the different menus for the various systems.

The authors have included plenty of diagrams and also indicate where the interfaces originated. Many of the screens show how to accomplish tasks in different windows. Several of the chapters include quick reference guides as summaries -- the comparison table following the advanced shell programming chapter is particularly useful. The programs and tables for different shells are well documented and the tables throughout the book are excellent. This book should be read by anyone using UNIX and X: it will clarify any mysteries still surrounding UNIX, X, and the relationship between the two.

Writing UNIX Device Drivers in C
by Phillip M. Adams and Clovis L. Tondo
Prentice Hall
ISBN 0-13-963869-5
Disk Included

The authors describe this as a workbook rather than a text. It provides the information needed either to experiment with existing UNIX device drivers or to design and implement your own UNIX device drivers. The book is divided into three sections. The introduction explains the vocabulary and tools that the authors use throughout the remainder of the book, including hardware and device driver fundamentals. The second section features "the concept, architecture and operational characteristics of UNIX device drivers." This section also presents a practical approach through a template that, ideally, "reduces development time" while simultaneously improving device driver reliability. The final portion of the book demonstrates the techniques used in the design, implementation, and debugging phases of a UNIX device driver that transforms "your PC/AT parallel port into a small computer system interface (SCSI) adapter." A 3 1/2" diskette for SCO UNIX System V/386 device drivers, containing the source code used in most of the appendices, is included with the book. The diskette itself describes the tar command on the label so that the information is easy to transfer.

Adams and Tondo not only define a device driver, but also explain its purpose and enumerate the capabilities a UNIX device driver must have. They stress that the book was written specifically for programmers who either need to know about device drivers or want to build device drivers. The reader should have a knowledge of C plus minimal assembler language fundamentals. Knowledge of UNIX system software and hardware is helpful, but optional.

This book also examines the different reasons for using the INTEL 80386 and discusses the differences between real and protected mode. The authors explain address translation and its importance to the device driver author. Describing the UNIX operating system "as a set of layered interfaces," they enumerate the interfaces and their functions, and present each interface in depth.

Various chapters address the problems most commonly associated with device drivers and present "a `rule book' for developing device drivers." Other subjects include "UNIX I/O Data Structures," the "UNIX Block I/O Interface," the "UNIX Character I/O Interface," the "UNIX Terminal I/O Interface," the "UNIX STREAMS I/O Interface," and the "Small Computer System Interface (SCSI)."

Although the introductory chapters are not addressed to the novice, they are thoroughly documented. Each code segment clarifies a specific concept from the text. The text itself provides an explanation for experienced device driver users. This is an excellent book for any user ready to build a device driver.

Connecting to the Internet
A Buyer's Guide

by Susan Estrada
O'Reilly & Associates, Inc.
ISBN 1-56592-061-9

In the introduction, Tracy LeQuey Parker underlines the importance of knowing what the Internet is and what benefits you may derive from it. Susan Estrada begins Connecting to the Internet by describing the Internet and how it works, emphasizing the importance of speed in transferring data. The primary question in assessing any type of software or hardware is "How are you planning to use it?" Estrada applies this question to the Internet and helps you to answer it in terms of your own requirements.

The next section of the book discusses network providers and how to choose among them. The popularity of the Internet has meant an increase in the number of providers available, but not all of them offer the same services. Estrada presents an eleven-item checklist -- including security, viability, and user services -- for network providers.

Estrada also differentiates between online and dialup connections. If you are connecting as an individual, you will probably use online services. However, if you are a heavy user or if there are several people using one connection, you may prefer SLIP or PPP accounts. In either case, the author provides a "Checklist of Questions" to assist you. The final chapter deals with questions regarding dedicated line connections.

There are two invaluable appendices. The first contains the Public Dialup Internet Access List (PDIAL), which lists public access dialup accounts plus outgoing Internet access. The second appendix is an "Internet Access Provider List."

This very useful book both explains the Internet and helps you analyze what type of Internet you really want. The diagrams are helpful and the author's style is crisp and clear. The anecdotes and real-life examples that she uses emphasize the points with humor. If you are interested in the Internet, you will appreciate this book.

About the Author

Elizabeth Zinkann has been involved in the UNIX and C environments for the past 11 years. She is currently a UNIX and C consultant, and one of her specialities is UNIX education. In addition to her computer science background, she also has a degree in English.