Short:    Check status of SANA-II interface under AmiTCP
Author:   scampi@dial.pipex.com (Mathew Hendry)
Uploader: scampi@dial.pipex.com (Mathew Hendry)
Version:  0.0
Type:     comm/tcp

Description
-----------

This simple tool allows one to check the status (up or down) of a SANA-II
network interface. It opens an AmiTCP socket to gather information, so AmiTCP
must be active, or any interface (whether up or not) will be reported as being
down.

To ease use in scripts, ifcheck will set a return code of 5 (WARN) if the
specified interface is down (or AmiTCP is inactive), and a return code of 0 (no
error) if the interface is up.

Source code in C is included. ifcheck was compiled with SAS/C 6.57, using the
AmiTCP version 4.3 SDK.


Requirements
------------

AmigaOS version 37 or higher
AmiTCP version 3.0 or higher


Example
-------

.key ARTICLE/A
.bra {
.ket }

; simple script to post / spool mail

If EXISTS {ARTICLE}
    ; check whether we are online
    ifcheck cslip0 > NIL:
    If NOT WARN
        send_mail {ARTICLE}
        empty_spool
    Else
        spool_mail {ARTICLE}
    EndIf
EndIf


Author
------

Mathew Hendry (scampi@dial.pipex.com, mathew.hendry@vissci.demon.co.uk)


============================= Archive contents =============================

Original  Packed Ratio    Date     Time    Name
-------- ------- ----- --------- --------  -------------
    9176    5916 35.5% 30-Jan-97 21:18:36  ifcheck
    5106    1467 71.2% 30-Jan-97 21:18:20  ifcheck.c
    1199     626 47.7% 31-Jan-97 23:24:50  ifcheck.readme
     171     120 29.8% 30-Jan-97 20:45:40  smakefile
-------- ------- ----- --------- --------
   15652    8129 48.0% 01-Feb-97 01:31:04   4 files