]>
git.ipfire.org Git - thirdparty/bird.git/blob - filter/f-util.c
2 * Filters: utility functions
4 * Copyright 1998 Pavel Machek <pavel@ucw.cz>
6 * Can be freely distributed and used under the terms of the GNU GPL.
12 #include <sys/signal.h>
14 #include "nest/bird.h"
15 #include "lib/lists.h"
16 #include "lib/resource.h"
17 #include "lib/socket.h"
18 #include "nest/route.h"
19 #include "nest/protocol.h"
20 #include "nest/iface.h"
21 #include "conf/conf.h"
22 #include "filter/filter.h"
24 struct f_instruction
*last_func
= NULL
;
27 interpret(struct f_instruction
*what
)
34 interpret(what
->arg1
);
35 interpret(what
->arg2
);
39 sym
->aux
= (int) what
->arg2
;
44 case SYM_VARIABLE_INT
:
45 printf( "Printing: %d\n", sym
->aux
);
48 printf( "Unknown type passed to print\n" );
53 printf( "DEBUGGING PRINT\n" );
56 printf( "No operation\n" );
59 interpret(what
->next
);
63 filters_postconfig(void)
66 printf( "No function defined\n" );
72 struct f_instruction
*
75 struct f_instruction
* ret
;
76 ret
= cfg_alloc(sizeof(struct f_instruction
));
78 ret
->arg1
= ret
->arg2
= ret
->next
= NULL
;
83 f_run(struct symbol
*filter
, struct rte
*rtein
, struct rte
**rteout
)
85 struct f_instruction
*inst
;
86 debug( "Running filter `%s'...", filter
->name
);