freebsd-skq/sbin/ipfw
melifaro a1eca3cc0c Add support for multi-field values inside ipfw tables.
This is the last major change in given branch.

Kernel changes:
* Use 64-bytes structures to hold multi-value variables.
* Use shared array to hold values from all tables (assume
  each table algo is capable of holding 32-byte variables).
* Add some placeholders to support per-table value arrays in future.
* Use simple eventhandler-style API to ease the process of adding new
  table items. Currently table addition may required multiple UH drops/
  acquires which is quite tricky due to atomic table modificatio/swap
  support, shared array resize, etc. Deal with it by calling special
  notifier capable of rolling back state before actually performing
  swap/resize operations. Original operation then restarts itself after
  acquiring UH lock.
* Bump all objhash users default values to at least 64
* Fix custom hashing inside objhash.

Userland changes:
* Add support for dumping shared value array via "vlist" internal cmd.
* Some small print/fill_flags dixes to support u32 values.
* valtype is now bitmask of
  <skipto|pipe|fib|nat|dscp|tag|divert|netgraph|limit|ipv4|ipv6>.
  New values can hold distinct values for each of this types.
* Provide special "legacy" type which assumes all values are the same.
* More helpers/docs following..

Some examples:

3:41 [1] zfscurr0# ipfw table mimimi create valtype skipto,limit,ipv4,ipv6
3:41 [1] zfscurr0# ipfw table mimimi info
+++ table(mimimi), set(0) +++
 kindex: 2, type: addr
 references: 0, valtype: skipto,limit,ipv4,ipv6
 algorithm: addr:radix
 items: 0, size: 296
3:42 [1] zfscurr0# ipfw table mimimi add 10.0.0.5 3000,10,10.0.0.1,2a02:978:2::1
added: 10.0.0.5/32 3000,10,10.0.0.1,2a02:978:2::1
3:42 [1] zfscurr0# ipfw table mimimi list
+++ table(mimimi), set(0) +++
10.0.0.5/32 3000,0,10.0.0.1,2a02:978:2::1
2014-08-31 23:51:09 +00:00
..
altq.c Suppord showing named tables in ipfw(8) rule listing. 2014-06-28 23:20:24 +00:00
dummynet.c Suppord showing named tables in ipfw(8) rule listing. 2014-06-28 23:20:24 +00:00
ipfw2.c Add support for multi-field values inside ipfw tables. 2014-08-31 23:51:09 +00:00
ipfw2.h Add support for multi-field values inside ipfw tables. 2014-08-31 23:51:09 +00:00
ipfw.8 Replace "cidr" table type with "addr" type. 2014-08-14 21:43:20 +00:00
ipv6.c Move one step further towards libipfw: convert show_static_rule() to 2014-08-12 19:56:26 +00:00
main.c * Move "talist" and "iflist" cmds into newly-create "internal" ipfw(8) cmd. 2014-08-03 16:22:14 +00:00
Makefile Move further to eliminate next pieces of number-assuming code inside tables. 2014-06-14 22:47:25 +00:00
nat.c Remove unused values 2012-09-11 07:54:41 +00:00
tables.c Add support for multi-field values inside ipfw tables. 2014-08-31 23:51:09 +00:00