#!/usr/local/bin/perl
#
# $Header: /home/vikas/src/nocol/perlnocol/RCS/testlog,v 1.1 1999/11/01 14:26:31 vikas Exp $
#
# This test program is to check if the Socket routines in nocollib.pl
# is working.
#
# USAGE:
#	./testlog [num of packets]
# Run this and see if anything is being logged to 'noclogd' at the
# info level.
#
## global variables required in the nocollib.pl library
$varname = 'Packet';
$varunits= 'Count' ;
$sender = 'TESTlog';

############################
#push (@INC, '/nocol/bin');
require "nocollib.pl" ;

$debug = 5;				# set to 1 for debugging output
$libdebug = 5;				# set to 1 for debugging output
$prognm = $0;				# save program name

local($item) = 1;

&init_event ('TestSite', 'TestAddr', $item); # fill in initial values

if ($#ARGV >= 0) {  $count = int($ARGV[0]); }
else { $count = 1; }

while ($count > 0)
{
  print "$count ";
  $varvalue{$item} = $count;
  &eventlog(&packevent($item));
  --$count;
}

print "\n";
print "Did these packets get logged by noclogd at the  info  level ?\n"; 
