# 
# 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") 
# 
 


endPoints = listadd( NULL,
        [ 1.2.3.4, 80 ], [4.3.2.1, 81], [9.8.7.6, 9999] );


func inSide {
    foreach $n inside ($1) {
	if ($2 == $n) {
		return 1;
	}
    }
    return 0;
}

echo( "inSide( endPoints, listadd( none, 1.2.3.4, 80) )=> ",
	inSide( endPoints, listadd( none, 1.2.3.4, 80) ), "\n" );

echo( "inSide( endPoints, listadd( none, 1.2.3.4, 81 ) )=> ",
	inSide( endPoints, listadd( none, 1.2.3.4, 81 ) ), "\n" );



echo( "listadd( none, 1.2.3.4, 80) inside endPoints => ",
	 listadd( none, 1.2.3.4, 80) inside endPoints, "\n" );

echo( "listadd( none, 1.2.3.4, 81 ) inside endPoints)=> ",
	listadd( none, 1.2.3.4, 81 ) inside endPoints, "\n" );


