From 720d911d777f64872df923e102ebc509113885f0 Mon Sep 17 00:00:00 2001 From: Pavel Machek Date: Thu, 7 Oct 1999 14:10:08 +0000 Subject: Added constants of type prefix and pair, added their printing --- filter/filter.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'filter/filter.c') diff --git a/filter/filter.c b/filter/filter.c index aa0b9e9..d317fcc 100644 --- a/filter/filter.c +++ b/filter/filter.c @@ -6,6 +6,8 @@ * Can be freely distributed and used under the terms of the GNU GPL. * * FIXME: local namespace for functions + * + * Notice that pair is stored as integer: first << 16 | second */ #include @@ -99,6 +101,8 @@ val_print(struct f_val v) case T_INT: PRINTF( "%d ", v.val.i ); break; case T_STRING: PRINTF( "%s", v.val.s ); break; case T_IP: PRINTF( "%I", v.val.ip ); break; + case T_PREFIX: PRINTF( "%I/%d", v.val.px.ip, v.val.px.len ); break; + case T_PAIR: PRINTF( "(%d,%d)", v.val.i >> 16, v.val.i & 0xffff ); break; case T_SET: tree_print( v.val.t ); PRINTF( "\n" ); break; default: PRINTF( "[unknown type %x]", v.type ); } -- cgit v1.2.3