clear in_list flag FOR each line in the data file IF line matches first line of a list THEN extract IP save IP as source set in_list flag ELSE IF in_list flag set THEN SWITCH line CASE line matches second list line ignore it CASE line matches list-address save addresses, indexed to current source CASE default (i.e. no longer in list) clear in_list flag ENDSWITCH ENDIF ENDELSE ENDFOR