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

Function fill_flags_cmd

tools/ipfw/ipfw2.c:3320–3333  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3318}
3319
3320static void
3321fill_flags_cmd(ipfw_insn *cmd, enum ipfw_opcodes opcode,
3322 struct _s_x *flags, char *p)
3323{
3324 char *e;
3325 uint32_t set = 0, clear = 0;
3326
3327 if (fill_flags(flags, p, &e, &set, &clear) != 0)
3328 errx(EX_DATAERR, "invalid flag %s", e);
3329
3330 cmd->opcode = opcode;
3331 cmd->len = (cmd->len & (F_NOT | F_OR)) | 1;
3332 cmd->arg1 = (set & 0xff) | ( (clear & 0xff) << 8);
3333}
3334
3335
3336void

Callers 1

compile_ruleFunction · 0.85

Calls 1

fill_flagsFunction · 0.85

Tested by

no test coverage detected