sctp_ip.h revision 12016:0248e987199b
11553Srgrimes/*
21553Srgrimes * CDDL HEADER START
31553Srgrimes *
41553Srgrimes * The contents of this file are subject to the terms of the
51553Srgrimes * Common Development and Distribution License (the "License").
61553Srgrimes * You may not use this file except in compliance with the License.
71553Srgrimes *
81553Srgrimes * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
91553Srgrimes * or http://www.opensolaris.org/os/licensing.
101553Srgrimes * See the License for the specific language governing permissions
111553Srgrimes * and limitations under the License.
121553Srgrimes *
131553Srgrimes * When distributing Covered Code, include this CDDL HEADER in each
141553Srgrimes * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
151553Srgrimes * If applicable, add the following below this CDDL HEADER, with the
161553Srgrimes * fields enclosed by brackets "[]" replaced with your own identifying
171553Srgrimes * information: Portions Copyright [yyyy] [name of copyright owner]
181553Srgrimes *
191553Srgrimes * CDDL HEADER END
201553Srgrimes */
211553Srgrimes/*
221553Srgrimes * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
231553Srgrimes * Use is subject to license terms.
241553Srgrimes */
251553Srgrimes
261553Srgrimes#ifndef _INET_SCTP_IP_H
271553Srgrimes#define	_INET_SCTP_IP_H
281553Srgrimes
29118288Sgad#ifdef __cplusplus
30112701Seivindextern "C" {
311553Srgrimes#endif
321553Srgrimes
331553Srgrimes#include <inet/sctp/sctp_stack.h>
341553Srgrimes
351553Srgrimes#define	SCTP_COMMON_HDR_LENGTH	12	/* SCTP common header length */
361553Srgrimes
371553Srgrimes/* SCTP routines for IP to call. */
381553Srgrimesextern void ip_fanout_sctp(mblk_t *, ipha_t *, ip6_t *, uint32_t,
391553Srgrimes    ip_recv_attr_t *);
401553Srgrimesextern void sctp_ddi_g_init(void);
411553Srgrimesextern void sctp_ddi_g_destroy(void);
421553Srgrimesextern conn_t *sctp_find_conn(in6_addr_t *, in6_addr_t *, uint32_t,
43112701Seivind    zoneid_t, iaflags_t, sctp_stack_t *);
441553Srgrimesextern conn_t *sctp_fanout(in6_addr_t *, in6_addr_t *, uint32_t,
451553Srgrimes    ip_recv_attr_t *, mblk_t *, sctp_stack_t *);
461553Srgrimes
471553Srgrimesextern void sctp_input(conn_t *, ipha_t *, ip6_t *, mblk_t *, ip_recv_attr_t *);
481553Srgrimesextern void sctp_ootb_input(mblk_t *, ip_recv_attr_t *, ip_stack_t *);
4930407Sjoergextern void sctp_hash_init(sctp_stack_t *);
501553Srgrimesextern void sctp_hash_destroy(sctp_stack_t *);
511553Srgrimesextern uint32_t sctp_cksum(mblk_t *, int);
521553Srgrimesextern mblk_t *sctp_snmp_get_mib2(queue_t *, mblk_t *, sctp_stack_t *);
531553Srgrimesextern void sctp_free(conn_t *);
541553Srgrimes
551553Srgrimes/*
561553Srgrimes * SCTP maintains a list of ILLs/IPIFs, these functions are provided by
571553Srgrimes * SCTP to keep its interface list up to date.
581553Srgrimes */
591553Srgrimesextern void sctp_update_ill(ill_t *, int);
601553Srgrimesextern void sctp_update_ipif(ipif_t *, int);
611553Srgrimesextern void sctp_move_ipif(ipif_t *, ill_t *, ill_t *);
621553Srgrimesextern void sctp_update_ipif_addr(ipif_t *, in6_addr_t);
631553Srgrimesextern void sctp_ill_reindex(ill_t *, uint_t);
641553Srgrimes
651553Srgrimes#define	SCTP_ILL_INSERT		1
661553Srgrimes#define	SCTP_ILL_REMOVE		2
671553Srgrimes#define	SCTP_IPIF_REMOVE	3
681553Srgrimes#define	SCTP_IPIF_UP		4
691553Srgrimes#define	SCTP_IPIF_DOWN		5
701553Srgrimes#define	SCTP_IPIF_UPDATE	6
711553Srgrimes
721553Srgrimes/* IP routines for SCTP to call. */
731553Srgrimesextern void ip_fanout_sctp_raw(mblk_t *, ipha_t *, ip6_t *, uint32_t,
741553Srgrimes    ip_recv_attr_t *);
751553Srgrimes
761553Srgrimes#ifdef __cplusplus
771553Srgrimes}
781553Srgrimes#endif
79
80#endif /* _INET_SCTP_IP_H */
81