<tag><label id="print">print|printn <m/expr/ [<m/, expr.../]</tag>
Prints given expressions; useful mainly while debugging filters. The
<cf/printn/ variant does not terminate the line.
-
- <tag><label id="quitbird">quitbird</tag>
- Terminates BIRD. Useful when debugging the filter interpreter.
</descrip>
CF_DECLS
CF_KEYWORDS(FUNCTION, PRINT, PRINTN, UNSET, RETURN,
- ACCEPT, REJECT, ERROR, QUITBIRD,
+ ACCEPT, REJECT, ERROR,
INT, BOOL, IP, TYPE, PREFIX, RD, PAIR, QUAD, EC, LC,
SET, STRING, BGPMASK, BGPPATH, CLIST, ECLIST, LCLIST,
IF, THEN, ELSE, CASE,
;
break_command:
- QUITBIRD { $$ = F_QUITBIRD; }
- | ACCEPT { $$ = F_ACCEPT; }
+ ACCEPT { $$ = F_ACCEPT; }
| REJECT { $$ = F_REJECT; }
| ERROR { $$ = F_ERROR; }
;
FID_MEMBER(enum filter_return, fret, f1->fret != f2->fret, "%s", filter_return_str(item->fret));
switch (whati->fret) {
- case F_QUITBIRD:
- die( "Filter asked me to die" );
case F_ACCEPT: /* Should take care about turning ACCEPT into MODIFY */
case F_ERROR:
case F_REJECT: /* Maybe print complete route along with reason to reject route? */
F_ACCEPT, /* Need to preserve ordering: accepts < rejects! */
F_REJECT,
F_ERROR,
- F_QUITBIRD,
};
static inline const char *filter_return_str(const enum filter_return fret) {
FRS(F_ACCEPT);
FRS(F_REJECT);
FRS(F_ERROR);
- FRS(F_QUITBIRD);
#undef FRS
default: bug("This shall not happen");
}