This is one of the pre-requisites of splitting compile_rule().
One of the complexities that compile_rule() handle is the instruction reordering.
For example, action needs to go to the end of the rule, despite the fact it is in the beginning.
compile_rule() handles it by having static buffers (actbuf, rulebuf, rcmd) and pointers to the specific commands (state, log, etc).
This diff introduces the special ipfw_rule context, which allows to allocate type-specific buffers, removing the need to reorder commands in the end. It also paves the way to creating libipfw library by creating the ipfw_context object.
This diff uses the new primitives to parse all action commands, removing the actbuf entirely & reducing the dependencies between action parsing and command parsing.
The following diffs will follow this approach and convert the other parts of compile_rule() to the same pattern.