sctp_itf.h revision 1d8c40254918b6a58c4b2132dafb3e012ccd66f0
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _INET_SCTP_ITF_H
#define _INET_SCTP_ITF_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
/*
* Kernel SCTP programming interface. Note that this interface
* is private to Sun and can be changed without notice.
*/
#ifdef _KERNEL
/*
* The version number of the SCTP kernel interface. Use it with
* sctp_itf_ver() to verify if the kernel supports the correct
* version of the interface.
*
* NOTE: do not assume backward compatibility of the interface.
* If the return value of sctp_itf_ver() is different from what
* is expected, do not call any of the routines.
*/
#define SCTP_ITF_VER 1
/*
* This struct holds all the upcalls the SCTP kernel module will
* invoke for different events. When calling sctp_create() to create
* a SCTP handle, the caller must provide this information.
*/
typedef struct sctp_upcalls_s {
void (*su_connected)(void *handle);
void (*su_disconnecting)(void *handle);
/*
* This struct holds various flow control limits the caller of
* sctp_create() should observe when interacting with SCTP.
*/
typedef struct sctp_sockbuf_limits_s {
int sbl_rxbuf;
int sbl_rxlowat;
int sbl_txbuf;
int sbl_txlowat;
/*
* Parameter to SCTP_UC_SWAP setsockopt
*/
struct sctp_uc_swap {
void *sus_handle;
};
struct sctp_s;
/*
* The list of routines the SCTP kernel module provides.
*/
int flags);
extern int sctp_itf_ver(int);
/* Flags for sctp_create(), sctp_alloc_hdr() */
#define SCTP_CAN_BLOCK 0x01
/* Flags for upcall su_recv() */
/* Use by sockfs to do sctp_peeloff(). */
#define SCTP_UC_SWAP 255
/*
* The following are private interfaces between Solaris SCTP and SunCluster.
* Hence, these interfaces are only for use by SunCluster and are *not* part
* of the general SCTP kernel interface.
*/
typedef uintptr_t cl_sctp_handle_t;
typedef struct cl_sctp_info_s {
/* Used to indicate if the local or peer address list has changed */
#define SCTP_CL_LADDR 1
#define SCTP_CL_PADDR 2
/* End of private SunCluster interfaces */
#endif /* _KERNEL */
#ifdef __cplusplus
}
#endif
#endif /* _INET_SCTP_ITF_H */