projects
/
project
/
firewall3.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
defaults: disable drop_invalid by default
[project/firewall3.git]
/
utils.h
diff --git
a/utils.h
b/utils.h
index
3573e14
..
166ac26
100644
(file)
--- a/
utils.h
+++ b/
utils.h
@@
-1,7
+1,7
@@
/*
* firewall3 - 3rd OpenWrt UCI firewall implementation
*
/*
* firewall3 - 3rd OpenWrt UCI firewall implementation
*
- * Copyright (C) 2013 Jo-Philipp Wich <jo
w@openwrt.org
>
+ * Copyright (C) 2013 Jo-Philipp Wich <jo
@mein.io
>
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@
-28,6
+28,8
@@
#include <sys/stat.h>
#include <sys/wait.h>
#include <sys/file.h>
#include <sys/stat.h>
#include <sys/wait.h>
#include <sys/file.h>
+#include <sys/types.h>
+#include <ifaddrs.h>
#include <libubox/list.h>
#include <uci.h>
#include <libubox/list.h>
#include <uci.h>
@@
-69,6
+71,9
@@
void info(const char *format, ...);
(1<<FW3_TABLE_MANGLE)|(1<<FW3_TABLE_RAW))))
(1<<FW3_TABLE_MANGLE)|(1<<FW3_TABLE_RAW))))
+void * fw3_alloc(size_t size);
+char * fw3_strdup(const char *s);
+
const char * fw3_find_command(const char *cmd);
bool fw3_stdout_pipe(void);
const char * fw3_find_command(const char *cmd);
bool fw3_stdout_pipe(void);
@@
-88,17
+93,14
@@
void fw3_write_statefile(void *state);
void fw3_free_object(void *obj, const void *opts);
void fw3_free_object(void *obj, const void *opts);
+void fw3_free_list(struct list_head *head);
+
+bool fw3_hotplug(bool add, void *zone, void *device);
-struct fw3_rule_spec {
- int family;
- int table;
- int flag;
- const char *format;
-};
+int fw3_netmask2bitlen(int family, void *mask);
-bool fw3_pr_rulespec(int table, int family, uint32_t *flags, uint32_t mask,
- const struct fw3_rule_spec *r, const char *fmt, ...);
+bool fw3_bitlen2netmask(int family, int bits, void *mask);
-
bool fw3_hotplug(bool add, void *zone, void *devic
e);
+
void fw3_flush_conntrack(void *zon
e);
#endif
#endif