6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
12 *
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21
22 /*
23 * Copyright (c) 1991, 2010, Oracle and/or its affiliates. All rights reserved.
24 * Copyright (c) 1990 Mentat Inc.
25 */
26
27 #ifndef _INET_IP_H
28 #define _INET_IP_H
29
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33
34 #include <sys/isa_defs.h>
35 #include <sys/types.h>
36 #include <inet/mib2.h>
37 #include <inet/nd.h>
38 #include <sys/atomic.h>
39 #include <net/if_dl.h>
40 #include <net/if.h>
41 #include <netinet/ip.h>
42 #include <netinet/igmp.h>
43 #include <sys/neti.h>
44 #include <sys/hook.h>
45 #include <sys/hook_event.h>
3681 extern void dce_refhold_notr(dce_t *);
3682 mblk_t *ip_snmp_get_mib2_ip_dce(queue_t *, mblk_t *, ip_stack_t *ipst);
3683
3684 extern ip_laddr_t ip_laddr_verify_v4(ipaddr_t, zoneid_t,
3685 ip_stack_t *, boolean_t);
3686 extern ip_laddr_t ip_laddr_verify_v6(const in6_addr_t *, zoneid_t,
3687 ip_stack_t *, boolean_t, uint_t);
3688 extern int ip_laddr_fanout_insert(conn_t *);
3689
3690 extern boolean_t ip_verify_src(mblk_t *, ip_xmit_attr_t *, uint_t *);
3691 extern int ip_verify_ire(mblk_t *, ip_xmit_attr_t *);
3692
3693 extern mblk_t *ip_xmit_attr_to_mblk(ip_xmit_attr_t *);
3694 extern boolean_t ip_xmit_attr_from_mblk(mblk_t *, ip_xmit_attr_t *);
3695 extern mblk_t *ip_xmit_attr_free_mblk(mblk_t *);
3696 extern mblk_t *ip_recv_attr_to_mblk(ip_recv_attr_t *);
3697 extern boolean_t ip_recv_attr_from_mblk(mblk_t *, ip_recv_attr_t *);
3698 extern mblk_t *ip_recv_attr_free_mblk(mblk_t *);
3699 extern boolean_t ip_recv_attr_is_mblk(mblk_t *);
3700
3701 /*
3702 * Squeue tags. Tags only need to be unique when the callback function is the
3703 * same to distinguish between different calls, but we use unique tags for
3704 * convenience anyway.
3705 */
3706 #define SQTAG_IP_INPUT 1
3707 #define SQTAG_TCP_INPUT_ICMP_ERR 2
3708 #define SQTAG_TCP6_INPUT_ICMP_ERR 3
3709 #define SQTAG_IP_TCP_INPUT 4
3710 #define SQTAG_IP6_TCP_INPUT 5
3711 #define SQTAG_IP_TCP_CLOSE 6
3712 #define SQTAG_TCP_OUTPUT 7
3713 #define SQTAG_TCP_TIMER 8
3714 #define SQTAG_TCP_TIMEWAIT 9
3715 #define SQTAG_TCP_ACCEPT_FINISH 10
3716 #define SQTAG_TCP_ACCEPT_FINISH_Q0 11
3717 #define SQTAG_TCP_ACCEPT_PENDING 12
3718 #define SQTAG_TCP_LISTEN_DISCON 13
3719 #define SQTAG_TCP_CONN_REQ_1 14
3720 #define SQTAG_TCP_EAGER_BLOWOFF 15
|
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
12 *
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21
22 /*
23 * Copyright (c) 1991, 2010, Oracle and/or its affiliates. All rights reserved.
24 * Copyright (c) 1990 Mentat Inc.
25 */
26 /*
27 * Copyright 2012 Nexenta Systems, Inc. All rights reserved.
28 */
29
30 #ifndef _INET_IP_H
31 #define _INET_IP_H
32
33 #ifdef __cplusplus
34 extern "C" {
35 #endif
36
37 #include <sys/isa_defs.h>
38 #include <sys/types.h>
39 #include <inet/mib2.h>
40 #include <inet/nd.h>
41 #include <sys/atomic.h>
42 #include <net/if_dl.h>
43 #include <net/if.h>
44 #include <netinet/ip.h>
45 #include <netinet/igmp.h>
46 #include <sys/neti.h>
47 #include <sys/hook.h>
48 #include <sys/hook_event.h>
3684 extern void dce_refhold_notr(dce_t *);
3685 mblk_t *ip_snmp_get_mib2_ip_dce(queue_t *, mblk_t *, ip_stack_t *ipst);
3686
3687 extern ip_laddr_t ip_laddr_verify_v4(ipaddr_t, zoneid_t,
3688 ip_stack_t *, boolean_t);
3689 extern ip_laddr_t ip_laddr_verify_v6(const in6_addr_t *, zoneid_t,
3690 ip_stack_t *, boolean_t, uint_t);
3691 extern int ip_laddr_fanout_insert(conn_t *);
3692
3693 extern boolean_t ip_verify_src(mblk_t *, ip_xmit_attr_t *, uint_t *);
3694 extern int ip_verify_ire(mblk_t *, ip_xmit_attr_t *);
3695
3696 extern mblk_t *ip_xmit_attr_to_mblk(ip_xmit_attr_t *);
3697 extern boolean_t ip_xmit_attr_from_mblk(mblk_t *, ip_xmit_attr_t *);
3698 extern mblk_t *ip_xmit_attr_free_mblk(mblk_t *);
3699 extern mblk_t *ip_recv_attr_to_mblk(ip_recv_attr_t *);
3700 extern boolean_t ip_recv_attr_from_mblk(mblk_t *, ip_recv_attr_t *);
3701 extern mblk_t *ip_recv_attr_free_mblk(mblk_t *);
3702 extern boolean_t ip_recv_attr_is_mblk(mblk_t *);
3703
3704 extern char *inet_ntop(int, const void *, char *, int);
3705 extern int _inet_pton(int, char *, void *);
3706 #define inet_pton(x, y, z) _inet_pton(x, y, z)
3707
3708 /*
3709 * Squeue tags. Tags only need to be unique when the callback function is the
3710 * same to distinguish between different calls, but we use unique tags for
3711 * convenience anyway.
3712 */
3713 #define SQTAG_IP_INPUT 1
3714 #define SQTAG_TCP_INPUT_ICMP_ERR 2
3715 #define SQTAG_TCP6_INPUT_ICMP_ERR 3
3716 #define SQTAG_IP_TCP_INPUT 4
3717 #define SQTAG_IP6_TCP_INPUT 5
3718 #define SQTAG_IP_TCP_CLOSE 6
3719 #define SQTAG_TCP_OUTPUT 7
3720 #define SQTAG_TCP_TIMER 8
3721 #define SQTAG_TCP_TIMEWAIT 9
3722 #define SQTAG_TCP_ACCEPT_FINISH 10
3723 #define SQTAG_TCP_ACCEPT_FINISH_Q0 11
3724 #define SQTAG_TCP_ACCEPT_PENDING 12
3725 #define SQTAG_TCP_LISTEN_DISCON 13
3726 #define SQTAG_TCP_CONN_REQ_1 14
3727 #define SQTAG_TCP_EAGER_BLOWOFF 15
|