Lines Matching refs:icmp_codes
26 static const struct icmp_names icmp_codes[] = { variable
87 for (i = 0; i < ARRAY_SIZE(icmp_codes); ++i) { in print_icmptypes()
88 if (i && icmp_codes[i].type == icmp_codes[i-1].type) { in print_icmptypes()
89 if (icmp_codes[i].code_min == icmp_codes[i-1].code_min in print_icmptypes()
90 && (icmp_codes[i].code_max in print_icmptypes()
91 == icmp_codes[i-1].code_max)) in print_icmptypes()
92 printf(" (%s)", icmp_codes[i].name); in print_icmptypes()
94 printf("\n %s", icmp_codes[i].name); in print_icmptypes()
97 printf("\n%s", icmp_codes[i].name); in print_icmptypes()
120 static const unsigned int limit = ARRAY_SIZE(icmp_codes); in parse_icmp()
125 if (strncasecmp(icmp_codes[i].name, icmptype, strlen(icmptype)) in parse_icmp()
132 icmp_codes[match].name, in parse_icmp()
133 icmp_codes[i].name); in parse_icmp()
139 *type = icmp_codes[match].type; in parse_icmp()
140 code[0] = icmp_codes[match].code_min; in parse_icmp()
141 code[1] = icmp_codes[match].code_max; in parse_icmp()
196 for (i = 0; i < ARRAY_SIZE(icmp_codes); ++i) in print_icmptype()
197 if (icmp_codes[i].type == type in print_icmptype()
198 && icmp_codes[i].code_min == code_min in print_icmptype()
199 && icmp_codes[i].code_max == code_max) in print_icmptype()
202 if (i != ARRAY_SIZE(icmp_codes)) { in print_icmptype()
205 icmp_codes[i].name); in print_icmptype()
259 for (i = 0; i < ARRAY_SIZE(icmp_codes); ++i) in type_xlate_print()
260 if (icmp_codes[i].type == icmptype && in type_xlate_print()
261 icmp_codes[i].code_min == code_min && in type_xlate_print()
262 icmp_codes[i].code_max == code_max) { in type_xlate_print()
263 xt_xlate_add(xl, icmp_codes[i].name); in type_xlate_print()