sctp_ip.h revision 1d19ca101f1c458100349d59ba2d115d8e2c6f9d
2N/A/*
2N/A * CDDL HEADER START
2N/A *
2N/A * The contents of this file are subject to the terms of the
2N/A * Common Development and Distribution License (the "License").
2N/A * You may not use this file except in compliance with the License.
2N/A *
2N/A * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2N/A * or http://www.opensolaris.org/os/licensing.
2N/A * See the License for the specific language governing permissions
2N/A * and limitations under the License.
2N/A *
2N/A * When distributing Covered Code, include this CDDL HEADER in each
2N/A * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2N/A * If applicable, add the following below this CDDL HEADER, with the
2N/A * fields enclosed by brackets "[]" replaced with your own identifying
2N/A * information: Portions Copyright [yyyy] [name of copyright owner]
2N/A *
2N/A * CDDL HEADER END
2N/A */
2N/A/*
2N/A * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
2N/A * Use is subject to license terms.
2N/A */
2N/A
2N/A#ifndef _INET_SCTP_IP_H
2N/A#define _INET_SCTP_IP_H
2N/A
2N/A#pragma ident "%Z%%M% %I% %E% SMI"
2N/A
2N/A#ifdef __cplusplus
2N/Aextern "C" {
2N/A#endif
2N/A
2N/A#include <inet/sctp/sctp_stack.h>
2N/A
2N/A#define SCTP_COMMON_HDR_LENGTH 12 /* SCTP common header length */
2N/A
2N/A/* SCTP routines for IP to call. */
2N/Aextern void ip_fanout_sctp(mblk_t *, ill_t *, ipha_t *, uint32_t,
2N/A uint_t, boolean_t, boolean_t, zoneid_t);
2N/Aextern void sctp_ddi_g_init(void);
2N/Aextern void sctp_ddi_g_destroy(void);
2N/Aextern conn_t *sctp_find_conn(in6_addr_t *, in6_addr_t *, uint32_t,
2N/A zoneid_t, sctp_stack_t *);
2N/Aextern conn_t *sctp_fanout(in6_addr_t *, in6_addr_t *, uint32_t,
2N/A zoneid_t, mblk_t *, sctp_stack_t *);
2N/A
2N/Aextern void sctp_input(conn_t *, ipha_t *, mblk_t *, mblk_t *, ill_t *,
2N/A boolean_t, boolean_t);
2N/Aextern void sctp_wput(queue_t *, mblk_t *);
2N/Aextern void sctp_ootb_input(mblk_t *, ill_t *, zoneid_t, boolean_t);
2N/Aextern void sctp_hash_init(sctp_stack_t *);
2N/Aextern void sctp_hash_destroy(sctp_stack_t *);
2N/Aextern uint32_t sctp_cksum(mblk_t *, int);
2N/Aextern mblk_t *sctp_snmp_get_mib2(queue_t *, mblk_t *, sctp_stack_t *);
2N/Aextern void sctp_free(conn_t *);
2N/A
2N/A#define SCTP_STASH_IPINFO(mp, ire) \
2N/A{ \
2N/A unsigned char *stp; \
2N/A stp = DB_BASE((mp)); \
2N/A ASSERT(stp + sizeof (ire_t *) < (mp)->b_rptr); \
2N/A *(ire_t **)stp = (ire); \
2N/A}
2N/A
2N/A#define SCTP_EXTRACT_IPINFO(mp, ire) \
2N/A{ \
2N/A unsigned char *stp; \
2N/A stp = (mp)->b_datap->db_base; \
(ire) = *(ire_t **)stp; \
}
/*
* SCTP maintains a list of ILLs/IPIFs, these functions are provided by
* SCTP to keep its interface list up to date.
*/
extern void sctp_update_ill(ill_t *, int);
extern void sctp_update_ipif(ipif_t *, int);
extern void sctp_move_ipif(ipif_t *, ill_t *, ill_t *);
extern void sctp_update_ipif_addr(ipif_t *, in6_addr_t);
extern void sctp_ill_reindex(ill_t *, uint_t);
#define SCTP_ILL_INSERT 1
#define SCTP_ILL_REMOVE 2
#define SCTP_IPIF_REMOVE 3
#define SCTP_IPIF_UP 4
#define SCTP_IPIF_DOWN 5
#define SCTP_IPIF_UPDATE 6
/* IP routines for SCTP to call. */
extern void ip_fanout_sctp_raw(mblk_t *, ill_t *, ipha_t *, boolean_t,
uint32_t, boolean_t, uint_t, boolean_t, zoneid_t);
extern void sctp_ire_cache_flush(ipif_t *);
/*
* Private (and possibly temporary) ioctls. It is a large number
* to avoid conflict with other ioctls, which are normally smaller
* than 2^16.
*/
#define SCTP_IOC_DEFAULT_Q (('S' << 16) | 1024)
#ifdef __cplusplus
}
#endif
#endif /* _INET_SCTP_IP_H */