Lines Matching defs:ipha
743 ipha_t *ipha = (ipha_t *)data_mp->b_rptr;
749 switch (ipha->ipha_protocol) {
752 IPH_HDR_LENGTH(ipha));
761 udpha = (udpha_t *)(data_mp->b_rptr + IPH_HDR_LENGTH(ipha));
793 ipha_t *ipha;
810 ipha = (ipha_t *)data_mp->b_rptr;
812 IPH_HDR_LENGTH(ipha));
813 divpoint = IPH_HDR_LENGTH(ipha);
838 ipha->ipha_protocol = nexthdr;
843 if (padlen >= ntohs(ipha->ipha_length) - sizeof (ipha_t) - 2 -
854 ntohs(ipha->ipha_length), ivlen,
855 (int)(ntohs(ipha->ipha_length) - sizeof (ipha_t) -
865 ipha->ipha_length = htons(ntohs(ipha->ipha_length) - padlen -
867 ipha->ipha_hdr_checksum = 0;
868 ipha->ipha_hdr_checksum = (uint16_t)ip_csum_hdr(ipha);
1174 ipha_t *ipha = (ipha_t *)data_mp->b_rptr;
1175 ipha->ipha_length = htons(ntohs(ipha->ipha_length) -
1905 ipha_t *ipha = (ipha_t *)data_mp->b_rptr;
1909 if (IPH_HDR_VERSION(ipha) == IP_VERSION &&
1910 ipha->ipha_protocol == IPPROTO_UDP)
1911 esp_prepare_udp(ns, data_mp, ipha);
2260 esp_prepare_udp(netstack_t *ns, mblk_t *mp, ipha_t *ipha)
2266 uint_t hlen = IPH_HDR_LENGTH(ipha);
2270 ipha->ipha_hdr_checksum = 0;
2271 ipha->ipha_hdr_checksum = ip_csum_hdr(ipha);
2276 arr = (uint16_t *)ipha;
2279 ntohs(htons(ipha->ipha_length) - hlen));
2282 ntohs(htons(ipha->ipha_length) - hlen);
2337 ipha_t *ipha;
2346 ipha = (ipha_t *)mp->b_rptr;
2347 ipha->ipha_version_and_hdr_length = IP_SIMPLE_HDR_VERSION;
2348 ipha->ipha_type_of_service = 0;
2349 ipha->ipha_length = htons(sizeof (ipha_t) + sizeof (udpha_t) + 1);
2351 ipha->ipha_ident = *(((uint16_t *)(&assoc->ipsa_spi)) + 1);
2352 ipha->ipha_fragment_offset_and_flags = 0; /* Too small to fragment! */
2353 ipha->ipha_ttl = 0xFF;
2354 ipha->ipha_protocol = IPPROTO_UDP;
2355 ipha->ipha_hdr_checksum = 0;
2356 ipha->ipha_src = assoc->ipsa_srcaddr[0];
2357 ipha->ipha_dst = assoc->ipsa_dstaddr[0];
2358 udpha = (udpha_t *)(ipha + 1);
2368 esp_prepare_udp(ns, mp, ipha);
2609 ipha_t *ipha;
2687 ipha = (ipha_t *)data_mp->b_rptr; /* So we can call esp_acquire(). */
2690 ASSERT(IPH_HDR_VERSION(ipha) == IPV4_VERSION);
2693 divpoint = IPH_HDR_LENGTH(ipha);
2694 datalen = ntohs(ipha->ipha_length) - divpoint;
2695 nhp = (uint8_t *)&ipha->ipha_protocol;
2699 ASSERT(IPH_HDR_VERSION(ipha) == IPV6_VERSION);
2702 ip6h = (ip6_t *)ipha;
2882 ipha->ipha_length = htons(ntohs(ipha->ipha_length) + adj);
2885 udpha->uha_length = htons(ntohs(ipha->ipha_length) -
2886 IPH_HDR_LENGTH(ipha));
2890 ipha->ipha_hdr_checksum = 0;
2891 ipha->ipha_hdr_checksum = (uint16_t)ip_csum_hdr(ipha);