Home
last modified time | relevance | path

Searched refs:ipha (Results 1 – 25 of 57) sorted by relevance

123

/titanic_44/usr/src/uts/common/inet/ip/
H A Dip_input.c201 ipha_t *ipha; in ip_input_common_v4() local
304 ipha = (ipha_t *)mp->b_rptr; in ip_input_common_v4()
305 if (!OK_32PTR(ipha) || MBLKL(mp) < IP_SIMPLE_HDR_LENGTH) { in ip_input_common_v4()
313 ipha = (ipha_t *)mp->b_rptr; in ip_input_common_v4()
317 if (IPH_HDR_VERSION(ipha) != IPV4_VERSION) { in ip_input_common_v4()
331 if (ipha->ipha_dst == INADDR_ANY) { in ip_input_common_v4()
364 iras.ira_pktlen = ntohs(ipha->ipha_length); in ip_input_common_v4()
374 (*ill->ill_inputfn)(mp, ipha, &ipha->ipha_dst, &iras, &rtc); in ip_input_common_v4()
428 ipha_t *ipha = (ipha_t *)iph_arg; in ill_input_full_v4() local
456 ipha = (ipha_t *)mp->b_rptr; in ill_input_full_v4()
[all …]
H A Dip_output.c416 ipha_t *ipha = (ipha_t *)mp->b_rptr; in ip_verify_src() local
418 if (ipha->ipha_src == INADDR_ANY) in ip_verify_src()
421 return (ip_laddr_verify_v4(ipha->ipha_src, ixa->ixa_zoneid, in ip_verify_src()
534 ipha_t *ipha = NULL; in ip_verify_nce() local
538 ipha = (ipha_t *)mp->b_rptr; in ip_verify_nce()
542 nce = ire_handle_condemned_nce(ixa->ixa_nce, ire, ipha, ip6h, B_TRUE); in ip_verify_nce()
805 ipha_t *ipha; in ip_output_simple_v4() local
820 ipha = (ipha_t *)mp->b_rptr; in ip_output_simple_v4()
821 ASSERT(IPH_HDR_VERSION(ipha) == IPV4_VERSION); in ip_output_simple_v4()
833 ixa->ixa_pktlen = ntohs(ipha->ipha_length); in ip_output_simple_v4()
[all …]
H A Dtn_ipopt.c131 ipha_t *ipha; in tsol_get_option_v4() local
144 ipha = (ipha_t *)mp->b_rptr; in tsol_get_option_v4()
145 totallen = ipha->ipha_version_and_hdr_length - in tsol_get_option_v4()
158 opt = (uchar_t *)&ipha[1]; in tsol_get_option_v4()
554 tsol_remove_secopt(ipha_t *ipha, int buflen) in tsol_remove_secopt() argument
560 remlen = IPH_HDR_LENGTH(ipha) - IP_SIMPLE_HDR_LENGTH; in tsol_remove_secopt()
561 fptr = tptr = (uchar_t *)(ipha + 1); in tsol_remove_secopt()
575 if (((fptr - (uchar_t *)ipha) & 3) == 0) in tsol_remove_secopt()
611 olen = (tptr - (uchar_t *)ipha) & 3; in tsol_remove_secopt()
622 ovbcopy(fptr, tptr, ((uchar_t *)ipha + buflen) - fptr); in tsol_remove_secopt()
[all …]
H A Dip_mroute.c1530 ipha_t *ipha = (ipha_t *)mp->b_rptr; in ip_mforward() local
1547 ntohl(ipha->ipha_src), ntohl(ipha->ipha_dst), in ip_mforward()
1551 dst = ipha->ipha_dst; in ip_mforward()
1561 if (CLASSD(dst) && (ipha->ipha_ttl <= 1 || in ip_mforward()
1567 ipha->ipha_ttl, ntohl(dst), ill->ill_name); in ip_mforward()
1594 } else if ((ipha->ipha_version_and_hdr_length & 0xf) < in ip_mforward()
1596 ((uchar_t *)(ipha + 1))[1] != IPOPT_LSRR) { in ip_mforward()
1613 ntohl(ipha->ipha_src)); in ip_mforward()
1619 src = ipha->ipha_src; in ip_mforward()
1643 ret = ip_mdq(mp, ipha, in ip_mforward()
[all …]
H A Dip.c1332 ipha_t *ipha; /* Outer header */ in icmp_inbound_v4() local
1345 ipha = (ipha_t *)mp->b_rptr; in icmp_inbound_v4()
1358 ipha = ip_pullup(mp, ip_hdr_length + ICMPH_SIZE, ira); in icmp_inbound_v4()
1359 if (ipha == NULL) { in icmp_inbound_v4()
1430 ipha = (ipha_t *)mp->b_rptr; in icmp_inbound_v4()
1435 icmp_send_reply_v4(mp, ipha, icmph, ira); in icmp_inbound_v4()
1469 ipha = ip_pullup(mp, len_needed, ira); in icmp_inbound_v4()
1470 if (ipha == NULL) { in icmp_inbound_v4()
1492 ipha = (ipha_t *)mp->b_rptr; in icmp_inbound_v4()
1505 icmp_send_reply_v4(mp, ipha, icmph, ira); in icmp_inbound_v4()
[all …]
H A Dip_sadb.c603 ipha_t *ipha = (ipha_t *)data_mp->b_rptr; in ipsec_outbound_sa() local
605 ASSERT(IPH_HDR_VERSION(ipha) == IPV4_VERSION); in ipsec_outbound_sa()
606 dst = ip_get_dst(ipha); in ipsec_outbound_sa()
616 src_ptr = (uint32_t *)&ipha->ipha_src; in ipsec_outbound_sa()
661 ipha_t *ipha; in ipsec_inbound_ah_sa() local
683 ipha = (ipha_t *)mp->b_rptr; in ipsec_inbound_ah_sa()
684 ASSERT(ipha->ipha_protocol == IPPROTO_AH); in ipsec_inbound_ah_sa()
685 ah_offset = ipha->ipha_version_and_hdr_length - in ipsec_inbound_ah_sa()
710 ipha = (ipha_t *)mp->b_rptr; in ipsec_inbound_ah_sa()
721 src_ptr = (uint32_t *)&ipha->ipha_src; in ipsec_inbound_ah_sa()
[all …]
H A Dtnet.c686 const ipha_t *ipha; in tsol_get_pkt_label() local
704 ipha = (const ipha_t *)mp->b_rptr; in tsol_get_pkt_label()
705 src = &ipha->ipha_src; in tsol_get_pkt_label()
764 proto = ipha->ipha_protocol; in tsol_get_pkt_label()
769 (mp->b_rptr + IPH_HDR_LENGTH(ipha)); in tsol_get_pkt_label()
1043 ipha_t *ipha = (ipha_t *)mp->b_rptr; in tsol_can_accept_raw() local
1045 src_rhtp = find_tpc(&ipha->ipha_src, IPV4_VERSION, in tsol_can_accept_raw()
1049 dst_rhtp = find_tpc(&ipha->ipha_dst, IPV4_VERSION, in tsol_can_accept_raw()
1129 const ipha_t *ipha; in tsol_can_reply_error() local
1136 sizeof (*ipha) : sizeof (*ip6h))); in tsol_can_reply_error()
[all …]
H A Dipsecah.c2143 ipha_t *ipha; in ah_icmp_error_v4() local
2151 oipha = ipha = (ipha_t *)mp->b_rptr; in ah_icmp_error_v4()
2152 iph_hdr_length = IPH_HDR_LENGTH(ipha); in ah_icmp_error_v4()
2155 ipha = (ipha_t *)&icmph[1]; in ah_icmp_error_v4()
2156 hdr_length = IPH_HDR_LENGTH(ipha); in ah_icmp_error_v4()
2161 if ((uchar_t *)ipha + hdr_length + 8 > mp->b_wptr) { in ah_icmp_error_v4()
2162 if (!pullupmsg(mp, (uchar_t *)ipha + hdr_length + 8 - in ah_icmp_error_v4()
2175 ipha = (ipha_t *)&icmph[1]; in ah_icmp_error_v4()
2178 ah = (ah_t *)((uint8_t *)ipha + hdr_length); in ah_icmp_error_v4()
2181 hptr = OUTBOUND_BUCKET_V4(&ahstack->ah_sadb.s_v4, ipha->ipha_dst); in ah_icmp_error_v4()
[all …]
H A Dipsecesp.c743 ipha_t *ipha = (ipha_t *)data_mp->b_rptr; in esp_fix_natt_checksums() local
749 switch (ipha->ipha_protocol) { in esp_fix_natt_checksums()
752 IPH_HDR_LENGTH(ipha)); in esp_fix_natt_checksums()
761 udpha = (udpha_t *)(data_mp->b_rptr + IPH_HDR_LENGTH(ipha)); in esp_fix_natt_checksums()
793 ipha_t *ipha; in esp_strip_header() local
810 ipha = (ipha_t *)data_mp->b_rptr; in esp_strip_header()
812 IPH_HDR_LENGTH(ipha)); in esp_strip_header()
813 divpoint = IPH_HDR_LENGTH(ipha); in esp_strip_header()
838 ipha->ipha_protocol = nexthdr; in esp_strip_header()
843 if (padlen >= ntohs(ipha->ipha_length) - sizeof (ipha_t) - 2 - in esp_strip_header()
[all …]
H A Dipdrop.c319 ipha_t *ipha = (ipha_t *)mp->b_rptr; in ip_drop_input() local
322 ipha, __dtrace_ipsr_ill_t *, ill, ipha_t *, ipha, in ip_drop_input()
341 ipha_t *ipha = (ipha_t *)mp->b_rptr; in ip_drop_output() local
344 ipha, __dtrace_ipsr_ill_t *, ill, ipha_t *, ipha, in ip_drop_output()
H A Digmp.c73 static uint_t igmp_query_in(ipha_t *ipha, igmpa_t *igmpa, ill_t *ill);
314 ipha_t *ipha = (ipha_t *)(mp->b_rptr); in igmp_input() local
347 ipha = (ipha_t *)(mp->b_rptr); in igmp_input()
359 src = ipha->ipha_src; in igmp_input()
360 dst = ipha->ipha_dst; in igmp_input()
375 next = igmp_query_in(ipha, igmpa, ill); in igmp_input()
443 ipha->ipha_src = src; in igmp_input()
486 igmp_query_in(ipha_t *ipha, igmpa_t *igmpa, ill_t *ill) in igmp_query_in() argument
527 if (ipha->ipha_dst != htonl(INADDR_ALLHOSTS_GROUP) || in igmp_query_in()
1832 ipha_t *ipha; in igmp_sendpkt() local
[all …]
H A Dspd.c101 struct ipsec_action_s *, ipha_t *ipha, ip6_t *ip6h, const char **,
1023 ipsec_log_policy_failure(int type, char *func_name, ipha_t *ipha, ip6_t *ip6h, in ipsec_log_policy_failure() argument
1032 ASSERT((ipha == NULL && ip6h != NULL) || in ipsec_log_policy_failure()
1033 (ip6h == NULL && ipha != NULL)); in ipsec_log_policy_failure()
1035 if (ipha != NULL) { in ipsec_log_policy_failure()
1036 s = inet_ntop(AF_INET, &ipha->ipha_src, sbuf, sizeof (sbuf)); in ipsec_log_policy_failure()
1037 d = inet_ntop(AF_INET, &ipha->ipha_dst, dbuf, sizeof (dbuf)); in ipsec_log_policy_failure()
1566 ipha_t *ipha, ip6_t *ip6h, const char **reason, kstat_named_t **counter, in ipsec_check_ipsecin_action() argument
1576 ASSERT((ipha == NULL && ip6h != NULL) || in ipsec_check_ipsecin_action()
1577 (ip6h == NULL && ipha != NULL)); in ipsec_check_ipsecin_action()
[all …]
H A Dicmp.c1146 ipha_t *ipha; in icmp_icmp_input() local
1152 ipha = (ipha_t *)mp->b_rptr; in icmp_icmp_input()
1156 if (IPH_HDR_VERSION(ipha) != IPV4_VERSION) { in icmp_icmp_input()
1157 ASSERT(IPH_HDR_VERSION(ipha) == IPV6_VERSION); in icmp_icmp_input()
1161 ASSERT(IPH_HDR_VERSION(ipha) == IPV4_VERSION); in icmp_icmp_input()
1164 ASSERT(IPH_HDR_LENGTH(ipha) == ira->ira_ip_hdr_length); in icmp_icmp_input()
1167 ipha = (ipha_t *)&icmph[1]; /* Inner IP header */ in icmp_icmp_input()
1169 iph_hdr_length = IPH_HDR_LENGTH(ipha); in icmp_icmp_input()
1175 ipha_t *ipha; in icmp_icmp_input() local
1197 ipha = (ipha_t *)connp->conn_ht_iphc; in icmp_icmp_input()
[all …]
H A Dipclassifier.c1531 ipha_t *ipha; in ipcl_classify_v4() local
1540 ipha = (ipha_t *)mp->b_rptr; in ipcl_classify_v4()
1541 up = (uint16_t *)((uchar_t *)ipha + hdr_len + TCP_PORTS_OFFSET); in ipcl_classify_v4()
1547 &ipst->ips_ipcl_conn_fanout[IPCL_CONN_HASH(ipha->ipha_src, in ipcl_classify_v4()
1553 ipha->ipha_src, ipha->ipha_dst, ports) && in ipcl_classify_v4()
1582 if (IPCL_BIND_MATCH(connp, protocol, ipha->ipha_dst, in ipcl_classify_v4()
1602 !tsol_receive_local(mp, &ipha->ipha_dst, IPV4_VERSION, in ipcl_classify_v4()
1627 if (IPCL_UDP_MATCH(connp, lport, ipha->ipha_dst, in ipcl_classify_v4()
1628 fport, ipha->ipha_src) && in ipcl_classify_v4()
1637 !tsol_receive_local(mp, &ipha->ipha_dst, IPV4_VERSION, in ipcl_classify_v4()
[all …]
/titanic_44/usr/src/uts/common/inet/
H A Dip_impl.h71 #define IPH_TCPH_CHECKSUMP(ipha, hlen) \ argument
72 ((uint16_t *)(((uchar_t *)(ipha)) + ((hlen) + TCP_CHECKSUM_OFFSET)))
74 #define IPH_UDPH_CHECKSUMP(ipha, hlen) \ argument
75 ((uint16_t *)(((uchar_t *)(ipha)) + ((hlen) + UDP_CHECKSUM_OFFSET)))
77 #define IPH_ICMPV6_CHECKSUMP(ipha, hlen) \ argument
78 ((uint16_t *)(((uchar_t *)(ipha)) + ((hlen) + ICMPV6_CHECKSUM_OFFSET)))
124 #define IS_SIMPLE_IPH(ipha) \ argument
125 ((ipha)->ipha_version_and_hdr_length == IP_SIMPLE_HDR_VERSION)
163 #define MBLK_RX_FANOUT_SLOWPATH(mp, ipha) \ argument
164 (DB_TYPE(mp) != M_DATA || DB_REF(mp) != 1 || !OK_32PTR(ipha) || \
[all …]
/titanic_44/usr/src/uts/common/ipp/dscpmk/
H A Ddscpmk.c50 ipha_t *ipha; in dscpmk_process() local
82 ipha = (ipha_t *)mp->b_rptr; in dscpmk_process()
98 if (IPH_HDR_VERSION(ipha) == IPV4_VERSION) { in dscpmk_process()
99 dscp = ipha->ipha_type_of_service; in dscpmk_process()
147 ipha->ipha_type_of_service = new_dscp; in dscpmk_process()
154 ipha->ipha_hdr_checksum = 0; in dscpmk_process()
155 ipha->ipha_hdr_checksum = ip_csum_hdr(ipha); in dscpmk_process()
/titanic_44/usr/src/uts/common/inet/sctp/
H A Dsctp_shutdown.c229 ipha_t *ipha = NULL; in sctp_ootb_shutdown_ack() local
278 ipha = (ipha_t *)mp->b_rptr; in sctp_ootb_shutdown_ack()
282 ipha->ipha_length = htons(ixas.ixa_pktlen); in sctp_ootb_shutdown_ack()
283 v4addr = ipha->ipha_src; in sctp_ootb_shutdown_ack()
284 ipha->ipha_src = ipha->ipha_dst; in sctp_ootb_shutdown_ack()
285 ipha->ipha_dst = v4addr; in sctp_ootb_shutdown_ack()
286 ipha->ipha_ident = 0; in sctp_ootb_shutdown_ack()
287 ipha->ipha_ttl = (uchar_t)sctps->sctps_ipv4_ttl; in sctp_ootb_shutdown_ack()
344 if (!ipsec_in_to_out(ira, &ixas, mp, ipha, ip6h)) { in sctp_ootb_shutdown_ack()
H A Dsctp_error.c328 ipha_t *ipha = NULL; in sctp_ootb_send_abort() local
368 ipha = (ipha_t *)mp->b_rptr; in sctp_ootb_send_abort()
372 ipha->ipha_length = htons(ahlen); in sctp_ootb_send_abort()
373 v4addr = ipha->ipha_src; in sctp_ootb_send_abort()
374 ipha->ipha_src = ipha->ipha_dst; in sctp_ootb_send_abort()
375 ipha->ipha_dst = v4addr; in sctp_ootb_send_abort()
376 ipha->ipha_ident = 0; in sctp_ootb_send_abort()
377 ipha->ipha_ttl = (uchar_t)sctps->sctps_ipv4_ttl; in sctp_ootb_send_abort()
427 ipha->ipha_length = htons(ixas.ixa_pktlen); in sctp_ootb_send_abort()
450 if (!ipsec_in_to_out(ira, &ixas, mp, ipha, ip6h)) { in sctp_ootb_send_abort()
/titanic_44/usr/src/uts/common/inet/ilb/
H A Dilb_nat.c443 ipha_t *ipha; in ilb_full_nat() local
445 ipha = iph; in ilb_full_nat()
448 ipha->ipha_src); in ilb_full_nat()
450 ipha->ipha_dst); in ilb_full_nat()
454 IN6_V4MAPPED_TO_IPADDR(&info->vip, ipha->ipha_src); in ilb_full_nat()
455 IN6_V4MAPPED_TO_IPADDR(&info->src, ipha->ipha_dst); in ilb_full_nat()
459 adj_cksum(&ipha->ipha_hdr_checksum, adj_ip_sum); in ilb_full_nat()
518 ipha_t *ipha; in ilb_half_nat() local
520 ipha = iph; in ilb_half_nat()
523 ipha->ipha_dst); in ilb_half_nat()
[all …]
/titanic_44/usr/src/uts/common/ipp/meters/
H A Dtswtcl.c63 ipha_t *ipha; in tswtcl_process() local
98 ipha = (ipha_t *)mp->b_rptr; in tswtcl_process()
99 if (IPH_HDR_VERSION(ipha) == IPV4_VERSION) { in tswtcl_process()
100 pkt_len = ntohs(ipha->ipha_length); in tswtcl_process()
H A Dtokenmt.c75 ipha_t *ipha; in tokenmt_process() local
108 ipha = (ipha_t *)mp->b_rptr; in tokenmt_process()
109 if (IPH_HDR_VERSION(ipha) == IPV4_VERSION) { in tokenmt_process()
111 dscp = ipha->ipha_type_of_service; in tokenmt_process()
112 pkt_len = ntohs(ipha->ipha_length); in tokenmt_process()
/titanic_44/usr/src/uts/common/ipp/ipgpc/
H A Dclassifier.c494 ipha_t *ipha = (ipha_t *)iph; in get_port_info() local
496 u2 = ntohs(ipha->ipha_fragment_offset_and_flags); in get_port_info()
501 iplen = (ipha->ipha_version_and_hdr_length & 0xF) << 2; in get_port_info()
610 ipha_t *ipha; in parse_packet() local
613 ipha = (ipha_t *)mp->b_rptr; /* get ip header */ in parse_packet()
614 V4_PART_OF_V6(packet->saddr) = (int32_t)ipha->ipha_src; in parse_packet()
615 V4_PART_OF_V6(packet->daddr) = (int32_t)ipha->ipha_dst; in parse_packet()
616 packet->dsfield = ipha->ipha_type_of_service; in parse_packet()
617 packet->proto = ipha->ipha_protocol; in parse_packet()
625 get_port_info(packet, ipha, AF_INET, mp); in parse_packet()
/titanic_44/usr/src/uts/common/ipp/flowacct/
H A Dflowacct.c114 ipha_t *ipha = (ipha_t *)iph; in flowacct_port_info() local
118 u2 = ntohs(ipha->ipha_fragment_offset_and_flags); in flowacct_port_info()
123 iplen = (ipha->ipha_version_and_hdr_length & 0xF) << 2; in flowacct_port_info()
231 ipha_t *ipha; in flowacct_extract_header() local
233 #define rptr ((uchar_t *)ipha) in flowacct_extract_header()
243 ipha = (ipha_t *)mp->b_rptr; in flowacct_extract_header()
244 header->isv4 = IPH_HDR_VERSION(ipha) == IPV4_VERSION; in flowacct_extract_header()
246 ipha = (ipha_t *)mp->b_rptr; in flowacct_extract_header()
247 V4_PART_OF_V6(header->saddr) = (int32_t)ipha->ipha_src; in flowacct_extract_header()
248 V4_PART_OF_V6(header->daddr) = (int32_t)ipha->ipha_dst; in flowacct_extract_header()
[all …]
/titanic_44/usr/src/uts/common/io/mac/
H A Dmac_util.c171 ipha_t *ipha = NULL; in mac_fix_cksum() local
189 ipha = (ipha_t *)(mp->b_rptr + offset); in mac_fix_cksum()
200 proto = ipha->ipha_protocol; in mac_fix_cksum()
201 ASSERT(ipha->ipha_version_and_hdr_length == in mac_fix_cksum()
207 up = IPH_TCPH_CHECKSUMP(ipha, in mac_fix_cksum()
213 up = IPH_UDPH_CHECKSUMP(ipha, in mac_fix_cksum()
226 src = ipha->ipha_src; in mac_fix_cksum()
227 dst = ipha->ipha_dst; in mac_fix_cksum()
228 len = ntohs(ipha->ipha_length) - in mac_fix_cksum()
257 ASSERT(ipha != NULL); in mac_fix_cksum()
[all …]
/titanic_44/usr/src/uts/common/inet/iptun/
H A Diptun.c2260 is_icmp_error(mblk_t *mp, ipha_t *ipha, ip6_t *ip6h) in is_icmp_error() argument
2264 if (ipha != NULL) { in is_icmp_error()
2268 if (ipha->ipha_protocol != IPPROTO_ICMP) in is_icmp_error()
2271 hlen = IPH_HDR_LENGTH(ipha); in is_icmp_error()
2272 icmph = (icmph_t *)((uint8_t *)ipha + hlen); in is_icmp_error()
2302 ipha_t *ipha; in iptun_find_headers() local
2314 ipha = (ipha_t *)(mp->b_rptr); in iptun_find_headers()
2315 switch (IPH_HDR_VERSION(ipha)) { in iptun_find_headers()
2317 *outer4 = ipha; in iptun_find_headers()
2320 outer_hlen = IPH_HDR_LENGTH(ipha); in iptun_find_headers()
[all …]

123