|
Lines 96-101
int pfctl_show_nat(int, int, char *);
Link Here
|
| 96 |
int pfctl_show_src_nodes(int, int); |
96 |
int pfctl_show_src_nodes(int, int); |
| 97 |
int pfctl_show_states(int, const char *, int); |
97 |
int pfctl_show_states(int, const char *, int); |
| 98 |
int pfctl_show_status(int, int); |
98 |
int pfctl_show_status(int, int); |
|
|
99 |
int pfctl_show_running(int); |
| 99 |
int pfctl_show_timeouts(int, int); |
100 |
int pfctl_show_timeouts(int, int); |
| 100 |
int pfctl_show_limits(int, int); |
101 |
int pfctl_show_limits(int, int); |
| 101 |
void pfctl_debug(int, u_int32_t, int); |
102 |
void pfctl_debug(int, u_int32_t, int); |
|
Lines 217-223
static const char * const clearopt_list[] = {
Link Here
|
| 217 |
static const char * const showopt_list[] = { |
218 |
static const char * const showopt_list[] = { |
| 218 |
"nat", "queue", "rules", "Anchors", "Sources", "states", "info", |
219 |
"nat", "queue", "rules", "Anchors", "Sources", "states", "info", |
| 219 |
"Interfaces", "labels", "timeouts", "memory", "Tables", "osfp", |
220 |
"Interfaces", "labels", "timeouts", "memory", "Tables", "osfp", |
| 220 |
"all", NULL |
221 |
"Running", "all", NULL |
| 221 |
}; |
222 |
}; |
| 222 |
|
223 |
|
| 223 |
static const char * const tblcmdopt_list[] = { |
224 |
static const char * const tblcmdopt_list[] = { |
|
Lines 244-250
usage(void)
Link Here
|
| 244 |
"\t[-k host | network | label | id] [-o level] [-p device]\n" |
245 |
"\t[-k host | network | label | id] [-o level] [-p device]\n" |
| 245 |
"\t[-s modifier] [-t table -T command [address ...]] [-x level]\n", |
246 |
"\t[-s modifier] [-t table -T command [address ...]] [-x level]\n", |
| 246 |
__progname); |
247 |
__progname); |
| 247 |
|
|
|
| 248 |
exit(1); |
248 |
exit(1); |
| 249 |
} |
249 |
} |
| 250 |
|
250 |
|
|
Lines 1154-1159
pfctl_show_status(int dev, int opts)
Link Here
|
| 1154 |
return (0); |
1154 |
return (0); |
| 1155 |
} |
1155 |
} |
| 1156 |
|
1156 |
|
|
|
1157 |
int |
| 1158 |
pfctl_show_running(int dev) |
| 1159 |
{ |
| 1160 |
struct pf_status status; |
| 1161 |
|
| 1162 |
if (ioctl(dev, DIOCGETSTATUS, &status)) { |
| 1163 |
warn("DIOCGETSTATUS"); |
| 1164 |
return (-1); |
| 1165 |
} |
| 1166 |
|
| 1167 |
print_running(&status); |
| 1168 |
return (!status.running); |
| 1169 |
} |
| 1170 |
|
| 1157 |
int |
1171 |
int |
| 1158 |
pfctl_show_timeouts(int dev, int opts) |
1172 |
pfctl_show_timeouts(int dev, int opts) |
| 1159 |
{ |
1173 |
{ |
|
Lines 2268-2273
main(int argc, char *argv[])
Link Here
|
| 2268 |
case 's': |
2282 |
case 's': |
| 2269 |
pfctl_show_states(dev, ifaceopt, opts); |
2283 |
pfctl_show_states(dev, ifaceopt, opts); |
| 2270 |
break; |
2284 |
break; |
|
|
2285 |
case 'R': |
| 2286 |
error = pfctl_show_running(dev); |
| 2287 |
break; |
| 2271 |
case 'S': |
2288 |
case 'S': |
| 2272 |
pfctl_show_src_nodes(dev, opts); |
2289 |
pfctl_show_src_nodes(dev, opts); |
| 2273 |
break; |
2290 |
break; |