Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet/ip_icmp.c
Show First 20 Lines • Show All 567 Lines • ▼ Show 20 Lines | #endif | ||||
* The upper layer handler can rely on: | * The upper layer handler can rely on: | ||||
* - The outer IP header has no options. | * - The outer IP header has no options. | ||||
* - The outer IP header, the ICMP header, the inner IP header, | * - The outer IP header, the ICMP header, the inner IP header, | ||||
* and the first n bytes of the inner payload are contiguous. | * and the first n bytes of the inner payload are contiguous. | ||||
* n is at least 8, but might be larger based on | * n is at least 8, but might be larger based on | ||||
* ICMP_ADVLENPREF. See its definition in ip_icmp.h. | * ICMP_ADVLENPREF. See its definition in ip_icmp.h. | ||||
*/ | */ | ||||
if (ip_ctlprotox[icp->icmp_ip.ip_p] != NULL) | if (ip_ctlprotox[icp->icmp_ip.ip_p] != NULL) | ||||
ip_ctlprotox[icp->icmp_ip.ip_p](code, | ip_ctlprotox[icp->icmp_ip.ip_p](code, &icmpsrc, | ||||
(struct sockaddr *)&icmpsrc, &icp->icmp_ip); | &icp->icmp_ip); | ||||
break; | break; | ||||
badcode: | badcode: | ||||
ICMPSTAT_INC(icps_badcode); | ICMPSTAT_INC(icps_badcode); | ||||
break; | break; | ||||
case ICMP_ECHO: | case ICMP_ECHO: | ||||
if (!V_icmpbmcastecho | if (!V_icmpbmcastecho | ||||
▲ Show 20 Lines • Show All 570 Lines • Show Last 20 Lines |