Lines Matching refs:ipha

674 	ipha_t *ipha = (ipha_t *)data_mp->b_rptr;  in esp_fix_natt_checksums()  local
680 switch (ipha->ipha_protocol) { in esp_fix_natt_checksums()
683 IPH_HDR_LENGTH(ipha)); in esp_fix_natt_checksums()
692 udpha = (udpha_t *)(data_mp->b_rptr + IPH_HDR_LENGTH(ipha)); in esp_fix_natt_checksums()
724 ipha_t *ipha; in esp_strip_header() local
741 ipha = (ipha_t *)data_mp->b_rptr; in esp_strip_header()
743 IPH_HDR_LENGTH(ipha)); in esp_strip_header()
744 divpoint = IPH_HDR_LENGTH(ipha); in esp_strip_header()
769 ipha->ipha_protocol = nexthdr; in esp_strip_header()
774 if (padlen >= ntohs(ipha->ipha_length) - sizeof (ipha_t) - 2 - in esp_strip_header()
785 ntohs(ipha->ipha_length), ivlen, in esp_strip_header()
786 (int)(ntohs(ipha->ipha_length) - sizeof (ipha_t) - in esp_strip_header()
796 ipha->ipha_length = htons(ntohs(ipha->ipha_length) - padlen - in esp_strip_header()
798 ipha->ipha_hdr_checksum = 0; in esp_strip_header()
799 ipha->ipha_hdr_checksum = (uint16_t)ip_csum_hdr(ipha); in esp_strip_header()
1105 ipha_t *ipha = (ipha_t *)data_mp->b_rptr; in esp_inbound() local
1106 ipha->ipha_length = htons(ntohs(ipha->ipha_length) - in esp_inbound()
1661 ipha_t *ipha = (ipha_t *)data_mp->b_rptr; in esp_kcf_callback_outbound() local
1665 if (IPH_HDR_VERSION(ipha) == IP_VERSION && in esp_kcf_callback_outbound()
1666 ipha->ipha_protocol == IPPROTO_UDP) in esp_kcf_callback_outbound()
1667 esp_prepare_udp(ns, data_mp, ipha); in esp_kcf_callback_outbound()
2017 esp_prepare_udp(netstack_t *ns, mblk_t *mp, ipha_t *ipha) in esp_prepare_udp() argument
2023 uint_t hlen = IPH_HDR_LENGTH(ipha); in esp_prepare_udp()
2027 ipha->ipha_hdr_checksum = 0; in esp_prepare_udp()
2028 ipha->ipha_hdr_checksum = ip_csum_hdr(ipha); in esp_prepare_udp()
2033 arr = (uint16_t *)ipha; in esp_prepare_udp()
2036 ntohs(htons(ipha->ipha_length) - hlen)); in esp_prepare_udp()
2039 ntohs(htons(ipha->ipha_length) - hlen); in esp_prepare_udp()
2094 ipha_t *ipha; in ipsecesp_send_keepalive() local
2103 ipha = (ipha_t *)mp->b_rptr; in ipsecesp_send_keepalive()
2104 ipha->ipha_version_and_hdr_length = IP_SIMPLE_HDR_VERSION; in ipsecesp_send_keepalive()
2105 ipha->ipha_type_of_service = 0; in ipsecesp_send_keepalive()
2106 ipha->ipha_length = htons(sizeof (ipha_t) + sizeof (udpha_t) + 1); in ipsecesp_send_keepalive()
2108 ipha->ipha_ident = *(((uint16_t *)(&assoc->ipsa_spi)) + 1); in ipsecesp_send_keepalive()
2109 ipha->ipha_fragment_offset_and_flags = 0; /* Too small to fragment! */ in ipsecesp_send_keepalive()
2110 ipha->ipha_ttl = 0xFF; in ipsecesp_send_keepalive()
2111 ipha->ipha_protocol = IPPROTO_UDP; in ipsecesp_send_keepalive()
2112 ipha->ipha_hdr_checksum = 0; in ipsecesp_send_keepalive()
2113 ipha->ipha_src = assoc->ipsa_srcaddr[0]; in ipsecesp_send_keepalive()
2114 ipha->ipha_dst = assoc->ipsa_dstaddr[0]; in ipsecesp_send_keepalive()
2115 udpha = (udpha_t *)(ipha + 1); in ipsecesp_send_keepalive()
2125 esp_prepare_udp(ns, mp, ipha); in ipsecesp_send_keepalive()
2367 ipha_t *ipha; in esp_outbound() local
2445 ipha = (ipha_t *)data_mp->b_rptr; /* So we can call esp_acquire(). */ in esp_outbound()
2446 ip6h = (ip6_t *)ipha; in esp_outbound()
2449 ASSERT(IPH_HDR_VERSION(ipha) == IPV4_VERSION); in esp_outbound()
2452 divpoint = IPH_HDR_LENGTH(ipha); in esp_outbound()
2453 datalen = ntohs(ipha->ipha_length) - divpoint; in esp_outbound()
2454 nhp = (uint8_t *)&ipha->ipha_protocol; in esp_outbound()
2458 ASSERT(IPH_HDR_VERSION(ipha) == IPV6_VERSION); in esp_outbound()
2640 ipha->ipha_length = htons(ntohs(ipha->ipha_length) + adj); in esp_outbound()
2643 udpha->uha_length = htons(ntohs(ipha->ipha_length) - in esp_outbound()
2644 IPH_HDR_LENGTH(ipha)); in esp_outbound()
2648 ipha->ipha_hdr_checksum = 0; in esp_outbound()
2649 ipha->ipha_hdr_checksum = (uint16_t)ip_csum_hdr(ipha); in esp_outbound()