summaryrefslogtreecommitdiff
path: root/src/db.h
diff options
context:
space:
mode:
authorPaul Moore <pmoore@redhat.com>2015-12-17 15:52:32 -0500
committerPaul Moore <paul@paul-moore.com>2016-02-09 08:32:15 -0500
commita4478ddcd4e3b34fcd9c526dcf54f0d79b33ac16 (patch)
treea5176dee025ce7d2432c4b367c21ad0ff8456cb8 /src/db.h
parentd32c3bfa4b07add90dcd04292eb4ba278dd103ba (diff)
downloadlibseccomp-a4478ddcd4e3b34fcd9c526dcf54f0d79b33ac16.tar.gz
db: make the individual db filter ops private
We really should operate only on filter collections so move all the individual DB filter operations out of api.c and into db.c. There are likely other changes that can now be done to further clean the code, but I'll leave that as future work. Signed-off-by: Paul Moore <pmoore@redhat.com>
Diffstat (limited to 'src/db.h')
-rw-r--r--src/db.h15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/db.h b/src/db.h
index bfd9333..e1950c8 100644
--- a/src/db.h
+++ b/src/db.h
@@ -167,7 +167,7 @@ struct db_filter_col {
int db_action_valid(uint32_t action);
struct db_filter_col *db_col_init(uint32_t def_action);
-void db_col_reset(struct db_filter_col *col, uint32_t def_action);
+int db_col_reset(struct db_filter_col *col, uint32_t def_action);
void db_col_release(struct db_filter_col *col);
int db_col_valid(struct db_filter_col *col);
@@ -181,16 +181,15 @@ int db_col_attr_get(const struct db_filter_col *col,
int db_col_attr_set(struct db_filter_col *col,
enum scmp_filter_attr attr, uint32_t value);
+int db_col_db_new(struct db_filter_col *col, const struct arch_def *arch);
int db_col_db_add(struct db_filter_col *col, struct db_filter *db);
int db_col_db_remove(struct db_filter_col *col, uint32_t arch_token);
-struct db_filter *db_init(const struct arch_def *arch);
-void db_reset(struct db_filter *db);
-void db_release(struct db_filter *db);
+int db_col_rule_add(struct db_filter_col *col,
+ bool strict, uint32_t action, int syscall,
+ unsigned int arg_cnt, const struct scmp_arg_cmp *arg_array);
-int db_syscall_priority(struct db_filter *db, int syscall, uint8_t priority);
-
-int db_rule_add(struct db_filter *db, uint32_t action, int syscall,
- struct db_api_arg *chain);
+int db_col_syscall_priority(struct db_filter_col *col,
+ int syscall, uint8_t priority);
#endif