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

Function fill_unreach6_code

tools/ipfw/ipv6.c:62–75  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

60};
61
62void
63fill_unreach6_code(u_short *codep, char *str)
64{
65 int val;
66 char *s;
67
68 val = strtoul(str, &s, 0);
69 if (s == str || *s != '\0' || val >= 0x100)
70 val = match_token(icmp6codes, str);
71 if (val < 0)
72 errx(EX_DATAERR, "unknown ICMPv6 unreachable code ``%s''", str);
73 *codep = val;
74 return;
75}
76
77void
78print_unreach6_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