Lines Matching defs:ixa
130 sin6_t *sin6, cred_t *cr, pid_t pid, ip_xmit_attr_t *ixa);
727 ip_xmit_attr_t *ixa;
791 ixa = conn_get_ixa(connp, B_FALSE);
792 if (ixa == NULL)
803 ixa_refrele(ixa);
861 ASSERT(!(ixa->ixa_free_flags & IXA_FREE_CRED));
862 ixa->ixa_cred = cr;
863 ixa->ixa_cpid = pid;
866 ip_xmit_attr_restore_tsl(ixa, ixa->ixa_cred);
870 ixa->ixa_flags |= IXAF_SCOPEID_SET;
871 ixa->ixa_scopeid = scopeid;
874 ixa->ixa_flags &= ~IXAF_SCOPEID_SET;
919 oldixa = conn_replace_ixa(connp, ixa);
923 ixa_refrele(ixa);
927 if (ixa != NULL)
928 ixa_refrele(ixa);
1176 ip_xmit_attr_t *ixa;
1184 ixa = conn_get_ixa(connp, B_FALSE);
1185 if (ixa == NULL || ixa->ixa_ire == NULL) {
1190 if (ixa != NULL)
1191 ixa_refrele(ixa);
1194 (void) ip_get_pmtu(ixa);
1198 if (ixa->ixa_flags & IXAF_PMTU_IPV4_DF) {
1206 ixa_refrele(ixa);
1780 /* Cache things in ixa without an extra refhold */
1975 ip_xmit_attr_t *ixa = coa->coa_ixa;
2004 ixa->ixa_protocol = connp->conn_proto;
2009 ixa->ixa_flags &= ~IXAF_SET_ULP_CKSUM;
2015 ixa->ixa_flags &= ~IXAF_SET_ULP_CKSUM;
2018 ixa->ixa_flags |= IXAF_SET_ULP_CKSUM;
2024 ixa->ixa_flags &= ~IXAF_SET_RAW_CKSUM;
2025 ixa->ixa_raw_cksum_offset = 2;
2072 ixa->ixa_flags &= ~IXAF_SET_ULP_CKSUM;
2074 ixa->ixa_flags |= IXAF_SET_ULP_CKSUM;
2106 ixa->ixa_flags &= ~IXAF_SET_RAW_CKSUM;
2107 ixa->ixa_raw_cksum_offset = 0;
2108 ixa->ixa_flags &= ~IXAF_SET_ULP_CKSUM;
2110 ixa->ixa_flags |= IXAF_SET_RAW_CKSUM;
2111 ixa->ixa_raw_cksum_offset = *i1;
2112 ixa->ixa_flags |= IXAF_SET_ULP_CKSUM;
2376 icmp_prepend_hdr(conn_t *connp, ip_xmit_attr_t *ixa, const ip_pkt_t *ipp,
2386 mp = conn_prepend_hdr(ixa, ipp, v6src, v6dst, connp->conn_proto,
2393 ixa->ixa_pktlen = data_len + ixa->ixa_ip_hdr_length;
2412 if (ixa->ixa_flags & IXAF_IS_IPV4) {
2415 ASSERT(ntohs(ipha->ipha_length) == ixa->ixa_pktlen);
2420 ASSERT(ntohs(ip6h->ip6_plen) + IPV6_HDR_LEN == ixa->ixa_pktlen);
2422 if (ixa->ixa_flags & IXAF_SET_ULP_CKSUM) {
2424 cksum_offset = ixa->ixa_ip_hdr_length +
2426 } else if (ixa->ixa_flags & IXAF_SET_RAW_CKSUM) {
2427 cksum_offset = ixa->ixa_ip_hdr_length +
2428 ixa->ixa_raw_cksum_offset;
3021 ip_xmit_attr_t *ixa;
3035 ixa = conn_get_ixa_exclusive(connp);
3036 if (ixa == NULL) {
3046 ASSERT(!(ixa->ixa_free_flags & IXA_FREE_CRED));
3047 ixa->ixa_cred = cr;
3048 ixa->ixa_cpid = pid;
3051 ip_xmit_attr_restore_tsl(ixa, ixa->ixa_cred);
3055 ip_attr_newdst(ixa);
3060 ASSERT(!(ixa->ixa_free_flags & IXA_FREE_CRED));
3061 ixa->ixa_cred = connp->conn_cred; /* Restore */
3062 ixa->ixa_cpid = connp->conn_cpid;
3063 ixa_refrele(ixa);
3098 ixa->ixa_flags |= (IXAF_DONTFRAG | IXAF_PMTU_IPV4_DF);
3100 ixa->ixa_flags &= ~(IXAF_DONTFRAG | IXAF_PMTU_IPV4_DF);
3103 ixa->ixa_flags |= IXAF_NO_TTL_CHANGE;
3109 ip_laddr_verify_v4(ipha->ipha_src, ixa->ixa_zoneid,
3112 ixa->ixa_flags &= ~IXAF_VERIFY_SOURCE;
3123 ixa->ixa_flags |= IXAF_IS_IPV4;
3125 ip_attr_nexthop(ipp, ixa, &v6dst, &v6nexthop);
3126 error = ip_attr_connect(connp, ixa, &v6src, &v6dst, &v6nexthop,
3149 if (ixa->ixa_ire != NULL) {
3172 * TSOL Note: We have an exclusive ipp and ixa for this thread so we
3188 error = conn_update_label(connp, ixa, &v6dst, ipp);
3206 mp = icmp_prepend_hdr(connp, ixa, ipp, &v6src, &v6dst, 0, mp, &error);
3212 if (ixa->ixa_pktlen > IP_MAXPACKET) {
3229 ixa->ixa_protocol = ipha->ipha_protocol;
3262 if (ixa->ixa_ipsec_policy != NULL) {
3263 IPPOL_REFRELE(ixa->ixa_ipsec_policy);
3264 ixa->ixa_ipsec_policy = NULL;
3265 ixa->ixa_flags &= ~IXAF_IPSEC_SECURE;
3267 mp = ip_output_attach_policy(mp, ipha, NULL, connp, ixa);
3278 error = conn_ip_output(mp, ixa);
3284 (void) ixa_check_drain_insert(connp, ixa);
3296 ASSERT(!(ixa->ixa_free_flags & IXA_FREE_CRED));
3297 ixa->ixa_cred = connp->conn_cred; /* Restore */
3298 ixa->ixa_cpid = connp->conn_cpid;
3299 ixa_refrele(ixa);
3306 icmp_output_attach_policy(mblk_t *mp, conn_t *connp, ip_xmit_attr_t *ixa)
3311 if (ixa->ixa_flags & IXAF_IS_IPV4)
3316 if (ixa->ixa_ipsec_policy != NULL) {
3317 IPPOL_REFRELE(ixa->ixa_ipsec_policy);
3318 ixa->ixa_ipsec_policy = NULL;
3319 ixa->ixa_flags &= ~IXAF_IPSEC_SECURE;
3321 return (ip_output_attach_policy(mp, ipha, ip6h, connp, ixa));
3338 ip_xmit_attr_t *ixa;
3351 * Get ixa before checking state to handle a disconnect race.
3357 ixa = conn_get_ixa_exclusive(connp);
3358 if (ixa == NULL) {
3364 ASSERT(!(ixa->ixa_free_flags & IXA_FREE_CRED));
3365 ixa->ixa_cred = cr;
3366 ixa->ixa_cpid = pid;
3369 ip_xmit_attr_restore_tsl(ixa, ixa->ixa_cred);
3373 ip_attr_newdst(ixa);
3378 ASSERT(!(ixa->ixa_free_flags & IXA_FREE_CRED));
3379 ixa->ixa_cred = connp->conn_cred; /* Restore */
3380 ixa->ixa_cpid = connp->conn_cpid;
3381 ixa_refrele(ixa);
3396 * Parse the options and update ixa and ipp as a result.
3401 coa->coa_ixa = ixa;
3444 ixa->ixa_flags &= ~IXAF_SCOPEID_SET;
3445 ixa->ixa_flags |= IXAF_IS_IPV4;
3455 ixa->ixa_scopeid = sin6->sin6_scope_id;
3456 ixa->ixa_flags |= IXAF_SCOPEID_SET;
3458 ixa->ixa_flags &= ~IXAF_SCOPEID_SET;
3462 ixa->ixa_flags |= IXAF_IS_IPV4;
3464 ixa->ixa_flags &= ~IXAF_IS_IPV4;
3482 if (ixa->ixa_flags & IXAF_IS_IPV4) {
3497 if (ixa->ixa_flags & IXAF_IS_IPV4) {
3501 laddr_type = ip_laddr_verify_v4(v4src, ixa->ixa_zoneid,
3504 laddr_type = ip_laddr_verify_v6(&v6src, ixa->ixa_zoneid,
3508 ixa->ixa_flags &= ~IXAF_VERIFY_SOURCE;
3511 ip_attr_nexthop(ipp, ixa, &v6dst, &v6nexthop);
3512 error = ip_attr_connect(connp, ixa, &v6src, &v6dst, &v6nexthop, dstport,
3535 if (ixa->ixa_ire != NULL) {
3556 * TSOL Note: We have an exclusive ipp and ixa for this thread so we
3572 error = conn_update_label(connp, ixa, &v6dst, ipp);
3579 mp = icmp_prepend_hdr(connp, ixa, ipp, &v6src, &v6dst, flowinfo, mp,
3586 if (ixa->ixa_pktlen > IP_MAXPACKET) {
3594 mp = icmp_output_attach_policy(mp, connp, ixa);
3604 error = conn_ip_output(mp, ixa);
3606 ixa->ixa_flags |= IXAF_VERIFY_SOURCE;
3612 (void) ixa_check_drain_insert(connp, ixa);
3637 ASSERT(!(ixa->ixa_free_flags & IXA_FREE_CRED));
3638 ixa->ixa_cred = connp->conn_cred; /* Restore */
3639 ixa->ixa_cpid = connp->conn_cpid;
3640 ixa_refrele(ixa);
3656 ip_xmit_attr_t *ixa;
3663 ixa = conn_get_ixa(connp, B_FALSE);
3664 if (ixa == NULL) {
3671 ASSERT(!(ixa->ixa_free_flags & IXA_FREE_CRED));
3672 ixa->ixa_cred = cr;
3673 ixa->ixa_cpid = pid;
3676 switch (ixa->ixa_protocol) {
3686 mp = icmp_prepend_header_template(connp, ixa, mp,
3692 ASSERT(!(ixa->ixa_free_flags & IXA_FREE_CRED));
3693 ixa->ixa_cred = connp->conn_cred; /* Restore */
3694 ixa->ixa_cpid = connp->conn_cpid;
3695 ixa_refrele(ixa);
3703 mp = icmp_output_attach_policy(mp, connp, ixa);
3707 ASSERT(!(ixa->ixa_free_flags & IXA_FREE_CRED));
3708 ixa->ixa_cred = connp->conn_cred; /* Restore */
3709 ixa->ixa_cpid = connp->conn_cpid;
3710 ixa_refrele(ixa);
3719 if (ixa->ixa_ire == NULL) {
3727 ip_attr_nexthop(&connp->conn_xmit_ipp, ixa, &faddr, &nexthop);
3730 error = ip_attr_connect(connp, ixa, &saddr, &faddr, &nexthop,
3753 if (ixa->ixa_ire != NULL) {
3764 ASSERT(!(ixa->ixa_free_flags & IXA_FREE_CRED));
3765 ixa->ixa_cred = connp->conn_cred; /* Restore */
3766 ixa->ixa_cpid = connp->conn_cpid;
3767 ixa_refrele(ixa);
3780 error = conn_ip_output(mp, ixa);
3786 (void) ixa_check_drain_insert(connp, ixa);
3797 ASSERT(!(ixa->ixa_free_flags & IXA_FREE_CRED));
3798 ixa->ixa_cred = connp->conn_cred; /* Restore */
3799 ixa->ixa_cpid = connp->conn_cpid;
3800 ixa_refrele(ixa);
3812 ip_xmit_attr_t *ixa)
3820 ASSERT(ixa != NULL);
3823 ASSERT(!(ixa->ixa_free_flags & IXA_FREE_CRED));
3824 ixa->ixa_cred = cr;
3825 ixa->ixa_cpid = pid;
3828 switch (ixa->ixa_protocol) {
3838 mp = icmp_prepend_header_template(connp, ixa, mp,
3844 ASSERT(!(ixa->ixa_free_flags & IXA_FREE_CRED));
3845 ixa->ixa_cred = connp->conn_cred; /* Restore */
3846 ixa->ixa_cpid = connp->conn_cpid;
3847 ixa_refrele(ixa);
3855 mp = icmp_output_attach_policy(mp, connp, ixa);
3859 ASSERT(!(ixa->ixa_free_flags & IXA_FREE_CRED));
3860 ixa->ixa_cred = connp->conn_cred; /* Restore */
3861 ixa->ixa_cpid = connp->conn_cpid;
3862 ixa_refrele(ixa);
3871 if (ixa->ixa_ire == NULL) {
3879 ip_attr_nexthop(&connp->conn_xmit_ipp, ixa, &lastdst, &nexthop);
3882 error = ip_attr_connect(connp, ixa, &lastsrc, &lastdst,
3905 if (ixa->ixa_ire != NULL) {
3916 ASSERT(!(ixa->ixa_free_flags & IXA_FREE_CRED));
3917 ixa->ixa_cred = connp->conn_cred; /* Restore */
3918 ixa->ixa_cpid = connp->conn_cpid;
3919 ixa_refrele(ixa);
3931 error = conn_ip_output(mp, ixa);
3937 (void) ixa_check_drain_insert(connp, ixa);
3961 ASSERT(!(ixa->ixa_free_flags & IXA_FREE_CRED));
3962 ixa->ixa_cred = connp->conn_cred; /* Restore */
3963 ixa->ixa_cpid = connp->conn_cpid;
3964 ixa_refrele(ixa);
3978 icmp_prepend_header_template(conn_t *connp, ip_xmit_attr_t *ixa, mblk_t *mp,
4002 ixa->ixa_pktlen = pktlen;
4024 ixa->ixa_ip_hdr_length = ip_hdr_length;
4043 if (ixa->ixa_flags & IXAF_IS_IPV4) {
4079 if (ixa->ixa_flags & IXAF_SET_ULP_CKSUM) {
4081 cksum_offset = ixa->ixa_ip_hdr_length +
4083 } else if (ixa->ixa_flags & IXAF_SET_RAW_CKSUM) {
4084 cksum_offset = ixa->ixa_ip_hdr_length +
4085 ixa->ixa_raw_cksum_offset;
4246 ip_xmit_attr_t *ixa;
4254 ixa = conn_get_ixa(connp, B_FALSE);
4255 if (ixa == NULL) {
4263 ipsec_outbound_policy_current(ixa)) {
4266 pid, ixa);
4270 sin6, cr, pid, ixa);
4322 ip_xmit_attr_t *ixa;
4330 ixa = conn_get_ixa(connp, B_FALSE);
4331 if (ixa == NULL) {
4338 ipsec_outbound_policy_current(ixa)) {
4341 pid, ixa);
4345 NULL, cr, pid, ixa);
4376 cred_t *cr, pid_t pid, ip_xmit_attr_t *ixa)
4391 ASSERT(ixa != NULL);
4400 ASSERT(!(ixa->ixa_free_flags & IXA_FREE_CRED));
4401 ixa->ixa_cred = cr;
4402 ixa->ixa_cpid = pid;
4405 ip_xmit_attr_restore_tsl(ixa, ixa->ixa_cred);
4419 ip_attr_newdst(ixa);
4437 ixa->ixa_flags &= ~IXAF_SCOPEID_SET;
4438 ixa->ixa_flags |= IXAF_IS_IPV4;
4447 ixa->ixa_scopeid = sin6->sin6_scope_id;
4448 ixa->ixa_flags |= IXAF_SCOPEID_SET;
4450 ixa->ixa_flags &= ~IXAF_SCOPEID_SET;
4454 ixa->ixa_flags |= IXAF_IS_IPV4;
4456 ixa->ixa_flags &= ~IXAF_IS_IPV4;
4471 if (ixa->ixa_flags & IXAF_IS_IPV4) {
4481 switch (ixa->ixa_protocol) {
4490 ip_attr_nexthop(&connp->conn_xmit_ipp, ixa, &v6dst, &v6nexthop);
4493 error = ip_attr_connect(connp, ixa, &v6src, &v6dst, &v6nexthop, dstport,
4516 if (ixa->ixa_ire != NULL) {
4574 error = conn_update_label(connp, ixa, &v6dst,
4599 if (ixa->ixa_flags & IXAF_IS_IPV4) {
4603 if (ixa->ixa_flags & IXAF_PMTU_IPV4_DF) {
4620 oldixa = conn_replace_ixa(connp, ixa);
4623 connp->conn_lastscopeid = ixa->ixa_scopeid;
4628 data_mp = icmp_prepend_header_template(connp, ixa, data_mp, &v6src,
4642 data_mp = icmp_output_attach_policy(data_mp, connp, ixa);
4653 error = conn_ip_output(data_mp, ixa);
4659 (void) ixa_check_drain_insert(connp, ixa);
4684 ASSERT(!(ixa->ixa_free_flags & IXA_FREE_CRED));
4685 ixa->ixa_cred = connp->conn_cred; /* Restore */
4686 ixa->ixa_cpid = connp->conn_cpid;
4687 ixa_refrele(ixa);
4691 ASSERT(!(ixa->ixa_free_flags & IXA_FREE_CRED));
4692 ixa->ixa_cred = connp->conn_cred; /* Restore */
4693 ixa->ixa_cpid = connp->conn_cpid;
4694 ixa_refrele(ixa);
5634 ip_xmit_attr_t *ixa;
5733 ixa = conn_get_ixa(connp, B_FALSE);
5734 if (ixa == NULL) {
5739 ixa = NULL;
5755 if (ixa != NULL)
5756 ixa_refrele(ixa);
5762 ASSERT(ixa == NULL);
5767 ipsec_outbound_policy_current(ixa)) {
5769 error = icmp_output_lastdst(connp, mp, cr, pid, ixa);
5773 pid, ixa);
5792 ixa = conn_get_ixa(connp, B_FALSE);
5793 if (ixa == NULL) {
5798 ixa = NULL;
5812 if (ixa != NULL)
5813 ixa_refrele(ixa);
5820 ASSERT(ixa == NULL);
5824 ipsec_outbound_policy_current(ixa)) {
5826 error = icmp_output_lastdst(connp, mp, cr, pid, ixa);
5830 pid, ixa);