tpicommon.h revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* 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 2003 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SYS_TPICOMMON_H
#define _SYS_TPICOMMON_H
#pragma ident "%Z%%M% %I% %E% SMI"
#include <sys/feature_tests.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* WARNING: This header should not ever be included directly by application
* programs. It exists so that common definitions can be included by other
* system header files which define a documented interface. The interfaces
* that share and expose the definitions in this file are:
*
* includes this file)
* (2) XTI interface <xti.h>
*/
/*
* The following are "t_errno" error codes needed by both the kernel
* level transport providers and the user level interfaces.
*/
/*
* Following new error codes added to namespace with introduction of XTI
*/
#define TPROVMISMATCH 25
/* Listener-acceptor transport provider mismatch */
#define TRESQLEN 26
/* Connection acceptor has listen queue length limit greater than zero */
#define TRESADDR 27
/* Connection acceptor-listener addresses not same but required by transport */
/*
* Service type defines - used with T_info_ack
*/
/*
* NOT FOR PUBLIC USE, Solaris internal only.
* This value of nc_semantics is strictly for use of Remote Direct
* Memory Access provider interfaces in Solaris only and not for
* general use. Do not use this value for general purpose user or
* kernel programming. If used the behavior is undefined.
* This is a PRIVATE interface to be used by Solaris kRPC only.
*/
/*
* The following are the flag definitions needed by the
* user level library routines.
*/
/*
* flags for option management request primitives
* Note:
* - This namespace is distinct from the namespace for data
* primitives.
* - Flags T_NEGOTIATE, T_CHECK, T_DEFAULT, T_CURRENT
* are associated with an option request
* - Flags T_SUCCESS, T_FAILURE, T_PARTSUCCESS, T_READONLY,
* T_NOTSUPPORT are associated with results of option request.
*/
/*
* General purpose defines - used in multiple options context.
* They (T_YES and T_NO) need to be bitwise distinct from T_GARBAGE
* used with TCP level options by XTI for historical XTI specification
* reasons.
* (T_GARBAGE declared in <sys/xti_inet.h> included by <xti.h>).
*/
#define T_YES 1
#define T_NO 0
/*
* Values used with struct T_info_ack fields
*/
#define T_INFINITE -1
#define T_INVALID -2
/*
* Constants used with option management "name" or "value" fields.
*/
/*
* XTI defined value reserved for stating 'unspecified' value used
* in some option namespaces.
*/
/*
* XTI inspired option management defined an option name T_ALLOPT
* to imply all options of a certain level.
* No option name (for any level) should be defined with constant value of
* T_ALLOPT (0).
*/
#define T_ALLOPT 0 /* all options at any level */
/*
* An option specification consists of an opthdr, followed by the value of
* the option. An options buffer contains one or more options. The len
* field of opthdr specifies the length of the option value in bytes. This
* length must be a multiple of sizeof (t_scalar_t) (use OPTLEN macro).
* This is an antique definition which is used (unofficially) by TLI but
* superceded in XTI.
*/
/*
* The opthdr types are now t_uscalar_t - inspired by XTI
*/
#if !defined(_XPG4_2) || defined(__EXTENSIONS__)
struct opthdr {
};
sizeof (t_uscalar_t)) * sizeof (t_uscalar_t))
#endif /* !defined(_XPG4_2) || defined(__EXTENSIONS__) */
#ifdef __cplusplus
}
#endif
#endif /* _SYS_TPICOMMON_H */