summaryrefslogtreecommitdiff
path: root/src/gen_bpf.h
diff options
context:
space:
mode:
authorPaul Moore <pmoore@redhat.com>2012-03-06 18:16:39 -0500
committerPaul Moore <pmoore@redhat.com>2012-03-09 11:46:50 -0500
commitfc033fb661fc2285b098ad9c444672ad9a62d0bc (patch)
tree94cb13318c116c448ac61f3c45c8915fcc0d27be /src/gen_bpf.h
parent7092a0d72e0de8b82269f9f3b0a2cb313aa002dc (diff)
downloadlibseccomp-fc033fb661fc2285b098ad9c444672ad9a62d0bc.tar.gz
arch: introduce a single place for all the machine dependent code
Signed-off-by: Paul Moore <pmoore@redhat.com>
Diffstat (limited to 'src/gen_bpf.h')
-rw-r--r--src/gen_bpf.h16
1 files changed, 2 insertions, 14 deletions
diff --git a/src/gen_bpf.h b/src/gen_bpf.h
index 9896574..af183b8 100644
--- a/src/gen_bpf.h
+++ b/src/gen_bpf.h
@@ -24,6 +24,7 @@
#include <inttypes.h>
+#include "arch.h"
#include "db.h"
/* XXX - should we just use "sock_filter" in linux/filter.h? the name is
@@ -42,21 +43,8 @@ struct bpf_program {
#define BPF_PGM_SIZE(x) \
((x)->blk_cnt * sizeof(*((x)->blks)))
-struct bpf_arch {
- enum {
- _BPF_WLEN_UNSPEC,
- _BPF_WLEN_32,
- _BPF_WLEN_64,
- } word_len;
- enum {
- _BPF_ENDIAN_UNSPEC,
- _BPF_ENDIAN_LITTLE,
- _BPF_ENDIAN_BIG,
- } endian;
-};
-
struct bpf_program *gen_bpf_generate(const struct db_filter *db,
- const struct bpf_arch *arch);
+ const struct arch_def *arch);
void gen_bpf_destroy(struct bpf_program *program);
#endif