/*******************************************************************
 * INSTALL file for ifchk.                                         *
 *                                                                 *
 * Copyright (C) 2002 - 2004 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 docs/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 gcc. If you are building with MIPSpro C
  from SGI, reset CC in Makefile to 'cc' and add '-n32' as the first
  argument to CFLAGS if your build/runtime environment supports the
  n32 ABI. You may also need to modify or remove '-mips3' from CFLAGS
  to suit your architecture. Manual compilation is also an option.

* KBUFSZ in ifchk.h (line 77) 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 message:

  ifchk: ERROR: constant KBUFSZ (ifchk.h:77:) 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/6.5.x.

  Additionally, support for n32 binaries is not part of the default
  IRIX 6.2 installation. This can cause problems during ifchk comp-
  ilation (if '-n32' is added to CFLAGS in Makefile) 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:

     % cc -g -o ifchk ifchk.c

     NOTE: o32 binary generation is only possible with MIPSpro C.
           gcc cannot generate o32 binaries (at least as of gcc
           version 3.3 from the fw_gcc inst subsystem available
           at freeware.sgi.com).

* 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>.
