diff options
author | Pavel Machek <pavel@ucw.cz> | 1999-10-07 14:10:08 +0000 |
---|---|---|
committer | Pavel Machek <pavel@ucw.cz> | 1999-10-07 14:10:08 +0000 |
commit | 720d911d777f64872df923e102ebc509113885f0 (patch) | |
tree | 1f4b4e40aa83cee9be920b87390c2b3a75803a28 /filter/filter.c | |
parent | 4872cef4dfcadab405d0393a21f9136852d7b9c4 (diff) |
Added constants of type prefix and pair, added their printing
Diffstat (limited to 'filter/filter.c')
-rw-r--r-- | filter/filter.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/filter/filter.c b/filter/filter.c index aa0b9e96..d317fcc0 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 <stdio.h> @@ -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 ); } |