Lines Matching refs:icmph

1233 	icmph_t	icmph;
1240 bzero(&icmph, sizeof (icmph_t));
1241 icmph.icmph_type = ICMP_DEST_UNREACHABLE;
1242 icmph.icmph_code = ICMP_FRAGMENTATION_NEEDED;
1243 icmph.icmph_du_mtu = htons((uint16_t)mtu);
1247 icmp_pkt(mp, &icmph, sizeof (icmph_t), ira);
1331 icmph_t *icmph;
1367 icmph = (icmph_t *)&mp->b_rptr[ip_hdr_length];
1368 ip2dbg(("icmp_inbound_v4: type %d code %d\n", icmph->icmph_type,
1369 icmph->icmph_code));
1376 switch (icmph->icmph_type) {
1381 if (icmph->icmph_code == ICMP_FRAGMENTATION_NEEDED)
1431 icmph = (icmph_t *)&mp->b_rptr[ip_hdr_length];
1433 icmph->icmph_type = ICMP_ECHO_REPLY;
1435 icmp_send_reply_v4(mp, ipha, icmph, ira);
1478 icmph = (icmph_t *)&mp->b_rptr[ip_hdr_length];
1493 icmph = (icmph_t *)&mp->b_rptr[ip_hdr_length];
1495 icmph->icmph_type = ICMP_TIME_STAMP_REPLY;
1496 tsp = (uint32_t *)&icmph[1];
1505 icmp_send_reply_v4(mp, ipha, icmph, ira);
1539 icmph = (icmph_t *)&mp->b_rptr[ip_hdr_length];
1554 icmph = (icmph_t *)&mp->b_rptr[ip_hdr_length];
1571 icmph->icmph_type = ICMP_ADDRESS_MASK_REPLY;
1572 bcopy(&ipif->ipif_net_mask, &icmph[1], IP_ADDR_LEN);
1575 icmp_send_reply_v4(mp, ipha, icmph, ira);
1642 icmph = (icmph_t *)&mp->b_rptr[ip_hdr_length];
1643 if (!icmp_inbound_verify_v4(mp, icmph, ira)) {
1648 switch (icmph->icmph_type) {
1650 icmp_redirect_v4(mp, ipha, icmph, ira);
1653 if (icmph->icmph_code == ICMP_FRAGMENTATION_NEEDED) {
1655 icmp_inbound_too_big_v4(icmph, ira);
1659 icmp_inbound_error_fanout_v4(mp, icmph, ira);
1672 icmp_send_reply_v4(mblk_t *mp, ipha_t *ipha, icmph_t *icmph,
1681 icmph->icmph_checksum = 0;
1682 icmph->icmph_checksum = IP_CSUM(mp, ip_hdr_length, 0);
1750 icmp_inbound_verify_v4(mblk_t *mp, icmph_t *icmph, ip_recv_attr_t *ira)
1758 ipha = (ipha_t *)&icmph[1];
1776 if (icmph->icmph_type == ICMP_REDIRECT)
1810 !connp->conn_verifyicmp(connp, tcpha, icmph, NULL, ira)) {
1872 icmp_inbound_too_big_v4(icmph_t *icmph, ip_recv_attr_t *ira)
1885 ipha = (ipha_t *)&icmph[1];
1886 ASSERT(icmph->icmph_type == ICMP_DEST_UNREACHABLE &&
1887 icmph->icmph_code == ICMP_FRAGMENTATION_NEEDED);
1907 mtu = ntohs(icmph->icmph_du_mtu);
1917 if (icmph->icmph_du_zero != 0 || mtu < ipst->ips_ip_pmtu_min) {
1967 icmph->icmph_du_zero = 0;
1968 icmph->icmph_du_mtu = htons((uint16_t)dce->dce_pmtu);
1969 DTRACE_PROBE4(ip4__pmtu__change, icmph_t *, icmph, dce_t *,
2071 icmp_inbound_error_fanout_v4(mblk_t *mp, icmph_t *icmph, ip_recv_attr_t *ira)
2086 ipha = (ipha_t *)&icmph[1];
2106 icmph->icmph_type, icmph->icmph_code));
2208 icmph = (icmph_t *)&mp->b_rptr[hdr_length];
2209 if (!icmp_inbound_verify_v4(mp, icmph, ira)) {
2214 icmp_inbound_error_fanout_v4(mp, icmph, ira);
2267 icmph = (icmph_t *)&mp->b_rptr[hdr_length];
2268 if (!icmp_inbound_verify_v4(mp, icmph, ira)) {
2281 icmp_inbound_error_fanout_v4(mp, icmph, ira);
2627 icmp_redirect_v4(mblk_t *mp, ipha_t *ipha, icmph_t *icmph, ip_recv_attr_t *ira)
2636 inner_ipha = (ipha_t *)&icmph[1];
2639 gateway = icmph->icmph_rd_gateway;
2678 switch (icmph->icmph_code) {
2752 icmph_t icmph;
2759 bzero(&icmph, sizeof (icmph_t));
2760 icmph.icmph_type = ICMP_PARAM_PROBLEM;
2761 icmph.icmph_pp_ptr = ptr;
2763 icmp_pkt(mp, &icmph, sizeof (icmph_t), ira);
2779 icmph_t *icmph;
2904 icmph = (icmph_t *)&ipha[1];
2905 bcopy(stuff, icmph, len);
2906 icmph->icmph_checksum = 0;
2907 icmph->icmph_checksum = IP_CSUM(mp, (int32_t)sizeof (ipha_t), 0);
2978 icmph_t *icmph;
3015 icmph = (icmph_t *)
3017 switch (icmph->icmph_type) {
3134 icmph_t icmph;
3141 bzero(&icmph, sizeof (icmph_t));
3142 icmph.icmph_type = ICMP_REDIRECT;
3143 icmph.icmph_code = 1;
3144 icmph.icmph_rd_gateway = gateway;
3146 icmp_pkt(mp, &icmph, sizeof (icmph_t), ira);
3155 icmph_t icmph;
3162 bzero(&icmph, sizeof (icmph_t));
3163 icmph.icmph_type = ICMP_TIME_EXCEEDED;
3164 icmph.icmph_code = code;
3166 icmp_pkt(mp, &icmph, sizeof (icmph_t), ira);
3177 icmph_t icmph;
3184 bzero(&icmph, sizeof (icmph_t));
3185 icmph.icmph_type = ICMP_DEST_UNREACHABLE;
3186 icmph.icmph_code = code;
3188 icmp_pkt(mp, &icmph, sizeof (icmph_t), ira);