MCPcopy Create free account
hub / github.com/F-Stack/f-stack / print_action

Function print_action

tools/ipfw/ipfw2.c:2009–2026  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2007
2008
2009static ipfw_insn *
2010print_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
2028static void
2029print_proto(struct buf_pr *bp, struct format_opts *fo,

Callers 1

show_static_ruleFunction · 0.85

Calls 1

print_action_instructionFunction · 0.85

Tested by

no test coverage detected