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

Function add_dstip

tools/ipfw/ipfw2.c:3679–3694  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3677}
3678
3679static ipfw_insn *
3680add_dstip(ipfw_insn *cmd, char *av, int cblen, struct tidx *tstate)
3681{
3682 fill_ip((ipfw_insn_ip *)cmd, av, cblen, tstate);
3683 if (cmd->opcode == O_IP_DST_SET) /* set */
3684 ;
3685 else if (cmd->opcode == O_IP_DST_LOOKUP) /* table */
3686 ;
3687 else if (F_LEN(cmd) == F_INSN_SIZE(ipfw_insn)) /* me */
3688 cmd->opcode = O_IP_DST_ME;
3689 else if (F_LEN(cmd) == F_INSN_SIZE(ipfw_insn_u32)) /* one IP */
3690 cmd->opcode = O_IP_DST;
3691 else /* addr/mask */
3692 cmd->opcode = O_IP_DST_MASK;
3693 return cmd;
3694}
3695
3696static struct _s_x f_reserved_keywords[] = {
3697 { "altq", TOK_OR },

Callers 2

add_dstFunction · 0.85
compile_ruleFunction · 0.85

Calls 1

fill_ipFunction · 0.70

Tested by

no test coverage detected