# 
# Copyright(C) 1996, 1997 Network Flight Recorder, Inc. 
# All rights reserved. 
#       
# Use and distribution of this software and its source code 
# are governed by the terms and conditions of the 
# Network Flight Recorder Software License ("LICENSE.TXT") 
# 
 


#
# simple test to see if the basic types of 
# v4 host and v4 net work a little bit.
#


net=[ 206.252.6.0:255.255.255.0, 141.211.128.0:255.255.255.0 ];

func test {
    #
    # Test to see if the first argument passed in 
    # matches the global variable net.
    #
    if ($1 inside net) {
	    echo("host:", $1, " in net: ", net, "\n" );
    } else {
	    echo("host:", $1, " not in net: ", net, "\n" );
    }
}

test( 206.252.6.66 );		# this should match
test( 206.252.6.0 );		# this should match
test( 206.252.6.255 );		# this should match
test( 206.252.7.66 );		# this shouldn't match
test( 206.252.5.66 );		# this shouldn't match
test( 141.211.128.1 );		# this should match
test( 192.211.128.1 );		# this shouldn't match
