AminetAminet
Search:
84782 packages online
About
Recent
Browse
Search
Upload
Setup
Services

comm/tcp/ifcheck.lha

Mirror:Random
Showing: m68k-amigaos iconppc-amigaos iconppc-morphos iconi386-aros iconi386-amithlon iconppc-warpup iconppc-powerup icongeneric icon
No screenshot available
Short:Check status of SANA-II interface under AmiTCP
Author: scampi at dial.pipex.com (Mathew Hendry)
Uploader:scampi dial pipex com (Mathew Hendry)
Type:comm/tcp
Version:0.0
Architecture:m68k-amigaos
Date:1997-02-01
Download:comm/tcp/ifcheck.lha - View contents
Readme:comm/tcp/ifcheck.readme
Downloads:766

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)


Contents of comm/tcp/ifcheck.lha
 PERMSSN    UID  GID    PACKED    SIZE  RATIO     CRC       STAMP          NAME
---------- ----------- ------- ------- ------ ---------- ------------ -------------
[generic]                 5916    9176  64.5% -lh5- 372a Jan 30  1997 ifcheck
[generic]                 1467    5106  28.7% -lh5- c076 Jan 30  1997 ifcheck.c
[generic]                  626    1199  52.2% -lh5- 676f Jan 31  1997 ifcheck.readme
[generic]                  120     171  70.2% -lh5- cb28 Jan 30  1997 smakefile
---------- ----------- ------- ------- ------ ---------- ------------ -------------
 Total         4 files    8129   15652  51.9%            Feb  1  1997
Page generated in 0.03 seconds
Aminet © 1992-2024 Urban Müller and the Aminet team. Aminet contact address: <aminetaminet net>