xref: /illumos-gate/usr/src/uts/common/inet/sctp_ip.h (revision a5407c02)
17c478bd9Sstevel@tonic-gate /*
27c478bd9Sstevel@tonic-gate  * CDDL HEADER START
37c478bd9Sstevel@tonic-gate  *
47c478bd9Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
545916cd2Sjpk  * Common Development and Distribution License (the "License").
645916cd2Sjpk  * You may not use this file except in compliance with the License.
77c478bd9Sstevel@tonic-gate  *
87c478bd9Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97c478bd9Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
107c478bd9Sstevel@tonic-gate  * See the License for the specific language governing permissions
117c478bd9Sstevel@tonic-gate  * and limitations under the License.
127c478bd9Sstevel@tonic-gate  *
137c478bd9Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
147c478bd9Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157c478bd9Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
167c478bd9Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
177c478bd9Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
187c478bd9Sstevel@tonic-gate  *
197c478bd9Sstevel@tonic-gate  * CDDL HEADER END
207c478bd9Sstevel@tonic-gate  */
217c478bd9Sstevel@tonic-gate /*
22*a5407c02SAnil udupa  * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved
237c478bd9Sstevel@tonic-gate  */
247c478bd9Sstevel@tonic-gate 
257c478bd9Sstevel@tonic-gate #ifndef _INET_SCTP_IP_H
267c478bd9Sstevel@tonic-gate #define	_INET_SCTP_IP_H
277c478bd9Sstevel@tonic-gate 
287c478bd9Sstevel@tonic-gate #ifdef __cplusplus
297c478bd9Sstevel@tonic-gate extern "C" {
307c478bd9Sstevel@tonic-gate #endif
317c478bd9Sstevel@tonic-gate 
32*a5407c02SAnil udupa #include <netinet/sctp.h>
33f4b3ec61Sdh #include <inet/sctp/sctp_stack.h>
34f4b3ec61Sdh 
357c478bd9Sstevel@tonic-gate #define	SCTP_COMMON_HDR_LENGTH	12	/* SCTP common header length */
367c478bd9Sstevel@tonic-gate 
377c478bd9Sstevel@tonic-gate /* SCTP routines for IP to call. */
38bd670b35SErik Nordmark extern void ip_fanout_sctp(mblk_t *, ipha_t *, ip6_t *, uint32_t,
39bd670b35SErik Nordmark     ip_recv_attr_t *);
40f4b3ec61Sdh extern void sctp_ddi_g_init(void);
41f4b3ec61Sdh extern void sctp_ddi_g_destroy(void);
42e35d2278Svi extern conn_t *sctp_find_conn(in6_addr_t *, in6_addr_t *, uint32_t,
43bd670b35SErik Nordmark     zoneid_t, iaflags_t, sctp_stack_t *);
44e35d2278Svi extern conn_t *sctp_fanout(in6_addr_t *, in6_addr_t *, uint32_t,
45*a5407c02SAnil udupa     ip_recv_attr_t *, mblk_t *, sctp_stack_t *, sctp_hdr_t *);
4645916cd2Sjpk 
47bd670b35SErik Nordmark extern void sctp_input(conn_t *, ipha_t *, ip6_t *, mblk_t *, ip_recv_attr_t *);
48bd670b35SErik Nordmark extern void sctp_ootb_input(mblk_t *, ip_recv_attr_t *, ip_stack_t *);
49f4b3ec61Sdh extern void sctp_hash_init(sctp_stack_t *);
50f4b3ec61Sdh extern void sctp_hash_destroy(sctp_stack_t *);
517c478bd9Sstevel@tonic-gate extern uint32_t sctp_cksum(mblk_t *, int);
52f4b3ec61Sdh extern mblk_t *sctp_snmp_get_mib2(queue_t *, mblk_t *, sctp_stack_t *);
537c478bd9Sstevel@tonic-gate extern void sctp_free(conn_t *);
547c478bd9Sstevel@tonic-gate 
557c478bd9Sstevel@tonic-gate /*
567c478bd9Sstevel@tonic-gate  * SCTP maintains a list of ILLs/IPIFs, these functions are provided by
577c478bd9Sstevel@tonic-gate  * SCTP to keep its interface list up to date.
587c478bd9Sstevel@tonic-gate  */
597c478bd9Sstevel@tonic-gate extern void sctp_update_ill(ill_t *, int);
607c478bd9Sstevel@tonic-gate extern void sctp_update_ipif(ipif_t *, int);
617c478bd9Sstevel@tonic-gate extern void sctp_move_ipif(ipif_t *, ill_t *, ill_t *);
62e35d2278Svi extern void sctp_update_ipif_addr(ipif_t *, in6_addr_t);
631d19ca10Svi extern void sctp_ill_reindex(ill_t *, uint_t);
647c478bd9Sstevel@tonic-gate 
657c478bd9Sstevel@tonic-gate #define	SCTP_ILL_INSERT		1
667c478bd9Sstevel@tonic-gate #define	SCTP_ILL_REMOVE		2
671d19ca10Svi #define	SCTP_IPIF_REMOVE	3
681d19ca10Svi #define	SCTP_IPIF_UP		4
691d19ca10Svi #define	SCTP_IPIF_DOWN		5
701d19ca10Svi #define	SCTP_IPIF_UPDATE	6
717c478bd9Sstevel@tonic-gate 
727c478bd9Sstevel@tonic-gate /* IP routines for SCTP to call. */
73bd670b35SErik Nordmark extern void ip_fanout_sctp_raw(mblk_t *, ipha_t *, ip6_t *, uint32_t,
74bd670b35SErik Nordmark     ip_recv_attr_t *);
757c478bd9Sstevel@tonic-gate 
767c478bd9Sstevel@tonic-gate #ifdef __cplusplus
777c478bd9Sstevel@tonic-gate }
787c478bd9Sstevel@tonic-gate #endif
797c478bd9Sstevel@tonic-gate 
807c478bd9Sstevel@tonic-gate #endif /* _INET_SCTP_IP_H */
81