Seems to me that the problem is not in ipfw2.c but rather in
different structure padding when compiling the kernel and
userland.
ipfw2.c uses sizeof() to determine the size of the structure so
it does not make any assumptions on operand sizes etc.
Re. the printf problems could you submit a patch
In struct ip_fw, the member timespace becomes padded with 32-bits
because a pointer follows it. This causes the RULESIZE() macro to
miscalculate the size of the rule by 4 bytes. Resulting in EINVAL
and kernel warnings:
%%%
bowie# ipfw add allow all from me to 192.168.3.1
0 allow ip from me