version 1.10, 2009/04/06 12:08:26 |
version 1.11, 2009/04/23 12:58:44 |
|
|
void |
void |
print_rule(struct pf_rule *pr) |
print_rule(struct pf_rule *pr) |
{ |
{ |
static const char *actiontypes[] = { "Pass", "Block", "Scrub", "Nat", |
static const char *actiontypes[] = { "Pass", "Block", "Scrub", |
"no Nat", "Binat", "no Binat", "Rdr", "no Rdr" }; |
"no Scrub", "Nat", "no Nat", "Binat", "no Binat", "Rdr", |
|
"no Rdr", "SynProxy Block", "Defer", "Match" }; |
int numact = sizeof(actiontypes) / sizeof(char *); |
int numact = sizeof(actiontypes) / sizeof(char *); |
|
|
static const char *routetypes[] = { "", "fastroute", "route-to", |
static const char *routetypes[] = { "", "fastroute", "route-to", |
|
|
else if (pr->log == 2) |
else if (pr->log == 2) |
print_fld_str(FLD_LOG, "All"); |
print_fld_str(FLD_LOG, "All"); |
|
|
if (pr->action >= numact) |
printf("%u ", pr->action); |
|
/* if (pr->action >= numact) |
print_fld_uint(FLD_ACTION, pr->action); |
print_fld_uint(FLD_ACTION, pr->action); |
else print_fld_str(FLD_ACTION, actiontypes[pr->action]); |
else print_fld_str(FLD_ACTION, actiontypes[pr->action]); |
|
*/ |
if (pr->proto) { |
if (pr->proto) { |
struct protoent *p = getprotobynumber(pr->proto); |
struct protoent *p = getprotobynumber(pr->proto); |
|
|