opnsense-src/sys/net/route
John Baldwin 884eaacd24 ddb: Rework macros to make it easier to add new command tables.
- Add new DB_DEFINE_TABLE and DB_DECLARE_TABLE macros to define new
  command tables.  DB_DECLARE_TABLE is intended for use in headers
  similar to MALLOC_DECLARE and SYSCTL_DECL.

  DB_DEFINE_TABLE takes three arguments, the name of the parent table,
  the command name, and the name of the table itself, e.g.
  DB_DEFINE_TABLE(show, foo, show_foo) defines a new "show foo" table.

- DB_TABLE_COMMAND, DB_TABLE_COMMAND_FLAGS, DB_TABLE_ALIAS, and
  DB_ALIAS_FLAGS allow new commands and aliases to be defined.  These
  are similar to the existing DB_COMMAND, etc. except that they take
  an initial argument giving the name of the parent table, e.g.:

  DB_TABLE_COMMAND(show_foo, bar, db_show_foo_bar)

  defines a new "show foo bar" command.

This provides a cleaner interface than the ad-hoc use of internal
macros like _DB_SET that was required previously (e.g. in cxgbe(4)).

This retires DB_FUNC macro as well as the internal _DB_FUNC macro.

Reviewed by:	melifaro, kib, markj
Differential Revision:	https://reviews.freebsd.org/D40819
2023-07-05 16:02:01 -07:00
..
fib_algo.c spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
fib_algo.h Fib algo: extend KPI by allowing algo to set datapath pointers. 2021-04-18 16:12:12 +01:00
nhgrp.c spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
nhgrp_ctl.c routing: fix panic triggered by the 'gr_idx != 0' assert in nhg code 2023-05-17 08:40:29 +00:00
nhgrp_var.h spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
nhop.c spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
nhop.h spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
nhop_ctl.c spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
nhop_utils.c spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
nhop_utils.h spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
nhop_var.h spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
route_ctl.c spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
route_ctl.h spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
route_ddb.c ddb: Rework macros to make it easier to add new command tables. 2023-07-05 16:02:01 -07:00
route_debug.h routing: allow logging framework to be used outside of the subsystem 2022-09-05 10:44:27 +00:00
route_helpers.c spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
route_ifaddrs.c ifnet/API: Move struct ifnet definition to a <net/if_private.h> 2023-01-24 14:36:30 -05:00
route_rtentry.c spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
route_subscription.c spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
route_tables.c routing: add rt_tables_get_rnh_safe() that doesn't panic when af/fib is 2023-04-25 10:53:51 +00:00
route_temporal.c spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
route_var.h routing: extend nhop(9) kpi 2022-08-29 14:46:03 +00:00