aboutsummaryrefslogtreecommitdiff
path: root/sbin/ipfw/ipfw2.h
diff options
context:
space:
mode:
authorAlexander V. Chernikov <melifaro@FreeBSD.org>2014-07-03 22:25:59 +0000
committerAlexander V. Chernikov <melifaro@FreeBSD.org>2014-07-03 22:25:59 +0000
commitac35ff17842a49c0fc98ad5afda2410078651a86 (patch)
tree698d237c2de20d6a6adb97f520a6f5a63853b737 /sbin/ipfw/ipfw2.h
parent6c2997ffec9396c0ad019805f37677ab0a56a3b1 (diff)
downloadsrc-ac35ff17842a49c0fc98ad5afda2410078651a86.tar.gz
src-ac35ff17842a49c0fc98ad5afda2410078651a86.zip
Fully switch to named tables:
Kernel changes: * Introduce ipfw_obj_tentry table entry structure to force u64 alignment. * Support "update-on-existing-key" "add" bahavior (TEI_FLAGS_UPDATED). * Use "subtype" field to distingush between IPv4 and IPv6 table records instead of previous hack. * Add value type (vtype) field for kernel tables. Current types are number,ip and dscp * Fix sets mask retrieval for old binaries * Fix crash while using interface tables Userland changes: * Switch ipfw_table_handler() to use named-only tables. * Add "table NAME create [type {cidr|iface|u32} [valtype {number|ip|dscp}] ..." * Switch ipfw_table_handler to match_token()-based parser. * Switch ipfw_sets_handler to use new ipfw_get_config() for mask retrieval. * Allow ipfw set X table ... syntax to permit using per-set table namespaces.
Notes
Notes: svn path=/projects/ipfw/; revision=268239
Diffstat (limited to 'sbin/ipfw/ipfw2.h')
-rw-r--r--sbin/ipfw/ipfw2.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/sbin/ipfw/ipfw2.h b/sbin/ipfw/ipfw2.h
index 9a4af8165ddf..26ca429b6745 100644
--- a/sbin/ipfw/ipfw2.h
+++ b/sbin/ipfw/ipfw2.h
@@ -71,6 +71,8 @@ struct _s_x {
int x;
};
+extern struct _s_x f_ipdscp[];
+
enum tokens {
TOK_NULL=0,
@@ -205,6 +207,16 @@ enum tokens {
TOK_LOOKUP,
TOK_SOCKARG,
TOK_SETDSCP,
+ /* Table tokens */
+ TOK_CREATE,
+ TOK_DESTROY,
+ TOK_LIST,
+ TOK_INFO,
+ TOK_FLUSH,
+ TOK_ADD,
+ TOK_DEL,
+ TOK_VALTYPE,
+ TOK_ALGO,
};
/*
* the following macro returns an error message if we run out of
@@ -238,6 +250,8 @@ int _substrcmp2(const char *str1, const char* str2, const char* str3);
/* utility functions */
int match_token(struct _s_x *table, char *string);
char const *match_value(struct _s_x *p, int value);
+size_t concat_tokens(char *buf, size_t bufsize, struct _s_x *table,
+ char *delimiter);
struct _ip_fw3_opheader;
int do_cmd(int optname, void *optval, uintptr_t optlen);