freebsd-dev/sbin/ipfw
Alexander V. Chernikov 68394ec88e * Add generic ipfw interface tracking API
* Rewrite interface tables to use interface indexes

Kernel changes:
* Add generic interface tracking API:
 - ipfw_iface_ref (must call unlocked, performs lazy init if needed, allocates
  state & bumps ref)
 - ipfw_iface_add_ntfy(UH_WLOCK+WLOCK, links comsumer & runs its callback to
  update ifindex)
 - ipfw_iface_del_ntfy(UH_WLOCK+WLOCK, unlinks consumer)
 - ipfw_iface_unref(unlocked, drops reference)
Additionally, consumer callbacks are called in interface withdrawal/departure.

* Rewrite interface tables to use iface tracking API. Currently tables are
  implemented the following way:
  runtime data is stored as sorted array of {ifidx, val} for existing interfaces
  full data is stored inside namedobj instance (chained hashed table).

* Add IP_FW_XIFLIST opcode to dump status of tracked interfaces

* Pass @chain ptr to most non-locked algorithm callbacks:
  (prepare_add, prepare_del, flush_entry ..). This may be needed for better
  interaction of given algorithm an other ipfw subsystems

* Add optional "change_ti" algorithm handler to permit updating of
  cached table_info pointer (happens in case of table_max resize)

* Fix small bug in ipfw_list_tables()
* Add badd (insert into sorted array) and bdel (remove from sorted array) funcs

Userland changes:
* Add "iflist" cmd to print status of currently tracked interface
* Add stringnum_cmp for better interface/table names sorting
2014-07-28 19:01:25 +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 generic ipfw interface tracking API 2014-07-28 19:01:25 +00:00
ipfw2.h * Add generic ipfw interface tracking API 2014-07-28 19:01:25 +00:00
ipfw.8 ECN marking implenetation for dummynet. 2014-06-01 07:28:24 +00:00
ipv6.c Implement buffer size checking in ipfw(8) add cmd. 2013-03-03 14:05:03 +00:00
main.c * Add generic ipfw interface tracking API 2014-07-28 19:01:25 +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 generic ipfw interface tracking API 2014-07-28 19:01:25 +00:00