Improve type checking of records, addresses BIT-1159.

This commit is contained in:
Jon Siwek 2014-03-20 13:54:26 -05:00
parent 0f3ed1a553
commit b1fd161274
13 changed files with 118 additions and 58 deletions

View file

@ -4,8 +4,8 @@
# This is loaded by default.
#@load base/utils/conn-ids
global c: conn_id = [ $orig_h = 10.0.0.100, $orig_p = 10000,
$resp_h = 10.0.0.200, $resp_p = 20000 ];
global c: conn_id = [ $orig_h = 10.0.0.100, $orig_p = 10000/tcp,
$resp_h = 10.0.0.200, $resp_p = 20000/tcp ];
print id_string(c);
print reverse_id_string(c);

View file

@ -11,20 +11,20 @@ global local_ip = 10.0.0.100;
global remote_ip = 192.168.1.100;
global local2local: conn_id = [
$orig_h = 10.0.0.100, $orig_p = 10000,
$resp_h = 10.0.0.200, $resp_p = 20000 ];
$orig_h = 10.0.0.100, $orig_p = 10000/tcp,
$resp_h = 10.0.0.200, $resp_p = 20000/tcp ];
global local2remote: conn_id = [
$orig_h = 10.0.0.100, $orig_p = 10000,
$resp_h = 192.168.1.100, $resp_p = 20000 ];
$orig_h = 10.0.0.100, $orig_p = 10000/tcp,
$resp_h = 192.168.1.100, $resp_p = 20000/tcp ];
global remote2local: conn_id = [
$orig_h = 192.168.1.100, $orig_p = 10000,
$resp_h = 10.0.0.100, $resp_p = 20000 ];
$orig_h = 192.168.1.100, $orig_p = 10000/tcp,
$resp_h = 10.0.0.100, $resp_p = 20000/tcp ];
global remote2remote: conn_id = [
$orig_h = 192.168.1.100, $orig_p = 10000,
$resp_h = 192.168.1.200, $resp_p = 20000 ];
$orig_h = 192.168.1.100, $orig_p = 10000/tcp,
$resp_h = 192.168.1.200, $resp_p = 20000/tcp ];
function test_host(ip: addr, h: Host, expect: bool)
{