| 2007 | |
| 2008 | |
| 2009 | static ipfw_insn * |
| 2010 | print_action(struct buf_pr *bp, struct format_opts *fo, |
| 2011 | struct show_state *state, uint8_t opcode) |
| 2012 | { |
| 2013 | ipfw_insn *cmd; |
| 2014 | int l; |
| 2015 | |
| 2016 | for (l = state->rule->cmd_len - state->rule->act_ofs, |
| 2017 | cmd = ACTION_PTR(state->rule); l > 0; |
| 2018 | l -= F_LEN(cmd), cmd += F_LEN(cmd)) { |
| 2019 | if (cmd->opcode != opcode) |
| 2020 | continue; |
| 2021 | if (!print_action_instruction(bp, fo, state, cmd)) |
| 2022 | continue; |
| 2023 | return (cmd); |
| 2024 | } |
| 2025 | return (NULL); |
| 2026 | } |
| 2027 | |
| 2028 | static void |
| 2029 | print_proto(struct buf_pr *bp, struct format_opts *fo, |
no test coverage detected