+ int ARG = 1;
+ // Check for -fN to set FADE
+ if ( ARG < argc && strncmp( argv[ ARG ], "-d", 2 ) == 0 ) {
+ if ( sscanf( argv[ ARG ]+2, "%d", &DELAY ) != 1 ) {
+ die( "Missing/bad delay value" );
+ }
+ fprintf( stdout, "Delay is %d seconds between reports\n", DELAY );
+ ARG++;
+ }
+ if ( ARG < argc && strncmp( argv[ ARG ], "-f", 2 ) == 0 ) {
+ if ( sscanf( argv[ ARG ]+2, "%d", &FADE ) != 1 ) {
+ die( "Missing/bad fade value" );
+ }
+ fprintf( stdout, "Fading %d bytes before reports\n", FADE );
+ ARG++;
+ }
+ if ( ARG < argc && strncmp( argv[ ARG ], "-n", 2 ) == 0 ) {
+ if ( sscanf( argv[ ARG ]+2, "%d", &WORST ) != 1 ) {
+ die( "Missing/bad number to display" );
+ }
+ fprintf( stdout, "Displaying at most %d lines in reports\n", WORST );
+ ARG++;
+ }
+ if ( ARG < argc && strncmp( argv[ ARG ], "-i", 2 ) == 0 ) {
+ char *filename = argv[ ARG ] + 2;
+ if ( (*filename) == 0 ) {
+ die( "Missing/bad ignore filename" );
+ }
+ read_ignore_file( filename );
+ fprintf( stdout, "ignoring ip prefixes from %s\n", filename );
+ ARG++;
+ }
+ if ( ARG >= argc ) {