freebsd-dev/sbin/ipfw
Luigi Rizzo b87ce5545b Several ipfw options and actions use a 16-bit argument to indicate
pipes, queues, tags, rule numbers and so on.
These are all different namespaces, and the only thing they have in
common is the fact they use a 16-bit slot to represent the argument.

There is some confusion in the code, mostly for historical reasons,
on how the values 0 and 65535 should be used. At the moment, 0 is
forbidden almost everywhere, while 65535 is used to represent a
'tablearg' argument, i.e. the result of the most recent table() lookup.

For now, try to use explicit constants for the min and max allowed
values, and do not overload the default rule number for that.

Also, make the MTAG_IPFW declaration only visible to the kernel.

NOTE: I think the issue needs to be revisited before 8.0 is out:
the 2^16 namespace limit for rule numbers and pipe/queue is
annoying, and we can easily bump the limit to 2^32 which gives
a lot more flexibility in partitioning the namespace.

MFC after:	5 days
2009-06-05 16:16:07 +00:00
..
altq.c mark a function static, as it is 2009-03-05 08:01:19 +00:00
dummynet.c remove a printf that was only useful for debugging. 2009-06-05 13:11:34 +00:00
ipfw2.c Several ipfw options and actions use a 16-bit argument to indicate 2009-06-05 16:16:07 +00:00
ipfw2.h Add emulation of delay profiles, which lets you model various 2009-04-09 12:46:00 +00:00
ipfw.8 Kill hard sentence break added in the previous revision. 2009-04-11 08:52:02 +00:00
ipv6.c Put nat and ipv6 support in their own files. 2009-01-27 12:01:30 +00:00
main.c Implement an ipfw action to reassemble ip packets: reass. 2009-04-01 20:23:47 +00:00
Makefile put the altq-related functions into a separate file. 2009-02-01 16:00:49 +00:00
nat.c remove some signed/unsigned and one const/!const warning 2009-03-05 08:01:58 +00:00