diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2013-02-17 20:22:18 +0100 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2013-02-17 20:22:18 +0100 |
commit | a32e331a11034403df2e26807df9195435b6fb8a (patch) | |
tree | 824ab61d16b2bec25a47a826f69dc9d705011e79 /utils.h | |
parent | 8fee8f9c520c58d07772cc6bd8f65d9eb1776a56 (diff) | |
download | firewall3-a32e331a11034403df2e26807df9195435b6fb8a.tar.gz |
separate state and lock files, use state file information to purge ipsets
Diffstat (limited to 'utils.h')
-rw-r--r-- | utils.h | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -32,7 +32,8 @@ #include <uci.h> -#define FW3_STATEFILE "/var/run/fw3.lock" +#define FW3_STATEFILE "/var/run/fw3.state" +#define FW3_LOCKFILE "/var/run/fw3.lock" void warn_elem(struct uci_element *e, const char *format, ...); void warn(const char *format, ...); @@ -71,8 +72,11 @@ void fw3_pr(const char *fmt, ...); bool fw3_has_table(bool ipv6, const char *table); -bool fw3_check_statefile(bool test_exists); -void fw3_remove_statefile(void); -void fw3_close_statefile(void); +bool fw3_lock(void); +void fw3_unlock(void); + +bool fw3_has_state(void); +void fw3_write_state(void *state); +void fw3_remove_state(void); #endif |