summaryrefslogtreecommitdiffstats
path: root/filter/filter.c
diff options
context:
space:
mode:
authorPavel Machek <pavel@ucw.cz>1999-10-07 16:10:08 +0200
committerPavel Machek <pavel@ucw.cz>1999-10-07 16:10:08 +0200
commit720d911d777f64872df923e102ebc509113885f0 (patch)
tree1f4b4e40aa83cee9be920b87390c2b3a75803a28 /filter/filter.c
parent4872cef4dfcadab405d0393a21f9136852d7b9c4 (diff)
downloadbird-720d911d777f64872df923e102ebc509113885f0.tar
bird-720d911d777f64872df923e102ebc509113885f0.zip
Added constants of type prefix and pair, added their printing
Diffstat (limited to 'filter/filter.c')
-rw-r--r--filter/filter.c4
1 files changed, 4 insertions, 0 deletions
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 <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 );
}