aboutsummaryrefslogtreecommitdiff
path: root/sys/netpfil/ipfw/ip_fw_table_value.c
diff options
context:
space:
mode:
authorAndrey V. Elsukov <ae@FreeBSD.org>2016-04-14 22:51:23 +0000
committerAndrey V. Elsukov <ae@FreeBSD.org>2016-04-14 22:51:23 +0000
commit2acdf79f5397a4bb7bfde3956a878a1956e0abfe (patch)
tree512be6899fba595cdca751948cdd2a64924b465a /sys/netpfil/ipfw/ip_fw_table_value.c
parent13694b35e1e1e105655b4269939bfd7c8d46b469 (diff)
downloadsrc-2acdf79f5397a4bb7bfde3956a878a1956e0abfe.tar.gz
src-2acdf79f5397a4bb7bfde3956a878a1956e0abfe.zip
Add External Actions KPI to ipfw(9).
It allows implementing loadable kernel modules with new actions and without needing to modify kernel headers and ipfw(8). The module registers its action handler and keyword string, that will be used as action name. Using generic syntax user can add rules with this action. Also ipfw(8) can be easily modified to extend basic syntax for external actions, that become a part base system. Sample modules will coming soon. Obtained from: Yandex LLC Sponsored by: Yandex LLC
Notes
Notes: svn path=/head/; revision=298016
Diffstat (limited to 'sys/netpfil/ipfw/ip_fw_table_value.c')
-rw-r--r--sys/netpfil/ipfw/ip_fw_table_value.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/netpfil/ipfw/ip_fw_table_value.c b/sys/netpfil/ipfw/ip_fw_table_value.c
index a196b030ebf0..7e2f5cb8f746 100644
--- a/sys/netpfil/ipfw/ip_fw_table_value.c
+++ b/sys/netpfil/ipfw/ip_fw_table_value.c
@@ -58,9 +58,10 @@ __FBSDID("$FreeBSD$");
#include <netpfil/ipfw/ip_fw_private.h>
#include <netpfil/ipfw/ip_fw_table.h>
-static uint32_t hash_table_value(struct namedobj_instance *ni, void *key,
+static uint32_t hash_table_value(struct namedobj_instance *ni, const void *key,
+ uint32_t kopt);
+static int cmp_table_value(struct named_object *no, const void *key,
uint32_t kopt);
-static int cmp_table_value(struct named_object *no, void *key, uint32_t kopt);
static int list_table_values(struct ip_fw_chain *ch, ip_fw3_opheader *op3,
struct sockopt_data *sd);
@@ -87,14 +88,14 @@ struct vdump_args {
static uint32_t
-hash_table_value(struct namedobj_instance *ni, void *key, uint32_t kopt)
+hash_table_value(struct namedobj_instance *ni, const void *key, uint32_t kopt)
{
return (hash32_buf(key, 56, 0));
}
static int
-cmp_table_value(struct named_object *no, void *key, uint32_t kopt)
+cmp_table_value(struct named_object *no, const void *key, uint32_t kopt)
{
return (memcmp(((struct table_val_link *)no)->pval, key, 56));