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

Function icmp6_errcount

freebsd/netinet6/icmp6.c:169–223  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

167}
168
169static void
170icmp6_errcount(int type, int code)
171{
172 switch (type) {
173 case ICMP6_DST_UNREACH:
174 switch (code) {
175 case ICMP6_DST_UNREACH_NOROUTE:
176 ICMP6STAT_INC(icp6s_odst_unreach_noroute);
177 return;
178 case ICMP6_DST_UNREACH_ADMIN:
179 ICMP6STAT_INC(icp6s_odst_unreach_admin);
180 return;
181 case ICMP6_DST_UNREACH_BEYONDSCOPE:
182 ICMP6STAT_INC(icp6s_odst_unreach_beyondscope);
183 return;
184 case ICMP6_DST_UNREACH_ADDR:
185 ICMP6STAT_INC(icp6s_odst_unreach_addr);
186 return;
187 case ICMP6_DST_UNREACH_NOPORT:
188 ICMP6STAT_INC(icp6s_odst_unreach_noport);
189 return;
190 }
191 break;
192 case ICMP6_PACKET_TOO_BIG:
193 ICMP6STAT_INC(icp6s_opacket_too_big);
194 return;
195 case ICMP6_TIME_EXCEEDED:
196 switch (code) {
197 case ICMP6_TIME_EXCEED_TRANSIT:
198 ICMP6STAT_INC(icp6s_otime_exceed_transit);
199 return;
200 case ICMP6_TIME_EXCEED_REASSEMBLY:
201 ICMP6STAT_INC(icp6s_otime_exceed_reassembly);
202 return;
203 }
204 break;
205 case ICMP6_PARAM_PROB:
206 switch (code) {
207 case ICMP6_PARAMPROB_HEADER:
208 ICMP6STAT_INC(icp6s_oparamprob_header);
209 return;
210 case ICMP6_PARAMPROB_NEXTHEADER:
211 ICMP6STAT_INC(icp6s_oparamprob_nextheader);
212 return;
213 case ICMP6_PARAMPROB_OPTION:
214 ICMP6STAT_INC(icp6s_oparamprob_option);
215 return;
216 }
217 break;
218 case ND_REDIRECT:
219 ICMP6STAT_INC(icp6s_oredirect);
220 return;
221 }
222 ICMP6STAT_INC(icp6s_ounknown);
223}
224
225/*
226 * A wrapper function for icmp6_error() necessary when the erroneous packet

Callers 2

icmp6_errorFunction · 0.85
icmp6_redirect_outputFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected