xref: /onnv-gate/usr/src/uts/common/inet/sctp_ip.h (revision 12339:07dcda070d15)
10Sstevel@tonic-gate /*
20Sstevel@tonic-gate  * CDDL HEADER START
30Sstevel@tonic-gate  *
40Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
51676Sjpk  * Common Development and Distribution License (the "License").
61676Sjpk  * You may not use this file except in compliance with the License.
70Sstevel@tonic-gate  *
80Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
90Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
100Sstevel@tonic-gate  * See the License for the specific language governing permissions
110Sstevel@tonic-gate  * and limitations under the License.
120Sstevel@tonic-gate  *
130Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
140Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
150Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
160Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
170Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
180Sstevel@tonic-gate  *
190Sstevel@tonic-gate  * CDDL HEADER END
200Sstevel@tonic-gate  */
210Sstevel@tonic-gate /*
22*12339Sanil.udupa@sun.com  * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved
230Sstevel@tonic-gate  */
240Sstevel@tonic-gate 
250Sstevel@tonic-gate #ifndef _INET_SCTP_IP_H
260Sstevel@tonic-gate #define	_INET_SCTP_IP_H
270Sstevel@tonic-gate 
280Sstevel@tonic-gate #ifdef __cplusplus
290Sstevel@tonic-gate extern "C" {
300Sstevel@tonic-gate #endif
310Sstevel@tonic-gate 
32*12339Sanil.udupa@sun.com #include <netinet/sctp.h>
333448Sdh155122 #include <inet/sctp/sctp_stack.h>
343448Sdh155122 
350Sstevel@tonic-gate #define	SCTP_COMMON_HDR_LENGTH	12	/* SCTP common header length */
360Sstevel@tonic-gate 
370Sstevel@tonic-gate /* SCTP routines for IP to call. */
3811042SErik.Nordmark@Sun.COM extern void ip_fanout_sctp(mblk_t *, ipha_t *, ip6_t *, uint32_t,
3911042SErik.Nordmark@Sun.COM     ip_recv_attr_t *);
403448Sdh155122 extern void sctp_ddi_g_init(void);
413448Sdh155122 extern void sctp_ddi_g_destroy(void);
423510Svi117747 extern conn_t *sctp_find_conn(in6_addr_t *, in6_addr_t *, uint32_t,
4311042SErik.Nordmark@Sun.COM     zoneid_t, iaflags_t, sctp_stack_t *);
443510Svi117747 extern conn_t *sctp_fanout(in6_addr_t *, in6_addr_t *, uint32_t,
45*12339Sanil.udupa@sun.com     ip_recv_attr_t *, mblk_t *, sctp_stack_t *, sctp_hdr_t *);
461676Sjpk 
4711042SErik.Nordmark@Sun.COM extern void sctp_input(conn_t *, ipha_t *, ip6_t *, mblk_t *, ip_recv_attr_t *);
4811042SErik.Nordmark@Sun.COM extern void sctp_ootb_input(mblk_t *, ip_recv_attr_t *, ip_stack_t *);
493448Sdh155122 extern void sctp_hash_init(sctp_stack_t *);
503448Sdh155122 extern void sctp_hash_destroy(sctp_stack_t *);
510Sstevel@tonic-gate extern uint32_t sctp_cksum(mblk_t *, int);
523448Sdh155122 extern mblk_t *sctp_snmp_get_mib2(queue_t *, mblk_t *, sctp_stack_t *);
530Sstevel@tonic-gate extern void sctp_free(conn_t *);
540Sstevel@tonic-gate 
550Sstevel@tonic-gate /*
560Sstevel@tonic-gate  * SCTP maintains a list of ILLs/IPIFs, these functions are provided by
570Sstevel@tonic-gate  * SCTP to keep its interface list up to date.
580Sstevel@tonic-gate  */
590Sstevel@tonic-gate extern void sctp_update_ill(ill_t *, int);
600Sstevel@tonic-gate extern void sctp_update_ipif(ipif_t *, int);
610Sstevel@tonic-gate extern void sctp_move_ipif(ipif_t *, ill_t *, ill_t *);
623510Svi117747 extern void sctp_update_ipif_addr(ipif_t *, in6_addr_t);
634311Svi117747 extern void sctp_ill_reindex(ill_t *, uint_t);
640Sstevel@tonic-gate 
650Sstevel@tonic-gate #define	SCTP_ILL_INSERT		1
660Sstevel@tonic-gate #define	SCTP_ILL_REMOVE		2
674311Svi117747 #define	SCTP_IPIF_REMOVE	3
684311Svi117747 #define	SCTP_IPIF_UP		4
694311Svi117747 #define	SCTP_IPIF_DOWN		5
704311Svi117747 #define	SCTP_IPIF_UPDATE	6
710Sstevel@tonic-gate 
720Sstevel@tonic-gate /* IP routines for SCTP to call. */
7311042SErik.Nordmark@Sun.COM extern void ip_fanout_sctp_raw(mblk_t *, ipha_t *, ip6_t *, uint32_t,
7411042SErik.Nordmark@Sun.COM     ip_recv_attr_t *);
750Sstevel@tonic-gate 
760Sstevel@tonic-gate #ifdef __cplusplus
770Sstevel@tonic-gate }
780Sstevel@tonic-gate #endif
790Sstevel@tonic-gate 
800Sstevel@tonic-gate #endif /* _INET_SCTP_IP_H */
81