The usrinclude directories


The /usr/include directories

On most UNIX systems, you will find a /usr/include directory. On some UNIX systems, you may need to install a programmer's environment or package to see this directory. On others, it is part of the core UNIX system. On Sun's Solaris 2 systems, the majority of the /usr/include files are in the SUNWhea package.

Within the /usr/include directory, you will find several subdirectories. Note that each flavor of UNIX that you encounter may differ slightly here. On a Solaris 2.3 system, you will find a directory structure as follows . Each of these directories and subdirectories contains header files.

Table 10-1. Subdirectories of /usr/include
 /usr/include     ./admin     ./arpa     ./bsm     ./des     ./inet     ./kerberos     ./net     ./netinet     ./nfs     ./protocols     ./rpc     ./rpcsvc     ./security     ./sys        ./debug        ./fpu        ./fs        ./proc        ./scsi           ./adapters           ./conf           ./generic           ./impl           ./targets     ./vm 

Let's briefly talk about what might be found in each of these directories.

/usr/include

If /usr/include were to have a miscellaneous area, this would be it. Anything that doesn't fit into one of the more specialized subdirectories described below will be found here. It is here that we find header files commonly used by the programmers not writing kernel code, network software, or device drivers.

/usr/include/admin

The header files here are all related to the administration framework products.

/usr/include/arpa

Here we find the header files relating to ftp , telnet , and other Advanced Research Project Agency (ARPA) products.

/usr/include/bsm

This directory contains the header files relating to the Basic Security Module. Here we find among other things, information about security auditing policies, audit queue controls, the various audit record structures, and the list of auditable events.

/usr/include/des

This directory contains the header files relating to the Data Encryption Set software.

/usr/include/inet

Here is where we find some of the header information relating to the Internet Protocol software.

/usr/include/kerberos

Yes, you guessed it! This is where the header files for Kerberos live.

/usr/include/net

This is where the low-level network interface header files can be found. Information about routing, the Address Resolution Protocol, and address families is tucked away here.

/usr/include/netinet

Here is where we find more information about the Internet Protocols. This includes:

  • Address Resolution Protocol (ARP)

  • Distance-Vector Multicast Routine Protocol (DVMRP)

  • Internet Control Message Protocol (ICMP)

  • Internet Group Management Protocol (IGMP)

  • Internet Protocol (IP)

  • Transmission Control Protocol (TCP)

  • User Data Protocol (UDP)

/usr/include/nfs

If you're interested in digging through the Network File System structures, this is where you will find NFS information. Export and mount option flags are found here, as well as various NFS limits, such as the maximum length of an NFS pathname. This is the directory we reference when looking at structures used by NFS.

/usr/include/protocols

This directory contains a few header files that relate to the routed , rwhod , timed , dump , and restore programs.

/usr/include/rpc

This is where we find information about the Remote Procedure Call software, keyserv , and more on Kerberos and DES authentication in relation to RPC. Also found here is information about boot parameters, more on exported directories, header files relating to the Port Mapper Protocol, and information about External Data Representation (XDR).

/usr/include/rpcsvc

This directory contains the header files for software serviced by RPC. Software represented here includes autofs, NFS, NIS+, and NIS (formerly known as YP).

/usr/include/security

Header files relating to the Pluggable Authentication Module (PAM) interface software are kept here.

/usr/include/sys

This directory contains the majority of the kernel header files as well as several subdirectories.

/usr/include/sys/debug

The Kernel Absolute DeBugger ( kadb ) is compiled using the header files found here.

/usr/include/sys/fpu

Everything you might need to know about the Floating-Point Unit structures, function, and variables is kept here.

/usr/include/sys/fs

Valuable information about the various local file systems exists in this directory. On Solaris 2.3, this information includes:

  • autofs

  • cachefs

  • High Sierra File System (HSFS)

  • Loopback File System (LOFS)

  • PC (MS-DOS ) Compatible File System (PCFS)

  • swapfs

  • tmpfs

  • UNIX File System (UFS)

/usr/include/sys/proc

Here is where we find the header information regarding the /proc file system.

/usr/include/sys/scsi

A few generalized and common header files exist here; the subdirectories listed below contain more specific information relating to the Small Computer System Interface (SCSI) hardware and supporting software.

/usr/include/sys/scsi/adapters

Information about the Enhanced SCSI Processor (ESP) chip is found here. This information includes register definitions, register manipulation macros, and clocking information for the chip. ESP options used in tuning ESP devices can also be found in this directory.

/usr/include/sys/scsi/conf

Global SCSI device configuration information is maintained here. This directory is also where we find the SCSI device structure.

/usr/include/sys/scsi/generic

Within this directory are the header files that define and describe standard SCSI command definitions, direct access mode operations, message codes, and other information from the SCSI specification.

/usr/include/sys/scsi/impl

This directory contains the header files that accompany each UNIX vendor's specific implementation of the standard SCSI interface.

/usr/include/sys/scsi/targets

Header information specific to SCSI targets is found here, including data about the SCSI disk (sd) and SCSI tape (st) devices.

/usr/include/vm

The header files in this directory define aspects of the virtual memory system. Here is where you will read about anonymous memory, how address space is structured, how hardware address translation is managed, and how virtual memory pages are handled.

CAUTION! The information in these / usr/include files is considered a part of the source code and may be changed dramatically in later releases without warning. Use the information in these files for debugging and for understanding how the system is structured, but don't depend on it remaining the same. Programmers who write their code based only on data in the header files should expect severe porting problems.



PANIC. UNIX System Crash Dump Analysis Handbook
PANIC! UNIX System Crash Dump Analysis Handbook (Bk/CD-ROM)
ISBN: 0131493868
EAN: 2147483647
Year: 1994
Pages: 289
Authors: Chris Drake

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net