Lines Matching defs:is
89 * RAWIP is MT and uses the usual kernel synchronization primitives. We use
93 * ICMP is always a device driver. For compatibility with mibopen() code
94 * it is possible to I_PUSH "icmp", but that results in pushing a passthrough
213 TS_UNBND, /* CURRENT_state. This is set from icmp_state. */
301 * This routine is called to handle each O_T_BIND_REQ/T_BIND_REQ message
305 * If everything is ok it then sends the T_BIND_ACK back up.
324 * But in case there is some other M_PROTO that looks
497 * each time an outbound packet is passed to it.
546 * sendto have a starting point. Since conn_last_dst is zero the
629 * But in case there is some other M_PROTO that looks
772 /* Due to check above, we know sin6_addr is v6-only. */
783 * If there is a different thread using conn_ixa then we get a new
786 * Once connect() is done other threads can use conn_ixa since the
798 * Reject if a connect is in progress (we drop conn_lock during
826 * Update the T_CONN_REQ (sin/sin6) since it is used to
841 * Update the T_CONN_REQ (sin/sin6) since it is used to
881 * is dropped we set icmp_state and clear conn_v6lastdst.
989 * stream is being closed while in fallback
1027 * as an indicating that ICMP is no longer connected. This results
1071 * T_error_ack is > than T_ok_ack
1135 * icmp_icmp_input is called as conn_recvicmp to process ICMP messages.
1265 * icmp_icmp_error_ipv6 is called by icmp_icmp_error to process ICMP for IPv6.
1342 * newmp->b_cont is left to NULL on purpose. This is an
1435 * This routine responds to T_ADDR_REQ messages. It is called by icmp_wput.
1436 * The local address is filled in if endpoint is bound. The remote address
1437 * is filled in if remote address has been precified ("connected endpoint")
1438 * (The concept of connected CLTS sockets is alien to published TPI
1530 * This routine responds to T_CAPABILITY_REQ messages. It is called by
1531 * icmp_wput. Much of the T_CAPABILITY_ACK information is copied from
1532 * icmp_g_t_info_ack. The current state of the stream is copied from
1557 * This routine responds to T_INFO_REQ messages. It is called by icmp_wput.
1558 * Most of the T_INFO_ACK information is copied from icmp_g_t_info_ack.
1559 * The current state of the stream is copied from icmp_state.
1583 /* If the stream is already open, return immediately. */
1591 * Since ICMP is not used so heavily, allocating from the small
1661 * This is the open routine for icmp. It allocates a icmp_t structure for
1671 icmp_stack_t *is;
1684 is = ns->netstack_icmp;
1685 ASSERT(is != NULL);
1708 * Since this conn_t/icmp_t is not yet visible to anybody else we don't
1727 connp->conn_default_ttl = is->is_ipv6_hoplimit;
1736 connp->conn_default_ttl = is->is_ipv4_ttl;
1744 * For the socket of protocol IPPROTO_RAW or when IP_HDRINCL is set,
1745 * the checksum is provided in the pre-built packet. We clear
1764 icmp->icmp_is = is;
1766 connp->conn_rcvbuf = is->is_recv_hiwat;
1767 connp->conn_sndbuf = is->is_xmit_hiwat;
1768 connp->conn_sndlowat = is->is_xmit_lowat;
1771 connp->conn_wroff = len + is->is_wroff_extra;
1789 if (is->is_pmtu_discovery)
1813 icmp_stack_t *is = icmp->icmp_is;
1836 *i1 = is->is_ipv6_hoplimit;
1977 icmp_stack_t *is = icmp->icmp_is;
1986 * of passed in length is done. It is assumed *_optcom_req()
2047 if (*i1 > is->is_max_buf) {
2052 if (*i1 > is->is_max_buf) {
2089 * checksum is located.
2178 icmp_stack_t *is = icmp->icmp_is;
2187 * inlen == 0 implies that there is no
2340 wroff = connp->conn_ht_iphc_allocated + is->is_wroff_extra;
2372 * Note that IP_HDRINCL has ipha_protocol that is different than conn_proto,
2381 icmp_stack_t *is = connp->conn_netstack->netstack_icmp;
2387 flowinfo, 0, data_mp, data_len, is->is_wroff_extra, &cksum, errorp);
2476 * is stored in conn_sum.
2551 * This is the inbound data path.
2570 icmp_stack_t *is;
2578 is = icmp->icmp_is;
2614 if (is->is_bsd_compat) {
2628 BUMP_MIB(&is->is_rawip_mib,
2646 * sockets. This is ensured by icmp_bind and the IP fanout code.
2651 * This is the inbound data path. Packets are passed upstream
2670 BUMP_MIB(&is->is_rawip_mib, rawipInErrors);
2692 * Add options if IP_RECVIF etc is set
2777 BUMP_MIB(&is->is_rawip_mib, rawipInCksumErrs);
2793 BUMP_MIB(&is->is_rawip_mib, rawipInErrors);
2820 IPCL_ZONEID(connp), is->is_netstack);
2832 BUMP_MIB(&is->is_rawip_mib, rawipInDatagrams);
2846 icmp_stack_t *is = connp->conn_netstack->netstack_icmp;
2865 (void) snmp_append_data(mpdata, (char *)&is->is_rawip_mib,
2866 sizeof (is->is_rawip_mib));
2894 * passed in mp. This message is freed.
2967 * This routine is called by icmp_wput to handle T_UNBIND_REQ messages.
2968 * After some error checking, the message is passed downstream to ip.
2994 * should not happen in practice... T_OK_ACK is smaller than the
3008 * The packet is assumed to have a base (20 byte) IP header followed
3016 icmp_stack_t *is = icmp->icmp_is;
3037 BUMP_MIB(&is->is_rawip_mib, rawipOutErrors);
3064 BUMP_MIB(&is->is_rawip_mib, rawipOutErrors);
3072 BUMP_MIB(&is->is_rawip_mib, rawipOutErrors);
3083 BUMP_MIB(&is->is_rawip_mib, rawipOutErrors);
3110 is->is_netstack->netstack_ip, B_FALSE)
3161 BUMP_MIB(&is->is_rawip_mib, rawipOutErrors);
3178 * with this host, and pretend that the destination is
3186 * no locking is needed.
3191 BUMP_MIB(&is->is_rawip_mib, rawipOutErrors);
3208 BUMP_MIB(&is->is_rawip_mib, rawipOutErrors);
3214 BUMP_MIB(&is->is_rawip_mib, rawipOutErrors);
3232 * Make sure that the IP header plus any transport header that is
3233 * checksumed by ip_output is in the first mblk. (ip_output assumes
3234 * that at least the checksum field is in the first mblk.)
3250 BUMP_MIB(&is->is_rawip_mib, rawipOutErrors);
3269 BUMP_MIB(&is->is_rawip_mib, rawipOutErrors);
3276 BUMP_MIB(&is->is_rawip_mib, rawipOutDatagrams);
3326 * Either tudr_mp or msg is set. If tudr_mp we take ancillary data from
3328 * If both sin and sin6 is set it is a connected socket and we use conn_faddr.
3336 icmp_stack_t *is = icmp->icmp_is;
3359 BUMP_MIB(&is->is_rawip_mib, rawipOutErrors);
3382 BUMP_MIB(&is->is_rawip_mib, rawipOutErrors);
3390 BUMP_MIB(&is->is_rawip_mib, rawipOutErrors);
3424 BUMP_MIB(&is->is_rawip_mib, rawipOutErrors);
3431 * If laddr is unspecified then we look at sin6_src_id.
3433 * (aka IPPF_ADDR) but that is handled in build_hdrs. However, we don't
3435 * IPV6_PKTINFO is specified.
3492 * only if it is not a local addresses
3502 is->is_netstack->netstack_ip, B_FALSE);
3505 is->is_netstack->netstack_ip, B_FALSE, B_FALSE);
3547 BUMP_MIB(&is->is_rawip_mib, rawipOutErrors);
3562 * with this host, and pretend that the destination is
3570 * no locking is needed.
3575 BUMP_MIB(&is->is_rawip_mib, rawipOutErrors);
3582 BUMP_MIB(&is->is_rawip_mib, rawipOutErrors);
3588 BUMP_MIB(&is->is_rawip_mib, rawipOutErrors);
3596 BUMP_MIB(&is->is_rawip_mib, rawipOutErrors);
3602 BUMP_MIB(&is->is_rawip_mib, rawipOutDatagrams);
3654 icmp_stack_t *is = icmp->icmp_is;
3660 * If no other thread is using conn_ixa this just gets a reference to
3665 BUMP_MIB(&is->is_rawip_mib, rawipOutErrors);
3696 BUMP_MIB(&is->is_rawip_mib, rawipOutErrors);
3706 BUMP_MIB(&is->is_rawip_mib, rawipOutErrors);
3768 BUMP_MIB(&is->is_rawip_mib, rawipOutErrors);
3778 BUMP_MIB(&is->is_rawip_mib, rawipOutDatagrams);
3815 icmp_stack_t *is = icmp->icmp_is;
3848 BUMP_MIB(&is->is_rawip_mib, rawipOutErrors);
3858 BUMP_MIB(&is->is_rawip_mib, rawipOutErrors);
3920 BUMP_MIB(&is->is_rawip_mib, rawipOutErrors);
3930 BUMP_MIB(&is->is_rawip_mib, rawipOutDatagrams);
3972 * it's setting is different if rthdr or source route.
3974 * Returns NULL is allocation failed or if the packet would exceed IP_MAXPACKET.
3982 icmp_stack_t *is = icmp->icmp_is;
4009 mp1 = allocb(copylen + is->is_wroff_extra, BPRI_MED);
4130 icmp_stack_t *is = icmp->icmp_is;
4144 BUMP_MIB(&is->is_rawip_mib, rawipOutErrors);
4191 * This is not a problem when sockfs is directly
4193 * is first bound before allowing data to be sent.
4219 * If the local address is a mapped address return
4223 * since it is bound to a mapped address.
4356 /* mp is freed by the following routine */
4361 BUMP_MIB(&is->is_rawip_mib, rawipOutErrors);
4364 /* mp is freed by the following routine */
4379 icmp_stack_t *is = icmp->icmp_is;
4409 * same as the connected one, which is not the case here since we
4422 * If laddr is unspecified then we look at sin6_src_id.
4424 * (aka IPPF_ADDR) but that is handled in build_hdrs. However, we don't
4426 * IPV6_PKTINFO is specified.
4534 * connecting thread is the one that updates conn_ixa, conn_ht_*
4564 * with this host, and pretend that the destination is
4644 BUMP_MIB(&is->is_rawip_mib, rawipOutErrors);
4651 BUMP_MIB(&is->is_rawip_mib, rawipOutDatagrams);
4696 BUMP_MIB(&is->is_rawip_mib, rawipOutErrors);
4763 * But in case there is some other M_PROTO that looks
4784 * But in case there is some other M_PROTO that looks
4801 /* The following TPI message is not supported by icmp. */
4863 * icmp_wput_iocdata is called by icmp_wput_other to handle all M_IOCDATA
4875 /* Make sure it is one of ours. */
4971 * We want to be informed each time a stack is created or
4992 icmp_stack_t *is;
4997 is = (icmp_stack_t *)kmem_zalloc(sizeof (*is), KM_SLEEP);
4998 is->is_netstack = ns;
5001 is->is_propinfo_tbl = (mod_prop_info_t *)kmem_alloc(arrsz, KM_SLEEP);
5002 bcopy(icmp_propinfo_tbl, is->is_propinfo_tbl, arrsz);
5004 is->is_ksp = rawip_kstat_init(stackid);
5007 error = ldi_ident_from_major(major, &is->is_ldi_ident);
5009 return (is);
5018 icmp_stack_t *is = (icmp_stack_t *)arg;
5020 kmem_free(is->is_propinfo_tbl, sizeof (icmp_propinfo_tbl));
5021 is->is_propinfo_tbl = NULL;
5023 rawip_kstat_fini(stackid, is->is_ksp);
5024 is->is_ksp = NULL;
5025 ldi_ident_release(is->is_ldi_ident);
5026 kmem_free(is, sizeof (*is));
5071 icmp_stack_t *is;
5084 is = ns->netstack_icmp;
5085 if (is == NULL) {
5089 rawipkp->inDatagrams.value.ui32 = is->is_rawip_mib.rawipInDatagrams;
5090 rawipkp->inCksumErrs.value.ui32 = is->is_rawip_mib.rawipInCksumErrs;
5091 rawipkp->inErrors.value.ui32 = is->is_rawip_mib.rawipInErrors;
5092 rawipkp->outDatagrams.value.ui32 = is->is_rawip_mib.rawipOutDatagrams;
5093 rawipkp->outErrors.value.ui32 = is->is_rawip_mib.rawipOutErrors;
5583 * so this check for NULL is just a performance optimization.
5586 icmp_stack_t *is = connp->conn_icmp->icmp_is;
5588 ASSERT(is->is_ldi_ident != NULL);
5593 error = ip_create_helper_stream(connp, is->is_ldi_ident);
5632 icmp_stack_t *is = icmp->icmp_is;
5661 BUMP_MIB(&is->is_rawip_mib, rawipOutErrors);
5667 if (is->is_sendto_ignerr)
5676 BUMP_MIB(&is->is_rawip_mib, rawipOutErrors);
5685 if (is->is_sendto_ignerr)
5691 BUMP_MIB(&is->is_rawip_mib, rawipOutErrors);
5697 BUMP_MIB(&is->is_rawip_mib, rawipOutErrors);
5706 BUMP_MIB(&is->is_rawip_mib, rawipOutErrors);
5712 * If the local address is a mapped address return
5716 * since it is bound to a mapped address.
5719 BUMP_MIB(&is->is_rawip_mib, rawipOutErrors);
5735 BUMP_MIB(&is->is_rawip_mib, rawipOutErrors);
5754 BUMP_MIB(&is->is_rawip_mib, rawipOutErrors);
5776 if (is->is_sendto_ignerr)
5794 BUMP_MIB(&is->is_rawip_mib, rawipOutErrors);
5811 BUMP_MIB(&is->is_rawip_mib, rawipOutErrors);
5833 if (is->is_sendto_ignerr)