File: expr.h

package info (click to toggle)
filtergen 0.12.8-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,924 kB
  • sloc: sh: 5,485; ansic: 4,268; yacc: 692; lex: 362; makefile: 165
file content (28 lines) | stat: -rw-r--r-- 458 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#ifndef __EXPR_H__
#define __EXPR_H__

enum expression = {
    EXP_AND, EXP_OR, EXP_NOT, EXP_PRED,
};

struct expr_s * {
  enum expression type;
};

enum action = {
    ACT_NONE, ACT_ACCEPT, ACT_REJECT, ACT_DROP,
};

/* rule is a boolean expression of filtering predicates -> action */
struct rule_s {
  struct expr_s *expr;
  enum action act;
  struct rule_s *next;
};

struct group_s {
  char *name;
  struct rule_s *rule_list;
};

#endif /* __EXPR_H__ */