⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tihdr.h

📁 7号信令功能代码,为开源代码
💻 H
📖 第 1 页 / 共 2 页
字号:
/***************************************************************************** @(#) tihdr.h,v 1.1.4.1 2004/01/12 23:44:50 brian Exp ----------------------------------------------------------------------------- Copyright (C) 2001-2004  OpenSS7 Corporation <http://www.openss7.com> All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ----------------------------------------------------------------------------- U.S. GOVERNMENT RESTRICTED RIGHTS.  If you are licensing this Software on behalf of the U.S. Government ("Government"), the following provisions apply to you.  If the Software is supplied by the Department of Defense ("DoD"), it is classified as "Commercial Computer Software" under paragraph 252.227-7014 of the DoD Supplement to the Federal Acquisition Regulations ("DFARS") (or any successor regulations) and the Government is acquiring only the license rights granted herein (the license rights customarily provided to non-Government users).  If the Software is supplied to any unit or agency of the Government other than DoD, it is classified as "Restricted Computer Software" and the Government's rights in the Software are defined in paragraph 52.227-19 of the Federal Acquisition Regulations ("FAR") (or any success regulations) or, in the cases of NASA, in paragraph 18.52.227-86 of the NASA Supplement to the FAR (or any successor regulations). ----------------------------------------------------------------------------- Commercial licensing and support of this software is available from OpenSS7 Corporation at a fee.  See http://www.openss7.com/ ----------------------------------------------------------------------------- Last Modified 2004/01/12 23:44:50 by brian *****************************************************************************/#ifndef _SYS_TIHDR_H#define _SYS_TIHDR_H#ifndef __KERNEL#ifndef _TIHDR_H#   error Do no include <xti/tihdr.h> directly in user programs.#   error Include <tihdr.h> instead.#endif#endif#ifdef __BEGIN_DECLS/* *INDENT-OFF* */__BEGIN_DECLS/* *INDENT-ON* */#endif#define T_CURRENT_VERSION 5#ifndef t_scalar_ttypedef int32_t t_scalar_t;#define t_scalar_t t_scalar_ttypedef u_int32_t t_uscalar_t;#define t_uscalar_t t_uscalar_t#endif#if 0struct t_info {	t_scalar_t addr;	t_scalar_t options;	t_scalar_t tsdu;	t_scalar_t etsdu;	t_scalar_t connect;	t_scalar_t discon;	t_scalar_t servtype;};#endif/* *  Transport service error numbers *  (error codes used by TLI transport providers) */#define TBADADDR	 1	/* Bad address format */#define TBADOPT		 2	/* Bad options format */#define TACCES		 3	/* Bad permissions */#define TBADF		 4	/* Bad file descriptor */#define TNOADDR		 5	/* Unable to allocate an address */#define TOUTSTATE	 6	/* Would place interface out of state */#define TBADSEQ		 7	/* Bad call sequence number */#define TSYSERR		 8	/* System error */#define TLOOK		 9	/* Has to t_look() for event			*/	/* not TLI */#define TBADDATA	10	/* Bad amount of data */#define TBUFOVFLW	11	/* Buffer was too small				*/	/* not TLI */#define TFLOW		12	/* Would block due to flow control		*/	/* not TLI */#define TNODATA		13	/* No data indication				*/	/* not TLI */#define TNODIS		14	/* No disconnect indication			*/	/* not TLI */#define TNOUDERR	15	/* No unitdata error indication			*/	/* not TLI */#define TBADFLAG	16	/* Bad flags */#define TNOREL		17	/* No orderly release indication		*/	/* not TLI */#define TNOTSUPPORT	18	/* Not supported */#define TSTATECHNG	19	/* State is currently changing			*/	/* not TLI */#define TNOSTRUCTYPE	20	/* Structure type not supported			*/	/* not TLI */#define TBADNAME	21	/* Bad transport provider name			*/	/* not TLI */#define TBADQLEN	22	/* Listener queue length limit is zero		*/	/* not TLI */#define TADDRBUSY	23	/* Address already in use			*/	/* not TLI */#define TINDOUT		24	/* Outstanding connect indications		*/	/* not TLI */#define TPROVMISMATCH	25	/* Not same transport provider			*/	/* not TLI */#define TRESQLEN	26	/* Connection acceptor has qlen > 0		*/	/* not TLI */#define TRESADDR	27	/* Conn. acceptor bound to different address	*/	/* not TLI */#define TQFULL		28	/* Connection indicator queue is full		*/	/* not TLI */#define TPROTO		29	/* Protocol error				*/	/* not TLI *//* *  Transport service types */#define T_COTS		1	/* Connection oriented transport service */#define T_COTS_ORD	2	/* COTS with orderly release */#define T_CLTS		3	/* Connectionless transport service *//* *  Transport provider flags */#define T_SNDZERO	1	/* Must match <sys/strops.h>: SNDZERO */#define XPG4_1		2	/* This indicates that the transport provider conforms to XTI in				   XPG4 and supports the new primitives T_ADDR_REQ and T_ADDR_ACK *//* *  User level states (maintained internally by libnsl_s). */#define T_UNINIT	0#define T_UNBND		1#define T_IDLE		2#define T_OUTCON	3#define T_INCON		4#define T_DATAXFER	5#define T_OUTREL	6#define T_INREL		7#define T_FAKE		8#define T_HACK		12/* *  Kernel level states of a transport end point. */#define TS_UNBND	0	/* unbound */#define TS_WACK_BREQ	1	/* waiting for T_BIND_REQ ack */#define TS_WACK_UREQ	2	/* waiting for T_UNBIND_REQ ack */#define TS_IDLE		3	/* idle */#define TS_WACK_OPTREQ	4	/* waiting for T_OPTMGMT_REQ ack */#define TS_WACK_CREQ	5	/* waiting for T_CONN_REQ ack */#define TS_WCON_CREQ	6	/* waiting for T_CONN_REQ confirmation */#define TS_WRES_CIND	7	/* waiting for T_CONN_IND */#define TS_WACK_CRES	8	/* waiting for T_CONN_RES ack */#define TS_DATA_XFER	9	/* data transfer */#define TS_WIND_ORDREL	10	/* releasing read but not write */#define TS_WREQ_ORDREL	11	/* wait to release write but not read */#define TS_WACK_DREQ6	12	/* waiting for T_DISCON_REQ ack */#define TS_WACK_DREQ7	13	/* waiting for T_DISCON_REQ ack */#define TS_WACK_DREQ9	14	/* waiting for T_DISCON_REQ ack */#define TS_WACK_DREQ10	15	/* waiting for T_DISCON_REQ ack */#define TS_WACK_DREQ11	16	/* waiting for T_DISCON_REQ ack */#define TS_NOSTATES	17/* *  Messages used by "timod". */#define T_CONN_REQ	0#define T_CONN_RES	1#define T_DISCON_REQ	2#define T_DATA_REQ	3#define T_EXDATA_REQ	4#define T_INFO_REQ	5#define T_BIND_REQ	6#define T_UNBIND_REQ	7#define T_UNITDATA_REQ	8#define T_OPTMGMT_REQ	9#define T_ORDREL_REQ	10#define T_OPTDATA_REQ	24	/* data with options request */#define T_ADDR_REQ	25	/* address request */#define T_CAPABILITY_REQ 28#define T_CONN_IND	11#define T_CONN_CON	12#define T_DISCON_IND	13#define T_DATA_IND	14#define T_EXDATA_IND	15#define T_INFO_ACK	16#define T_BIND_ACK	17#define T_ERROR_ACK	18#define T_OK_ACK	19#define T_UNITDATA_IND	20#define T_UDERROR_IND	21#define T_OPTMGMT_ACK	22#define T_ORDREL_IND	23#define T_OPTDATA_IND	26	/* data with options indication */#define T_ADDR_ACK	27	/* address acknowledgement */#define T_CAPABILITY_ACK 29#ifndef T_MORE/* *  Flags used from user level library routines. */#define T_MORE		0x0001#define T_EXPEDITED	0x0002#define T_NEGOTIATE	0x0004	/* Negotiate options */#define T_CHECK		0x0008	/* Check options */#define T_DEFAULT	0x0010	/* Get default options */#define T_SUCCESS	0x0020	/* Success */#define T_FAILURE	0x0040	/* Failure */#define T_CURRENT	0x0080	/* Get current options */#define T_PARTSUCCESS	0x0100	/* Partial success */#define T_READONLY	0x0200	/* Option is read only */#define T_NOTSUPPORT	0x0400	/* Option is not supported */#endif#define T_ALLOPT	0	/* All options at a level */#define T_ODF_MORE	T_MORE#define T_ODF_EX	T_EXPEDITED/* *  T_INFO_REQ, M_PCPROTO * *  This primitive requests the transport provider to return the sizes of all *  relevant protocol parameters, plus the current state of the provider[2]. */struct T_info_req {	t_scalar_t PRIM_type;		/* always T_INFO_REQ */};/* *  T_BIND_REQ, M_PROTO * *  This primitive request that the transport provider bind a protocol address *  to the stream, negotiate the number of connection indications allowed to *  be outstanding by the transport provider for the specified protocol *  address, and activate[3] the stream associated with the protocol address. */struct T_bind_req {	t_scalar_t PRIM_type;		/* always T_BIND_REQ */	t_scalar_t ADDR_length;		/* length of address */	t_scalar_t ADDR_offset;		/* offset of address */	t_uscalar_t CONIND_number;	/*	   requested number of connect indications to be queued 	 */};/* *  T_UNBIND_REQ, M_PROTO * *  This primitive requests that the transport provider unbind the protocol *  address associated with the stream and deactivate the stream.  The format */struct T_unbind_req {	t_scalar_t PRIM_type;		/* always T_UNBIND_REQ */};/* *  T_OPTMGMT_REQ, M_PROTO * *  This primitive allows the transport user to manage the options associated *  with the stream. * *      MGMT_flags: *          T_NEGOTIATE - negotiate and set the options with the transport provider *          T_CHECK     - check the validity of the specified options *          T_CURRENT   - return the options currently in effect *          T_DEFAULT   - return the default options */struct T_optmgmt_req {	t_scalar_t PRIM_type;		/* always T_OPTMGMT_REQ */	t_scalar_t OPT_length;		/* options length */	t_scalar_t OPT_offset;		/* options offset */	t_scalar_t MGMT_flags;		/* flags */};/* *  T_ADDR_REQ, M_PROTO * *  This primitive requests that the transport provider return the local *  protocol address that is bound to the stream and the address of the remote *  transport entity if a connection has been established. */struct T_addr_req {	t_scalar_t PRIM_type;		/* always T_ADDR_REQ */};/*   information acknowledgment  *//* *  T_INFO_ACK, M_PCPROTO * *  This primitive indicates to the transport user any relevant protocol- *  dependent parameters.  It should be initiated in response to the *  T_INFO_REQ primitives described above. */struct T_info_ack {	t_scalar_t PRIM_type;		/* always T_INFO_ACK */	t_scalar_t TSDU_size;		/* max TSDU size */	t_scalar_t ETSDU_size;		/* max ETSDU size */	t_scalar_t CDATA_size;		/* Connect data size */	t_scalar_t DDATA_size;		/* Discon data size */	t_scalar_t ADDR_size;		/* TSAP size */	t_scalar_t OPT_size;		/* options size */	t_scalar_t TIDU_size;		/* TIDU size */	t_scalar_t SERV_type;		/* service type */	t_scalar_t CURRENT_state;	/* current state */	t_scalar_t PROVIDER_flag;	/* provider flags */};/* *  T_BIND_ACK, M_PCPROTO * *  This primitive indicates to the transport user that the sepcified protocol *  address has been bound to the stream, that the specified number of connect *  indications are allowed to be queued by the transport provider for the *  specified protocol address, and that the stream associated with the *  specified protocol address has been activated. */struct T_bind_ack {	t_scalar_t PRIM_type;		/* always T_BIND_ACK */	t_scalar_t ADDR_length;		/* length of address - see note in sec. 1.4 */	t_scalar_t ADDR_offset;		/* offset of address */	t_uscalar_t CONIND_number;	/* connect indications to be queued */};/* *  T_OPTMGMT_ACK, M_PCPROTO * *  This indicates to the transport user that the options management request *  has completed. */struct T_optmgmt_ack {	t_scalar_t PRIM_type;		/* always T_OPTMGMT_ACK */	t_scalar_t OPT_length;		/* options length - see note in sec. 1.4 */	t_scalar_t OPT_offset;		/* options offset */	t_scalar_t MGMT_flags;		/* flags */};/* *  T_ERROR_ACK, M_PRPROTO * *  This primitive indicates to the transport user that a non-fatal[9] error *  has occured in the last transport-user-originated primitive.  This may *  only be initiated as an acknowledgement for those primitives that require *  one.  It also indicates to the user that no action was taken on the *  primitive that cause the error. */struct T_error_ack {	t_scalar_t PRIM_type;		/* always T_ERROR_ACK */	t_scalar_t ERROR_prim;		/* primitive in error */	t_scalar_t TLI_error;		/* TLI error code - see not in sec. 1.4 */	t_scalar_t UNIX_error;		/* UNIX error code - see not in sec. 1.4 */};/* *  T_OK_ACK, M_PCPROTO * *  This primtiive indicates to the transport user that the previous *  transport-user-originated primitive was received successfully by the *  transport provider.  It does not indicate to the transport user any *  transport protocol action taken due to the issuance of the last primitive. *  This may only be initiated as an acknowledgement for those primitives that *  require one. */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -