usr/src/uts/common/inet/ip.h
changeset 741 40027a3621ac
parent 679 f2c9450b58f4
child 898 64b2a371a6bd
equal deleted inserted replaced
740:70e4862c9a1a 741:40027a3621ac
    50 #include <netinet/ip6.h>
    50 #include <netinet/ip6.h>
    51 #include <sys/avl.h>
    51 #include <sys/avl.h>
    52 #include <sys/vmem.h>
    52 #include <sys/vmem.h>
    53 #include <sys/squeue.h>
    53 #include <sys/squeue.h>
    54 #include <sys/systm.h>
    54 #include <sys/systm.h>
       
    55 #include <sys/multidata.h>
    55 
    56 
    56 #ifdef DEBUG
    57 #ifdef DEBUG
    57 #define	ILL_DEBUG
    58 #define	ILL_DEBUG
    58 #define	IRE_DEBUG
    59 #define	IRE_DEBUG
    59 #define	NCE_DEBUG
    60 #define	NCE_DEBUG
    65  * The mt-streams(9F) flags for the IP module; put here so that other
    66  * The mt-streams(9F) flags for the IP module; put here so that other
    66  * "drivers" that are actually IP (e.g., ICMP, UDP) can use the same set
    67  * "drivers" that are actually IP (e.g., ICMP, UDP) can use the same set
    67  * of flags.
    68  * of flags.
    68  */
    69  */
    69 #define	IP_DEVMTFLAGS D_MP
    70 #define	IP_DEVMTFLAGS D_MP
    70 #endif
    71 #endif	/* _KERNEL */
       
    72 
       
    73 #define	IP_MOD_NAME	"ip"
       
    74 #define	IP_DEV_NAME	"/dev/ip"
       
    75 #define	IP6_DEV_NAME	"/dev/ip6"
       
    76 
       
    77 #define	UDP_MOD_NAME	"udp"
       
    78 #define	UDP_DEV_NAME	"/dev/udp"
       
    79 #define	UDP6_DEV_NAME	"/dev/udp6"
       
    80 
       
    81 #define	TCP_MOD_NAME	"tcp"
       
    82 #define	TCP_DEV_NAME	"/dev/tcp"
       
    83 #define	TCP6_DEV_NAME	"/dev/tcp6"
    71 
    84 
    72 /* Minor numbers */
    85 /* Minor numbers */
    73 #define	IPV4_MINOR	0
    86 #define	IPV4_MINOR	0
    74 #define	IPV6_MINOR	1
    87 #define	IPV6_MINOR	1
    75 #define	TCP_MINOR	2
    88 #define	TCP_MINOR	2
    99 #define	IP_HDR_INCLUDED			0xFFFF
   112 #define	IP_HDR_INCLUDED			0xFFFF
   100 
   113 
   101 #define	ILL_FRAG_HASH_TBL_COUNT	((unsigned int)64)
   114 #define	ILL_FRAG_HASH_TBL_COUNT	((unsigned int)64)
   102 #define	ILL_FRAG_HASH_TBL_SIZE	(ILL_FRAG_HASH_TBL_COUNT * sizeof (ipfb_t))
   115 #define	ILL_FRAG_HASH_TBL_SIZE	(ILL_FRAG_HASH_TBL_COUNT * sizeof (ipfb_t))
   103 
   116 
   104 #define	IP_DEV_NAME			"/dev/ip"
       
   105 #define	IP_MOD_NAME			"ip"
       
   106 #define	IPV4_ADDR_LEN			4
   117 #define	IPV4_ADDR_LEN			4
   107 #define	IP_ADDR_LEN			IPV4_ADDR_LEN
   118 #define	IP_ADDR_LEN			IPV4_ADDR_LEN
   108 #define	IP_ARP_PROTO_TYPE		0x0800
   119 #define	IP_ARP_PROTO_TYPE		0x0800
   109 
   120 
   110 #define	IPV4_VERSION			4
   121 #define	IPV4_VERSION			4
   234  */
   245  */
   235 #define	CONN_Q(q)	(WR(q)->q_next == NULL)
   246 #define	CONN_Q(q)	(WR(q)->q_next == NULL)
   236 
   247 
   237 #define	Q_TO_CONN(q)	((conn_t *)(q)->q_ptr)
   248 #define	Q_TO_CONN(q)	((conn_t *)(q)->q_ptr)
   238 #define	Q_TO_TCP(q)	(Q_TO_CONN((q))->conn_tcp)
   249 #define	Q_TO_TCP(q)	(Q_TO_CONN((q))->conn_tcp)
       
   250 #define	Q_TO_UDP(q)	(Q_TO_CONN((q))->conn_udp)
   239 
   251 
   240 /*
   252 /*
   241  * The following two macros are used by IP to get the appropriate
   253  * The following two macros are used by IP to get the appropriate
   242  * wq and rq for a conn. If it is a TCP conn, then we need
   254  * wq and rq for a conn. If it is a TCP conn, then we need
   243  * tcp_wq/tcp_rq else, conn_wq/conn_rq. IP can use conn_wq and conn_rq
   255  * tcp_wq/tcp_rq else, conn_wq/conn_rq. IP can use conn_wq and conn_rq
   244  * from a conn directly if it knows that the conn is not TCP.
   256  * from a conn directly if it knows that the conn is not TCP.
   245  */
   257  */
   246 #define	CONNP_TO_WQ(connp)	\
   258 #define	CONNP_TO_WQ(connp)	\
   247 	(((connp)->conn_tcp == NULL) ? (connp)->conn_wq :	\
   259 	(IPCL_IS_TCP(connp) ? (connp)->conn_tcp->tcp_wq : (connp)->conn_wq)
   248 	(connp)->conn_tcp->tcp_wq)
       
   249 
   260 
   250 #define	CONNP_TO_RQ(connp)	RD(CONNP_TO_WQ(connp))
   261 #define	CONNP_TO_RQ(connp)	RD(CONNP_TO_WQ(connp))
   251 
       
   252 #define	IS_TCP_CONN(connp)	(((connp)->conn_flags & IPCL_TCP) != 0)
       
   253 
   262 
   254 #define	GRAB_CONN_LOCK(q)	{				\
   263 #define	GRAB_CONN_LOCK(q)	{				\
   255 	if (q != NULL && CONN_Q(q))				\
   264 	if (q != NULL && CONN_Q(q))				\
   256 		mutex_enter(&(Q_TO_CONN(q))->conn_lock);	\
   265 		mutex_enter(&(Q_TO_CONN(q))->conn_lock);	\
   257 }
   266 }
   300  * Following flags are used by IPQoS to determine if policy processing is
   309  * Following flags are used by IPQoS to determine if policy processing is
   301  * required.
   310  * required.
   302  */
   311  */
   303 #define	IP6_NO_IPPOLICY		0x800	/* Don't do IPQoS processing */
   312 #define	IP6_NO_IPPOLICY		0x800	/* Don't do IPQoS processing */
   304 #define	IP6_IN_LLMCAST		0x1000	/* Multicast */
   313 #define	IP6_IN_LLMCAST		0x1000	/* Multicast */
   305 #define	IP6_IN_NOCKSUM		0x2000	/* Don't compute checksum */
   314 
   306 
   315 #define	IP_FF_LOOPBACK		0x2000	/* Loopback fanout */
   307 #define	IP_FF_LOOPBACK		0x4000	/* Loopback fanout */
       
   308 
   316 
   309 #ifndef	IRE_DB_TYPE
   317 #ifndef	IRE_DB_TYPE
   310 #define	IRE_DB_TYPE	M_SIG
   318 #define	IRE_DB_TYPE	M_SIG
   311 #endif
   319 #endif
   312 
   320 
   355 	in6_addr_t	ipf_v6src;	/* IPv6 source address */
   363 	in6_addr_t	ipf_v6src;	/* IPv6 source address */
   356 	in6_addr_t	ipf_v6dst;	/* IPv6 dest address */
   364 	in6_addr_t	ipf_v6dst;	/* IPv6 dest address */
   357 	uint_t		ipf_prev_nexthdr_offset; /* Offset for nexthdr value */
   365 	uint_t		ipf_prev_nexthdr_offset; /* Offset for nexthdr value */
   358 	uint8_t		ipf_ecn;	/* ECN info for the fragments */
   366 	uint8_t		ipf_ecn;	/* ECN info for the fragments */
   359 	uint8_t		ipf_num_dups;	/* Number of times dup frags recvd */
   367 	uint8_t		ipf_num_dups;	/* Number of times dup frags recvd */
       
   368 	uint16_t	ipf_checksum_flags; /* Hardware checksum flags */
       
   369 	uint32_t	ipf_checksum;	/* Partial checksum of fragment data */
   360 } ipf_t;
   370 } ipf_t;
   361 
   371 
   362 #define	ipf_src	V4_PART_OF_V6(ipf_v6src)
   372 #define	ipf_src	V4_PART_OF_V6(ipf_v6src)
   363 #define	ipf_dst	V4_PART_OF_V6(ipf_v6dst)
   373 #define	ipf_dst	V4_PART_OF_V6(ipf_v6dst)
   364 
   374 
   621  * Open/close synchronization flags.
   631  * Open/close synchronization flags.
   622  * These are kept in a separate field in the conn and the synchronization
   632  * These are kept in a separate field in the conn and the synchronization
   623  * depends on the atomic 32 bit access to that field.
   633  * depends on the atomic 32 bit access to that field.
   624  */
   634  */
   625 #define	CONN_CLOSING		0x01	/* ip_close waiting for ip_wsrv */
   635 #define	CONN_CLOSING		0x01	/* ip_close waiting for ip_wsrv */
   626 #define	CONN_IPSEC_LOAD_WAIT	0x10	/* waiting for load */
   636 #define	CONN_IPSEC_LOAD_WAIT	0x02	/* waiting for load */
   627 #define	CONN_CONDEMNED		0x40	/* conn is closing, no more refs */
   637 #define	CONN_CONDEMNED		0x04	/* conn is closing, no more refs */
   628 #define	CONN_INCIPIENT		0x80	/* conn not yet visible, no refs */
   638 #define	CONN_INCIPIENT		0x08	/* conn not yet visible, no refs */
       
   639 #define	CONN_QUIESCED		0x10	/* conn is now quiescent */
   629 
   640 
   630 /*
   641 /*
   631  * Parameter to ip_output giving the identity of the caller.
   642  * Parameter to ip_output giving the identity of the caller.
   632  * IP_WSRV means the packet was enqueued in the STREAMS queue
   643  * IP_WSRV means the packet was enqueued in the STREAMS queue
   633  * due to flow control and is now being reprocessed in the context of
   644  * due to flow control and is now being reprocessed in the context of
  2591 
  2602 
  2592 extern ipparam_t	*ip_param_arr;
  2603 extern ipparam_t	*ip_param_arr;
  2593 
  2604 
  2594 extern int ip_g_forward;
  2605 extern int ip_g_forward;
  2595 extern int ipv6_forward;
  2606 extern int ipv6_forward;
       
  2607 extern vmem_t *ip_minor_arena;
  2596 
  2608 
  2597 #define	ip_respond_to_address_mask_broadcast ip_param_arr[0].ip_param_value
  2609 #define	ip_respond_to_address_mask_broadcast ip_param_arr[0].ip_param_value
  2598 #define	ip_g_send_redirects		ip_param_arr[5].ip_param_value
  2610 #define	ip_g_send_redirects		ip_param_arr[5].ip_param_value
  2599 #define	ip_debug			ip_param_arr[7].ip_param_value
  2611 #define	ip_debug			ip_param_arr[7].ip_param_value
  2600 #define	ip_mrtdebug			ip_param_arr[8].ip_param_value
  2612 #define	ip_mrtdebug			ip_param_arr[8].ip_param_value
  2695 
  2707 
  2696 #define	ip0dbg(a)	printf a
  2708 #define	ip0dbg(a)	printf a
  2697 #define	ip1dbg(a)	if (ip_debug > 2) printf a
  2709 #define	ip1dbg(a)	if (ip_debug > 2) printf a
  2698 #define	ip2dbg(a)	if (ip_debug > 3) printf a
  2710 #define	ip2dbg(a)	if (ip_debug > 3) printf a
  2699 #define	ip3dbg(a)	if (ip_debug > 4) printf a
  2711 #define	ip3dbg(a)	if (ip_debug > 4) printf a
  2700 
       
  2701 #define	ipcsumdbg(a, b) \
       
  2702 	if (ip_debug == 1) \
       
  2703 		prom_printf(a); \
       
  2704 	else if (ip_debug > 1) \
       
  2705 		{ prom_printf("%smp=%p\n", a, (void *)b); }
       
  2706 #else
  2712 #else
  2707 #define	ip0dbg(a)	/* */
  2713 #define	ip0dbg(a)	/* */
  2708 #define	ip1dbg(a)	/* */
  2714 #define	ip1dbg(a)	/* */
  2709 #define	ip2dbg(a)	/* */
  2715 #define	ip2dbg(a)	/* */
  2710 #define	ip3dbg(a)	/* */
  2716 #define	ip3dbg(a)	/* */
  2711 #define	ipcsumdbg(a, b)	/* */
       
  2712 #endif	/* IP_DEBUG */
  2717 #endif	/* IP_DEBUG */
  2713 
  2718 
  2714 extern const char *dlpi_prim_str(int);
  2719 extern const char *dlpi_prim_str(int);
  2715 extern const char *dlpi_err_str(int);
  2720 extern const char *dlpi_err_str(int);
  2716 extern void	ill_frag_timer(void *);
  2721 extern void	ill_frag_timer(void *);
  2717 extern ill_t	*ill_first(int, int, ill_walk_context_t *);
  2722 extern ill_t	*ill_first(int, int, ill_walk_context_t *);
  2718 extern ill_t	*ill_next(ill_walk_context_t *, ill_t *);
  2723 extern ill_t	*ill_next(ill_walk_context_t *, ill_t *);
  2719 extern void	ill_frag_timer_start(ill_t *);
  2724 extern void	ill_frag_timer_start(ill_t *);
  2720 extern void	ip_ioctl_freemsg(mblk_t *);
       
  2721 extern mblk_t	*ip_carve_mp(mblk_t **, ssize_t);
  2725 extern mblk_t	*ip_carve_mp(mblk_t **, ssize_t);
  2722 extern mblk_t	*ip_dlpi_alloc(size_t, t_uscalar_t);
  2726 extern mblk_t	*ip_dlpi_alloc(size_t, t_uscalar_t);
  2723 extern char	*ip_dot_addr(ipaddr_t, char *);
  2727 extern char	*ip_dot_addr(ipaddr_t, char *);
  2724 extern void	ip_lwput(queue_t *, mblk_t *);
  2728 extern void	ip_lwput(queue_t *, mblk_t *);
  2725 extern boolean_t icmp_err_rate_limit(void);
  2729 extern boolean_t icmp_err_rate_limit(void);
  2747 extern void	ip_rput(queue_t *, mblk_t *);
  2751 extern void	ip_rput(queue_t *, mblk_t *);
  2748 extern void	ip_input(ill_t *, ill_rx_ring_t *, mblk_t *, size_t);
  2752 extern void	ip_input(ill_t *, ill_rx_ring_t *, mblk_t *, size_t);
  2749 extern void	ip_rput_dlpi(queue_t *, mblk_t *);
  2753 extern void	ip_rput_dlpi(queue_t *, mblk_t *);
  2750 extern void	ip_rput_forward(ire_t *, ipha_t *, mblk_t *, ill_t *);
  2754 extern void	ip_rput_forward(ire_t *, ipha_t *, mblk_t *, ill_t *);
  2751 extern void	ip_rput_forward_multicast(ipaddr_t, mblk_t *, ipif_t *);
  2755 extern void	ip_rput_forward_multicast(ipaddr_t, mblk_t *, ipif_t *);
       
  2756 
       
  2757 extern int	ip_snmpmod_close(queue_t *);
       
  2758 extern void	ip_snmpmod_wput(queue_t *, mblk_t *);
  2752 extern void	ip_udp_input(queue_t *, mblk_t *, ipha_t *, ire_t *, ill_t *);
  2759 extern void	ip_udp_input(queue_t *, mblk_t *, ipha_t *, ire_t *, ill_t *);
  2753 extern void	ip_proto_input(queue_t *, mblk_t *, ipha_t *, ire_t *, ill_t *);
  2760 extern void	ip_proto_input(queue_t *, mblk_t *, ipha_t *, ire_t *, ill_t *);
  2754 extern void	ip_rput_other(ipsq_t *, queue_t *, mblk_t *, void *);
  2761 extern void	ip_rput_other(ipsq_t *, queue_t *, mblk_t *, void *);
  2755 extern void	ip_setqinfo(queue_t *, minor_t, boolean_t);
  2762 extern void	ip_setqinfo(queue_t *, minor_t, boolean_t);
  2756 extern void	ip_trash_ire_reclaim(void *);
  2763 extern void	ip_trash_ire_reclaim(void *);
  2819 extern ire_t	*conn_set_outgoing_ill(conn_t *, ire_t *, ill_t **);
  2826 extern ire_t	*conn_set_outgoing_ill(conn_t *, ire_t *, ill_t **);
  2820 extern int	ipsec_req_from_conn(conn_t *, ipsec_req_t *, int);
  2827 extern int	ipsec_req_from_conn(conn_t *, ipsec_req_t *, int);
  2821 extern int	ip_snmp_get(queue_t *q, mblk_t *mctl);
  2828 extern int	ip_snmp_get(queue_t *q, mblk_t *mctl);
  2822 extern int	ip_snmp_set(queue_t *q, int, int, uchar_t *, int);
  2829 extern int	ip_snmp_set(queue_t *q, int, int, uchar_t *, int);
  2823 extern void	ip_process_ioctl(ipsq_t *, queue_t *, mblk_t *, void *);
  2830 extern void	ip_process_ioctl(ipsq_t *, queue_t *, mblk_t *, void *);
       
  2831 extern void	ip_quiesce_conn(conn_t *);
  2824 extern  void    ip_reprocess_ioctl(ipsq_t *, queue_t *, mblk_t *, void *);
  2832 extern  void    ip_reprocess_ioctl(ipsq_t *, queue_t *, mblk_t *, void *);
  2825 extern void	ip_restart_optmgmt(ipsq_t *, queue_t *, mblk_t *, void *);
  2833 extern void	ip_restart_optmgmt(ipsq_t *, queue_t *, mblk_t *, void *);
  2826 extern void	ip_ioctl_finish(queue_t *, mblk_t *, int, int, ipif_t *,
  2834 extern void	ip_ioctl_finish(queue_t *, mblk_t *, int, int, ipif_t *,
  2827     ipsq_t *);
  2835     ipsq_t *);
  2828 
  2836 
  2840 			const mblk_t *);
  2848 			const mblk_t *);
  2841 extern boolean_t ip_md_hcksum_attr(struct multidata_s *, struct pdesc_s *,
  2849 extern boolean_t ip_md_hcksum_attr(struct multidata_s *, struct pdesc_s *,
  2842 			uint32_t, uint32_t, uint32_t, uint32_t);
  2850 			uint32_t, uint32_t, uint32_t, uint32_t);
  2843 extern boolean_t ip_md_zcopy_attr(struct multidata_s *, struct pdesc_s *,
  2851 extern boolean_t ip_md_zcopy_attr(struct multidata_s *, struct pdesc_s *,
  2844 			uint_t);
  2852 			uint_t);
       
  2853 extern mblk_t	*ip_unbind(queue_t *, mblk_t *);
  2845 
  2854 
  2846 /* Hooks for CGTP (multirt routes) filtering module */
  2855 /* Hooks for CGTP (multirt routes) filtering module */
  2847 #define	CGTP_FILTER_REV_1	1
  2856 #define	CGTP_FILTER_REV_1	1
  2848 #define	CGTP_FILTER_REV_2	2
  2857 #define	CGTP_FILTER_REV_2	2
  2849 #define	CGTP_FILTER_REV		CGTP_FILTER_REV_2
  2858 #define	CGTP_FILTER_REV		CGTP_FILTER_REV_2
  2922 	uint_t ill_mdt_hdr_head; /* leading header fragment extra space */
  2931 	uint_t ill_mdt_hdr_head; /* leading header fragment extra space */
  2923 	uint_t ill_mdt_hdr_tail; /* trailing header fragment extra space */
  2932 	uint_t ill_mdt_hdr_tail; /* trailing header fragment extra space */
  2924 	uint_t ill_mdt_max_pld;	 /* maximum payload buffers per Multidata */
  2933 	uint_t ill_mdt_max_pld;	 /* maximum payload buffers per Multidata */
  2925 	uint_t ill_mdt_span_limit; /* maximum payload span per packet */
  2934 	uint_t ill_mdt_span_limit; /* maximum payload span per packet */
  2926 };
  2935 };
  2927 
       
  2928 /*
       
  2929  * ioctl identifier and structure for Multidata Transmit update
       
  2930  * private M_CTL communication from IP to ULP.
       
  2931  */
       
  2932 #define	MDT_IOC_INFO_UPDATE	(('M' << 8) + 1020)
       
  2933 
       
  2934 typedef struct ip_mdt_info_s {
       
  2935 	uint_t	mdt_info_id;	/* MDT_IOC_INFO_UPDATE */
       
  2936 	ill_mdt_capab_t	mdt_capab; /* ILL MDT capabilities */
       
  2937 } ip_mdt_info_t;
       
  2938 
  2936 
  2939 struct ill_hcksum_capab_s {
  2937 struct ill_hcksum_capab_s {
  2940 	uint_t	ill_hcksum_version;	/* interface version */
  2938 	uint_t	ill_hcksum_version;	/* interface version */
  2941 	uint_t	ill_hcksum_txflags;	/* capabilities on transmit */
  2939 	uint_t	ill_hcksum_txflags;	/* capabilities on transmit */
  2942 };
  2940 };
  2989 	ill_rx_ring_t		*ill_ring_tbl; /* Ring to Sqp mapping table */
  2987 	ill_rx_ring_t		*ill_ring_tbl; /* Ring to Sqp mapping table */
  2990 	conn_t			*ill_unbind_conn; /* Conn used during unplumb */
  2988 	conn_t			*ill_unbind_conn; /* Conn used during unplumb */
  2991 };
  2989 };
  2992 
  2990 
  2993 /*
  2991 /*
  2994  * Macro that determines whether or not a given ILL is allowed for MDT.
       
  2995  */
       
  2996 #define	ILL_MDT_USABLE(ill)	\
       
  2997 	((ill->ill_capabilities & ILL_CAPAB_MDT) != 0 &&		\
       
  2998 	ill->ill_mdt_capab != NULL &&					\
       
  2999 	ill->ill_mdt_capab->ill_mdt_version == MDT_VERSION_2 &&		\
       
  3000 	ill->ill_mdt_capab->ill_mdt_on != 0)
       
  3001 
       
  3002 /*
       
  3003  * Macro that determines whether or not a given CONN may be considered
       
  3004  * for fast path prior to proceeding further with Multidata.
       
  3005  */
       
  3006 #define	CONN_IS_MD_FASTPATH(connp)	\
       
  3007 	((connp)->conn_dontroute == 0 &&	/* SO_DONTROUTE */	\
       
  3008 	(connp)->conn_nofailover_ill == NULL &&	/* IPIF_NOFAILOVER */	\
       
  3009 	(connp)->conn_xmit_if_ill == NULL &&	/* IP_XMIT_IF */	\
       
  3010 	(connp)->conn_outgoing_pill == NULL &&	/* IP{V6}_BOUND_PIF */	\
       
  3011 	(connp)->conn_outgoing_ill == NULL)	/* IP{V6}_BOUND_IF */
       
  3012 
       
  3013 /*
       
  3014  * Macro that determines whether or not a given IPC requires
       
  3015  * outbound IPSEC processing.
       
  3016  */
       
  3017 #define	CONN_IPSEC_OUT_ENCAPSULATED(connp)	\
       
  3018 	((connp)->conn_out_enforce_policy ||	\
       
  3019 	((connp)->conn_latch != NULL &&		\
       
  3020 	(connp)->conn_latch->ipl_out_policy != NULL))
       
  3021 
       
  3022 /*
       
  3023  * IP squeues exports
  2992  * IP squeues exports
  3024  */
  2993  */
  3025 extern int 		ip_squeue_profile;
  2994 extern int 		ip_squeue_profile;
  3026 extern int 		ip_squeue_bind;
  2995 extern int 		ip_squeue_bind;
  3027 extern boolean_t 	ip_squeue_fanout;
  2996 extern boolean_t 	ip_squeue_fanout;
  3047 extern squeue_t *ip_squeue_get(ill_rx_ring_t *);
  3016 extern squeue_t *ip_squeue_get(ill_rx_ring_t *);
  3048 extern void ip_squeue_get_pkts(squeue_t *);
  3017 extern void ip_squeue_get_pkts(squeue_t *);
  3049 extern int ip_squeue_bind_set(queue_t *, mblk_t *, char *, caddr_t, cred_t *);
  3018 extern int ip_squeue_bind_set(queue_t *, mblk_t *, char *, caddr_t, cred_t *);
  3050 extern int ip_squeue_bind_get(queue_t *, mblk_t *, caddr_t, cred_t *);
  3019 extern int ip_squeue_bind_get(queue_t *, mblk_t *, caddr_t, cred_t *);
  3051 extern void ip_squeue_clean(void *, mblk_t *, void *);
  3020 extern void ip_squeue_clean(void *, mblk_t *, void *);
  3052 
  3021 extern void ip_resume_tcp_bind(void *, mblk_t *, void *);
  3053 extern	void	ip_resume_tcp_bind(void *, mblk_t *mp, void *);
  3022 
       
  3023 extern void tcp_wput(queue_t *, mblk_t *);
       
  3024 
  3054 extern int	ip_fill_mtuinfo(struct in6_addr *, in_port_t,
  3025 extern int	ip_fill_mtuinfo(struct in6_addr *, in_port_t,
  3055 	struct ip6_mtuinfo *);
  3026 	struct ip6_mtuinfo *);
  3056 
  3027 extern	ipif_t *conn_get_held_ipif(conn_t *, ipif_t **, int *);
  3057 typedef	void	(*ipsq_func_t)(ipsq_t *, queue_t *, mblk_t *, void *);
  3028 
       
  3029 typedef void    (*ipsq_func_t)(ipsq_t *, queue_t *, mblk_t *, void *);
  3058 
  3030 
  3059 /*
  3031 /*
  3060  * Squeue tags. Tags only need to be unique when the callback function is the
  3032  * Squeue tags. Tags only need to be unique when the callback function is the
  3061  * same to distinguish between different calls, but we use unique tags for
  3033  * same to distinguish between different calls, but we use unique tags for
  3062  * convenience anyway.
  3034  * convenience anyway.
  3089 #define	SQTAG_IP_FANOUT_TCP		26
  3061 #define	SQTAG_IP_FANOUT_TCP		26
  3090 #define	SQTAG_IPSQ_CLEAN_RING		27
  3062 #define	SQTAG_IPSQ_CLEAN_RING		27
  3091 #define	SQTAG_TCP_WPUT_OTHER		28
  3063 #define	SQTAG_TCP_WPUT_OTHER		28
  3092 #define	SQTAG_TCP_CONN_REQ_UNBOUND	29
  3064 #define	SQTAG_TCP_CONN_REQ_UNBOUND	29
  3093 #define	SQTAG_TCP_SEND_PENDING		30
  3065 #define	SQTAG_TCP_SEND_PENDING		30
       
  3066 #define	SQTAG_BIND_RETRY		31
       
  3067 #define	SQTAG_UDP_FANOUT		32
       
  3068 #define	SQTAG_UDP_INPUT			33
       
  3069 #define	SQTAG_UDP_WPUT			34
       
  3070 #define	SQTAG_UDP_OUTPUT		35
  3094 
  3071 
  3095 #endif	/* _KERNEL */
  3072 #endif	/* _KERNEL */
  3096 
  3073 
  3097 #ifdef	__cplusplus
  3074 #ifdef	__cplusplus
  3098 }
  3075 }