Zero out your structs. Then ...
To add an IPv4 address, init pfra_ip4addr to the network byte ordered
address. Set pfra_af to AF_INET. Set pfra_net to the size of the network
(for a single address, this is a 32 bit subnet mask, use 32 for this
value).
There's also some members called ...elem and ...nelem (sorry, don't have
that .h file handy). Set ...elem to sizeof(struct you're adding) and
..nelem to number of structs you're adding.
If that makes no sense (sorry I'm in a hurry typing this) then contact me
off list and I'll try to clarify.
Best of luck,
jw
On Thu, 5 Aug 2004, Christopher Keeley wrote:
> Hello everybody.
>
> I am currently writing a program in C that at certain points needs to
> add a rule to the current firewall set.
>
> Here is a copy of the code i have so far for the function that will add
> the rule:
>