]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Finish moving of path matching. Use int_set_print from core for
authorPavel Machek <pavel@ucw.cz>
Mon, 17 Apr 2000 11:20:00 +0000 (11:20 +0000)
committerPavel Machek <pavel@ucw.cz>
Mon, 17 Apr 2000 11:20:00 +0000 (11:20 +0000)
printing community lists.

filter/filter.c
filter/filter.h

index 7fe902e9e6168313c536b5a676001240969fb1bc..267fa166f90c0292b9ba4874717b653feec76381 100644 (file)
@@ -20,6 +20,7 @@
 #include "nest/route.h"
 #include "nest/protocol.h"
 #include "nest/iface.h"
+#include "nest/attrs.h"
 #include "conf/conf.h"
 #include "filter/filter.h"
 
@@ -138,6 +139,7 @@ val_print(struct f_val v)
   case T_SET: tree_print( v.val.t ); PRINTF( "\n" ); break;
   case T_ENUM: PRINTF( "(enum %x)%d", v.type, v.val.i ); break;
   case T_PATH: as_path_format(v.val.ad, buf2, 1020); PRINTF( "(path %s)", buf2 ); break;
+  case T_CLIST: int_set_format(v.val.ad, buf2, 1020); PRINTF( "(clist %s)", buf2 ); break;
   case T_PATH_MASK: debug( "(pathmask " ); { struct f_path_mask *p = v.val.s; while (p) { debug("%d ", p->val); p=p->next; } debug(")" ); } break;
   default: PRINTF( "[unknown type %x]", v.type );
 #undef PRINTF
@@ -616,9 +618,6 @@ filter_same(struct filter *new, struct filter *old)
 }
 
 /* This should end up far away from here!
- *
- * FIXME: It should take struct adata *, not u8 * + length; but that makes it a little more difficult to test.
- * Or maybe both versions are usefull?
  */
 struct adata *
 comlist_add(struct linpool *pool, struct adata *list, u32 val)
index e45b5f3c2592226fb143a0a65ceabace35f4ae4a..4af9317526c8155044ae5788a85fd85ad5ff0e0d 100644 (file)
@@ -11,6 +11,7 @@
 
 #include "lib/resource.h"
 #include "lib/ip.h"
+#include "nest/attrs.h"
 
 struct f_inst {                /* Instruction */
   struct f_inst *next; /* Structure is 16 bytes, anyway */
@@ -39,12 +40,6 @@ struct prefix {
   /* If range then prefix must be in range (len >> 16 & 0xff, len >> 8 & 0xff) */
 };
 
-struct f_path_mask {
-  struct f_path_mask *next;
-  int val;
-};
-#define PM_ANY -1
-
 struct f_val {
   int type;
   union {