| 2678 | } |
| 2679 | |
| 2680 | static void |
| 2681 | list_dyn_state(struct cmdline_opts *co, struct format_opts *fo, |
| 2682 | void *_arg, void *_state) |
| 2683 | { |
| 2684 | uint16_t rulenum; |
| 2685 | uint8_t set; |
| 2686 | ipfw_dyn_rule *d; |
| 2687 | struct buf_pr *bp; |
| 2688 | |
| 2689 | d = (ipfw_dyn_rule *)_state; |
| 2690 | bp = (struct buf_pr *)_arg; |
| 2691 | |
| 2692 | bcopy(&d->rule, &rulenum, sizeof(rulenum)); |
| 2693 | if (rulenum > fo->last) |
| 2694 | return; |
| 2695 | if (co->use_set) { |
| 2696 | bcopy((char *)&d->rule + sizeof(uint16_t), |
| 2697 | &set, sizeof(uint8_t)); |
| 2698 | if (set != co->use_set - 1) |
| 2699 | return; |
| 2700 | } |
| 2701 | if (rulenum >= fo->first) { |
| 2702 | show_dyn_state(co, fo, bp, d); |
| 2703 | printf("%s\n", bp->buf); |
| 2704 | bp_flush(bp); |
| 2705 | } |
| 2706 | } |
| 2707 | |
| 2708 | static int |
| 2709 | list_dyn_range(struct cmdline_opts *co, struct format_opts *fo, |
nothing calls this directly
no test coverage detected