xref: /titanic_44/usr/src/uts/common/inet/sctp_ip.h (revision 726fad2a65f16c200a03969c29cb5c86c2d427db)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License (the "License").
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  * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved
23  */
24 
25 #ifndef _INET_SCTP_IP_H
26 #define	_INET_SCTP_IP_H
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
32 #include <netinet/sctp.h>
33 #include <inet/sctp/sctp_stack.h>
34 
35 #define	SCTP_COMMON_HDR_LENGTH	12	/* SCTP common header length */
36 
37 /* SCTP routines for IP to call. */
38 extern void ip_fanout_sctp(mblk_t *, ipha_t *, ip6_t *, uint32_t,
39     ip_recv_attr_t *);
40 extern void sctp_ddi_g_init(void);
41 extern void sctp_ddi_g_destroy(void);
42 extern conn_t *sctp_find_conn(in6_addr_t *, in6_addr_t *, uint32_t,
43     zoneid_t, iaflags_t, sctp_stack_t *);
44 extern conn_t *sctp_fanout(in6_addr_t *, in6_addr_t *, uint32_t,
45     ip_recv_attr_t *, mblk_t *, sctp_stack_t *, sctp_hdr_t *);
46 
47 extern void sctp_input(conn_t *, ipha_t *, ip6_t *, mblk_t *, ip_recv_attr_t *);
48 extern void sctp_ootb_input(mblk_t *, ip_recv_attr_t *, ip_stack_t *);
49 extern void sctp_hash_init(sctp_stack_t *);
50 extern void sctp_hash_destroy(sctp_stack_t *);
51 extern uint32_t sctp_cksum(mblk_t *, int);
52 extern mblk_t *sctp_snmp_get_mib2(queue_t *, mblk_t *, sctp_stack_t *);
53 extern void sctp_free(conn_t *);
54 
55 /*
56  * SCTP maintains a list of ILLs/IPIFs, these functions are provided by
57  * SCTP to keep its interface list up to date.
58  */
59 extern void sctp_update_ill(ill_t *, int);
60 extern void sctp_update_ipif(ipif_t *, int);
61 extern void sctp_move_ipif(ipif_t *, ill_t *, ill_t *);
62 extern void sctp_update_ipif_addr(ipif_t *, in6_addr_t);
63 extern void sctp_ill_reindex(ill_t *, uint_t);
64 
65 #define	SCTP_ILL_INSERT		1
66 #define	SCTP_ILL_REMOVE		2
67 #define	SCTP_IPIF_REMOVE	3
68 #define	SCTP_IPIF_UP		4
69 #define	SCTP_IPIF_DOWN		5
70 #define	SCTP_IPIF_UPDATE	6
71 
72 /* IP routines for SCTP to call. */
73 extern void ip_fanout_sctp_raw(mblk_t *, ipha_t *, ip6_t *, uint32_t,
74     ip_recv_attr_t *);
75 
76 #ifdef __cplusplus
77 }
78 #endif
79 
80 #endif /* _INET_SCTP_IP_H */
81