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

Function fill_reject_code

tools/ipfw/ipfw2.c:1116–1129  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1114};
1115
1116static void
1117fill_reject_code(u_short *codep, char *str)
1118{
1119 int val;
1120 char *s;
1121
1122 val = strtoul(str, &s, 0);
1123 if (s == str || *s != '\0' || val >= 0x100)
1124 val = match_token(icmpcodes, str);
1125 if (val < 0)
1126 errx(EX_DATAERR, "unknown ICMP unreachable code ``%s''", str);
1127 *codep = val;
1128 return;
1129}
1130
1131static void
1132print_reject_code(struct buf_pr *bp, uint16_t code)

Callers 1

compile_ruleFunction · 0.85

Calls 2

strtoulFunction · 0.85
match_tokenFunction · 0.85

Tested by

no test coverage detected