Lines Matching defs:opts
95 int opts;
117 opts = 0;
131 opts |= OPT_CLEAR;
134 opts |= OPT_DEBUG;
140 opts |= OPT_FLUSH;
143 opts |=OPT_HITS;
146 opts |= OPT_LIST;
159 opts |= OPT_DONOTHING|OPT_DONTOPEN;
166 opts |= OPT_PURGE;
169 opts |= OPT_NORESOLVE;
172 opts |= OPT_REMOVE;
175 opts |= OPT_STAT;
179 opts |= OPT_VERBOSE;
185 if (((opts & OPT_PURGE) != 0) && ((opts & OPT_REMOVE) == 0)) {
198 if (!(opts & OPT_DONOTHING)) {
209 if ((opts & OPT_DONOTHING) == 0) {
216 if (!(opts & OPT_DONOTHING) && (kernel == NULL) && (core == NULL)) {
233 if (opts & (OPT_LIST|OPT_STAT))
234 dostats(fd, nsp, opts, 0, natfilter);
238 if (opts & (OPT_FLUSH|OPT_CLEAR))
239 flushtable(fd, opts, natfilter);
243 if (opts & (OPT_LIST|OPT_STAT))
244 dostats(fd, nsp, opts, 1, natfilter);
305 void flushtable(fd, opts, match)
306 int fd, opts, *match;
310 if (opts & OPT_FLUSH) {
312 if (!(opts & OPT_DONOTHING)) {
335 if (opts & OPT_CLEAR) {
337 if (!(opts & OPT_DONOTHING) && ioctl(fd, SIOCIPFFL, &n) == -1)
348 void dostats_dead(nsp, opts, filter)
350 int opts, *filter;
364 if (opts & OPT_HITS)
366 printnat(&ipn, opts & (OPT_DEBUG|OPT_VERBOSE));
396 printactivenat(&nat, opts, nsp->ns_ticks);
404 printaps(nat.nat_aps, opts, proto);
409 if (opts & OPT_VERBOSE)
485 void dostats(fd, nsp, opts, alive, filter)
487 int fd, opts, alive, *filter;
492 if (opts & OPT_STAT) {
524 if (opts & OPT_VERBOSE)
528 if (opts & OPT_LIST) {
530 dostats_live(fd, nsp, opts, filter);
532 dostats_dead(nsp, opts, filter);
540 void dostats_live(fd, nsp, opts, filter)
542 int fd, opts, *filter;
570 if (opts & OPT_HITS)
572 printnat(ipn, opts & (OPT_DEBUG|OPT_VERBOSE));
610 printactivenat(&nat, opts, nsp->ns_ticks);
618 printaps(nat.nat_aps, opts, proto);
624 if (opts & OPT_VERBOSE)