/******************************************************************
 * INSTALL file for ifchk.                                        *
 *                                                                *
 * Copyright (C) 2002, 2003 Joshua Birnbaum <engineer@noorg.org>. *
 * All Rights Reserved.                                           *
 ******************************************************************/


Please read the NOTES section below prior to compilation.


Building ifchk.
--------------

Building ifchk should be straightforward on most systems.

% cd <ifchk dist directory>
% make ifchk
% mv ifchk /to/somewhere/suitable/in/your/$PATH
% mv ifchk.1 /to/somewhere/suitable/in/your/$MANPATH 

To clean out the ifchk build directory.

% cd <ifchk dist directory>
% make clean


NOTES.
-----

* ifchk compilation requires an ANSI C compiler.
  Makefile assumes the use of vendor cc so if you are using gcc then
  reset CC in Makefile to 'gcc'. Also check that the -n32 and -mips3
  flags are supported by gcc. Manual compilation is also an option.

* KBUFSZ in ifchk.h (line 70) sets the size of the buffer that holds
  the list of configured interfaces present on the system as returned
  by the kernel.
  If KBUFSZ is too small, this list can be truncated or ifchk will
  fail to complete and will exit with status 1. In the latter case,
  program failure is indicated by the output of the following:

  ifchk: *** constant KBUFSZ (ifchk.h:70) too small ***

  If this occurs, reset the KBUFSZ value using the following formula:

  (32*num_interfaces) + 1

  where num_interfaces is the total number of interfaces present on
  the system as reported under the 'Name' column by netstat -in.
  However, the default size of 1024 bytes should suffice for most
  systems.

* Running under IRIX 6.2 requires the installation of kernel and libc
  rollup patches to resolve calls to the sysctl() facility. The most
  recent patch distributions are:

  Patch SG0003704: 6.2 all platform kernel rollup
  Patch SG0003771: Irix 6.2 libc rollup + Y2K fixes + MIPS ABI
 
  Older revisions of the above distributions might also work. YMMV.
  Both of the above distributions are available from patches.sgi.com.
  sysctl() is provided by default in IRIX 6.3, 6.4 and 6.5.

  Additionally, support for n32 binaries is not part of the default
  IRIX 6.2 installation. This can cause problems during ifchk comp-
  ilation (Makefile generates an n32 binary) and/or execution on
  systems without this n32 support. If problems occur, you may:

  1. Install n32 libraries from the IRIX 6.2 media to support n32
     binaries. Subsystems to install (if memory serves) are:

     c_eoe.sw32.lib:        Standard Execution Libraries (N32)
     compiler_eoe.sw32.lib: Base Execution Libraries (N32)

     (Confirmation that these are the correct subsystems would be
      appreciated).

  2. Or, instead of installing the above subsystems, generate an
     o32 binary via manual compilation:

     IRIS 1% cc -g -o ifchk ifchk.c

     or if you run gcc:

     IRIS 1% gcc -g -o ifchk ifchk.c

* ifchk was written, debugged and initially tested under IRIX 6.2.
  Additional testing was done under IRIX 6.2, 6.3 and 6.5.x. 
  Testing under IRIX 6.4 is still outstanding (though I feel that 
  ifchk will build and run under it).
  Please mail me at engineer@noorg.org if you have access to an
  IRIX 6.4 system and would like to participate in testing or if
  you can confirm building and running ifchk on IRIX 6.4. 

  I don't think IRIX 5.3 will support ifchk execution because of
  the lack, I believe, of the sysctl() facility.

REPORTING BUGS.
--------------

* When reporting bugs or problems related to ifchk, please include
  uname (-a or -aR), hinv and C compiler revision output. Please
  also include the version of ifchk in question. This information
  can be sent to me at engineer@noorg.org as can comments and
  suggestions.


Enjoy.

-Josh Birnbaum <engineer@noorg.org>.

