static int GeoipMatchTest07(void) { /* Tests with IP of google DNS as US, and m.root-servers.net as japan */ return GeoipMatchTest("alert tcp any any -> any any (geoip:src,!ES,JP,US,UK,PT;sid:1;)", "8.8.8.8", "202.12.27.33"); /* Expected result 2 = NO match */ }
static int GeoipMatchTest03(void) { /* Tests with IP of google DNS as US, and m.root-servers.net as japan */ return GeoipMatchTest("alert tcp any any -> any any (geoip:dst,JP;sid:1;)", "8.8.8.8", "202.12.27.33"); /* Expected result 1 = match */ }
static int GeoipMatchTest01(void) { /* Tests with IP of google DNS as US for both src and dst IPs */ return GeoipMatchTest("alert tcp any any -> any any (geoip:US;sid:1;)", "8.8.8.8", "8.8.8.8"); /* Expected result 1 = match */ }