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

Function add_ports

tools/ipfw/ipfw2.c:3716–3729  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3714};
3715
3716static ipfw_insn *
3717add_ports(ipfw_insn *cmd, char *av, u_char proto, int opcode, int cblen)
3718{
3719
3720 if (match_token(f_reserved_keywords, av) != -1)
3721 return (NULL);
3722
3723 if (fill_newports((ipfw_insn_u16 *)cmd, av, proto, cblen)) {
3724 /* XXX todo: check that we have a protocol with ports */
3725 cmd->opcode = opcode;
3726 return cmd;
3727 }
3728 return NULL;
3729}
3730
3731static ipfw_insn *
3732add_src(ipfw_insn *cmd, char *av, u_char proto, int cblen, struct tidx *tstate)

Callers 1

compile_ruleFunction · 0.85

Calls 2

match_tokenFunction · 0.85
fill_newportsFunction · 0.85

Tested by

no test coverage detected