=pod =head1 NAME B - Determine whether IP address(es) are members of an IPset =head1 SYNOPSIS rwsetmember [--count] [--quiet] PATTERN INPUT_SET... =head1 DESCRIPTION B finds an IP address or pattern in one or more IPset files, printing the name of the IPsets that contain the IP, and optionally counting the number of matches in each file. I can be a single IP address, a CIDR block, or any IP range expressed in the same form as accepted by B. If an I is not given on the command line, B will attempt to read an IPset from the standard input. =head1 OPTIONS Option names may be abbreviated if the abbreviation is unique or is an exact match for an option. A parameter to an option may be specified as B<--arg>=I or B<--arg> I, though the first form is required for options that take optional parameters. =over 4 =item B<--count> Follow each set filename by a colon character and the number of pattern matches in the IPset. Files that do not match will still be printed, but with a zero match count. =item B<--quiet> Produce no standard output. The exit status of the program (see below) should be checked to determine whether any files matched. =back =head1 EXAMPLES To quickly check whether a single set file contains an address (check the exit status): $ rwsetmember -q 192.168.1.1 file.set To display which of several set files (if any) match a given IP address: $ rwsetmember 192.168.1.1 *.set To display the same, but with counts from each file: $ rwsetmember -c 192.168.1.1 *.set To find all sets that contain addresses in the 10.0.0.0/8 subnet: $ rwsetmember 10.0.0.0/8 *.set To find files containing any IP address that ends with a number between 1 and 10 (this will use a lot of memory): $ rwsetmember x.x.x.1-10 *.set =head1 EXIT STATUS B exits with status code 0 if any file matched the pattern, or 1 if there were no matches or if there was an error with the input. =head1 SEE ALSO B, B, B =cut $SiLK: rwsetmember.pod 6904 2007-04-14 13:00:08Z mthomas $ Local Variables: mode:text indent-tabs-mode:nil End: