| |
| |
Introduction | |
| |
| |
| |
The Linux Programming Toolkit | |
| |
| |
| |
Linux and Linux Programming in Context | |
| |
| |
Linux Comes of Age | |
| |
| |
Why Linux Programming? | |
| |
| |
What You'll Learn, Chapter by Chapter | |
| |
| |
Summary | |
| |
| |
| |
Setting Up a Development System | |
| |
| |
General Considerations | |
| |
| |
The Motherboard and CPU | |
| |
| |
User Interaction Hardware: Video, Sound, Keyboards, and Mice | |
| |
| |
Communication Devices, Ports, and Buses | |
| |
| |
Storage Devices | |
| |
| |
External Peripherals | |
| |
| |
Complete Systems | |
| |
| |
Laptops | |
| |
| |
Development Software | |
| |
| |
Summary | |
| |
| |
| |
Using the GNU Compiler Collection | |
| |
| |
Features of GNU CC | |
| |
| |
Tutorial Example | |
| |
| |
Common Command-Line Options | |
| |
| |
Optimization Options | |
| |
| |
Debugging Options | |
| |
| |
Architecture-Specific Options | |
| |
| |
GNU C Extensions | |
| |
| |
PGCC: The Pentium Compiler | |
| |
| |
Summary | |
| |
| |
| |
Project Management Using GNU make | |
| |
| |
Why make? | |
| |
| |
Writing Makefiles | |
| |
| |
Makefile Rules | |
| |
| |
Command-Line Options and Arguments | |
| |
| |
Debugging make | |
| |
| |
Common make Error Messages | |
| |
| |
Useful Makefile Targets | |
| |
| |
Summary | |
| |
| |
| |
Creating Portable, Self-Configuring Software | |
| |
| |
Considering Portability | |
| |
| |
Understanding Autoconf | |
| |
| |
Built-In Macros | |
| |
| |
Generic Macros | |
| |
| |
An Annotated Autoconf Script | |
| |
| |
Summary | |
| |
| |
| |
Comparing and Merging Source Code Files | |
| |
| |
Comparing Files Using the diff Command | |
| |
| |
Understanding the diffs Command | |
| |
| |
Preparing Source Code Patches | |
| |
| |
Summary | |
| |
| |
| |
Version Control Using RCS and CVS | |
| |
| |
Basic Terminology | |
| |
| |
Using the Revision Control System (RCS) | |
| |
| |
Using the Concurrent Versions System (CVS) | |
| |
| |
Summary | |
| |
| |
| |
Debugging | |
| |
| |
Compiling for GDB | |
| |
| |
Using Basic GDB Commands | |
| |
| |
Advanced GDB Concepts and Commands | |
| |
| |
Summary | |
| |
| |
| |
Handling Errors | |
| |
| |
Error Handling Is the Right Thing | |
| |
| |
Error-Handling Options | |
| |
| |
C Language Facilities | |
| |
| |
Using the System Log | |
| |
| |
Summary | |
| |
| |
| |
Using Libraries | |
| |
| |
Working with Programming Libraries | |
| |
| |
Library Tools | |
| |
| |
Writing and Using Static Libraries | |
| |
| |
Writing and Using Shared Libraries | |
| |
| |
Using Dynamically Loaded Shared Objects | |
| |
| |
Summary | |
| |
| |
| |
Input, Output, Files, and Directories | |
| |
| |
| |
Input and Output | |
| |
| |
Basic Characteristics and Concepts | |
| |
| |
Understanding File Descriptors | |
| |
| |
Using File Descriptors | |
| |
| |
Summary | |
| |
| |
| |
Working with Files and Directories | |
| |
| |
The Standard File Functions | |
| |
| |
Input and Output Calls | |
| |
| |
Working with Directories | |
| |
| |
Special ext2 Filesystem Attributes | |
| |
| |
Summary | |
| |
| |
| |
Processes and Synchronization | |
| |
| |
| |
Process Control | |
| |
| |
The Linux Process Model | |
| |
| |
Process Attributes | |
| |
| |
Creating Processes | |
| |
| |
Manipulating Processes | |
| |
| |
Signals | |
| |
| |
Process Scheduling | |
| |
| |
Summary | |
| |
| |
| |
Introduction to Threads | |
| |
| |
What Are Threads? | |
| |
| |
The __clone Function Call | |
| |
| |
The Pthreads Interface | |
| |
| |
Summary | |
| |
| |
| |
Accessing System Information | |
| |
| |
Process Info | |
| |
| |
General System Info | |
| |
| |
Changes to /proc in Upcoming Kernels | |
| |
| |
Summary | |
| |
| |
| |
Memory Management | |
| |
| |
Reviewing C Memory Management | |
| |
| |
Memory Mapping Files | |
| |
| |
Finding and Fixing Memory Problems | |
| |
| |
Summary | |
| |
| |
| |
Interprocess Communication | |
| |
| |
Pipes | |
| |
| |
FIFOs | |
| |
| |
Introducing System V IPC | |
| |
| |
Shared Memory | |
| |
| |
Message Queues | |
| |
| |
Semaphores | |
| |
| |
Summary | |
| |
| |
| |
Daemons | |
| |
| |
Understanding Daemons | |
| |
| |
Creating a Daemon | |
| |
| |
Communicating with a Daemon | |
| |
| |
Summary | |
| |
| |
| |
Network Programming | |
| |
| |
| |
TCP/IP and Socket Programming | |
| |
| |
A Definition of Sockets | |
| |
| |
Communication Domains | |
| |
| |
The Basics of Socket Programming | |
| |
| |
Client/Server Examples Using Sockets | |
| |
| |
A Simple Web Server and Sample Web Client | |
| |
| |
Using Sockets with Other Programming Languages | |
| |
| |
Programming UNIX Domain Sockets with Perl | |
| |
| |
Tools for Monitoring Socket Activity | |
| |
| |
Summary | |
| |
| |
| |
UDP: The User Datagram Protocol | |
| |
| |
Overview of UDP | |
| |
| |
Implementing a UDP-Based Application | |
| |
| |
Summary | |
| |
| |
| |
Multicast Sockets and Non-Blocking I/O | |
| |
| |
Configuring Linux to Support Multicast IP | |
| |
| |
Rebuilding the Linux Kernel for Multicast IP Support | |
| |
| |
Sample Programs for Multicast IP Broadcast | |
| |
| |
Summary | |
| |
| |
| |
Programming the User Interface | |
| |
| |
| |
Terminal Control the Hard Way | |
| |
| |
The Terminal Interface | |
| |
| |
Controlling Terminals | |
| |
| |
Using the Terminal Interface | |
| |
| |
Changing Terminal Modes | |
| |
| |
Using Terminfo | |
| |
| |
Summary | |
| |
| |
| |
Getting Started with Ncurses | |
| |
| |
A Short History of Ncurses | |
| |
| |
Compiling with Ncurses | |
| |
| |
Debugging Ncurses Programs | |
| |
| |
About Windows | |
| |
| |
Initialization and Termination | |
| |
| |
Input and Output | |
| |
| |
Color Routines | |
| |
| |
Window Management | |
| |
| |
Miscellaneous Utility Functions | |
| |
| |
Summary | |
| |
| |
| |
Advanced Ncurses Programming | |
| |
| |
Additional Ncurses Capabilities | |
| |
| |
Interacting with Mice | |
| |
| |
Using Menus | |
| |
| |
Ncurses Forms | |
| |
| |
Summary | |
| |
| |
| |
X Windows Programming | |
| |
| |
X Concepts | |
| |
| |
The Xlib API | |
| |
| |
The X Toolkit API | |
| |
| |
XFree86 | |
| |
| |
Summary | |
| |
| |
| |
Athena, Motif, and LessTif Widgets | |
| |
| |
Using Athena Widgets | |
| |
| |
Using Motif Widgets | |
| |
| |
Writing a Custom Athena Widget | |
| |
| |
Using Both Athena and Motif in C++ Programs | |
| |
| |
Using a C++ Class Library for Athena Widgets | |
| |
| |
Summary | |
| |
| |
| |
GUI Programming Using GTK+ | |
| |
| |
Introduction to GTK+ | |
| |
| |
A GTK+ Program for Displaying XML Files | |
| |
| |
A GUI Program Using the Notebook Widget | |
| |
| |
Using GTK+ with Other Programming Languages | |
| |
| |
RAD Tools for GTK+ | |
| |
| |
Summary | |
| |
| |
| |
GUI Programming Using Qt | |
| |
| |
Event Handling by Overriding QWidget Class Methods | |
| |
| |
Event Handling Using Qt Slots and Signals | |
| |
| |
Implementing the XMLview Program with Qt | |
| |
| |
Summary | |
| |
| |
| |
3D Graphics Using OpenGL and Mesa | |
| |
| |
What You Need for This Chapter | |
| |
| |
Using OpenGL | |
| |
| |
Programming 3D Graphics | |
| |
| |
Texture Mapping | |
| |
| |
Summary | |
| |
| |
| |
Special Topics | |
| |
| |
| |
Shell Programming with GNU Bash | |
| |
| |
Why Bash? | |
| |
| |
Bash Basics | |
| |
| |
Using Bash Variables | |
| |
| |
Using Bash Operators | |
| |
| |
Flow Control | |
| |
| |
Shell Functions | |
| |
| |
Input and Output | |
| |
| |
Command-Line Processing | |
| |
| |
Processes and Job Control | |
| |
| |
Summary | |
| |
| |
| |
Device Drivers | |
| |
| |
Types of Drivers | |
| |
| |
How to Construct the Hardware | |
| |
| |
Setting Up Your Development Environment | |
| |
| |
Debugging Kernel-Level Drivers | |
| |
| |
Device Driver Internals | |
| |
| |
Simple Usermode Test Driver | |
| |
| |
Creating a Kernel Driver | |
| |
| |
Other Sources of Information | |
| |
| |
Summary | |
| |
| |
| |
Finishing Touches | |
| |
| |
| |
Package Management | |
| |
| |
Understanding tar Files | |
| |
| |
Understanding the install Command | |
| |
| |
Understanding the Red Hat Package Manager (RPM) | |
| |
| |
The File Hierarchy Standard | |
| |
| |
Summary | |
| |
| |
| |
Documentation | |
| |
| |
Writing Man Pages | |
| |
| |
Using DocBook | |
| |
| |
Summary | |
| |
| |
| |
Licensing | |
| |
| |
Introduction and Disclaimer | |
| |
| |
The MIT/X-Style License | |
| |
| |
The BSD-Style License | |
| |
| |
The Artistic License | |
| |
| |
The GNU General Public Licenses | |
| |
| |
The Open Source Definition | |
| |
| |
Summary | |
| |
| |
Index | |