*
* Can be freely distributed and used under the terms of the GNU GPL.
*
- FIXME (nonurgent): define keyword
- FIXME (for BGP): whole system of paths, path ~ string, path.prepend(), path.originate
- FIXME: create community lists
- FIXME: IP addresses in ipv6
-
-
- FIXME: check messages for \n at the end
*/
CF_HDR
| type SET {
switch ($1) {
default:
- cf_error( "You can not create sets of this type\n" );
+ cf_error( "You can not create sets of this type" );
case T_INT: case T_IP: case T_PREFIX: case T_PAIR:
}
$$ = $1 | T_SET;
| cmd cmds {
if ($1) {
if ($1->next)
- bug("Command has next already set\n");
+ bug("Command has next already set");
$1->next = $2;
$$ = $1;
} else $$ = $2;
$$ = f_new_inst();
DBG( "Ook, we'll set value\n" );
if (($1->class & ~T_MASK) != SYM_VARIABLE)
- cf_error( "You may only set variables, and this is %x.\n", $1->class );
+ cf_error( "You may only set variables, and this is %x.", $1->class );
$$->code = 's';
$$->a1.p = $1;
$$->a2.p = $3;
#define CMP_ERROR 999
+struct adata *
+adata_empty(struct linpool *pool)
+{
+ struct adata *res = lp_alloc(pool, sizeof(struct adata));
+ res->length = 0;
+ return res;
+}
+
static int
pm_path_compare(struct f_path_mask *m1, struct f_path_mask *m2)
{
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;
+ case T_PATH_MASK: debug( "(pathmask " ); { struct f_path_mask *p = v.val.path_mask; while (p) { debug("%d ", p->val); p=p->next; } debug(")" ); } break;
default: PRINTF( "[unknown type %x]", v.type );
#undef PRINTF
}
res.val.ad = e->u.ptr;
break;
default:
- bug("Unknown type in e,a\n");
+ bug("Unknown type in e,a");
}
}
break;
v1.type = T_VOID;
t = find_tree(what->a2.p, v1);
if (!t) {
- debug( "No else statement?\n ");
+ debug( "No else statement?\n");
break;
}
}
return 0;
return i_same(new->root, old->root);
}
-
-struct adata *
-adata_empty(struct linpool *pool)
-{
- struct adata *res = lp_alloc(pool, sizeof(struct adata));
- res->length = 0;
- return res;
-}
struct f_inst *f_new_inst(void);
struct f_inst *f_new_dynamic_attr(int type, int f_type, int code); /* Type as core knows it, type as filters know it, and code of dynamic attribute */
struct f_tree *f_new_tree(void);
+struct f_inst *f_generate_complex(int operation, int operation_aux, struct f_inst *dyn, struct f_inst *argument);
struct f_tree *build_tree(struct f_tree *);
struct f_tree *find_tree(struct f_tree *t, struct f_val val);