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

📄 tihdr.h

📁 This a separate release of the OpenSS7 X/Open XTI/TLI library, TLI modules (timod, tirdwr) and the I
💻 H
📖 第 1 页 / 共 2 页
字号:
/***************************************************************************** @(#) tihdr.h,v 0.9.2.3 2004/05/16 04:12:33 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/05/16 04:12:33 by brian tihdr.h,v Revision 0.9.2.3  2004/05/16 04:12:33  brian - Updating strxnet release. Revision 1.4  2004/05/14 08:00:02  brian - Updated xns, tli, inet, xnet and documentation. *****************************************************************************/#ifndef _SYS_TIHDR_H#define _SYS_TIHDR_H#ident "@(#) strxnet-0_9_2-4(0.9.2.3) Copyright (c) 1997-2004 OpenSS7 Corporation."#define T_CURRENT_VERSION 5#ifndef t_scalar_ttypedef int32_t t_scalar_t;#define t_scalar_t t_scalar_t#endif#ifndef t_uscalar_ttypedef u_int32_t t_uscalar_t;#define t_uscalar_t t_uscalar_t#endif#include <sys/tpi.h>		/* common TLI, XTI, TI definitions *//*  *  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#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. */struct T_ok_ack {	t_scalar_t PRIM_type;		/* always T_OK_ACK */	t_scalar_t CORRECT_prim;	/* primitive */};/*  *  T_ADDR_ACK, M_PCPROTO * *  This primitive indicates to the transport user the addresses fo the local *  and remote transport entities.  The local address is the protocol address

⌨️ 快捷键说明

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