📄 tr.h
字号:
/***************************************************************************** @(#) tr.h,v 0.9.2.7 2007/02/13 14:05:29 brian Exp ----------------------------------------------------------------------------- Copyright (c) 2001-2007 OpenSS7 Corporation <http://www.openss7.com/> Copyright (c) 1997-2001 Brian F. G. Bidulock <bidulock@openss7.org> 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; version 2 of the License. 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 successor 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 2007/02/13 14:05:29 by brian ----------------------------------------------------------------------------- tr.h,v Revision 0.9.2.7 2007/02/13 14:05:29 brian - corrected ulong and long for 32-bit compat *****************************************************************************/#ifndef __SS7_TR_H__#define __SS7_TR_H__#ident "@(#) tr.h,v openss7-0_9_2_E(0.9.2.7) Copyright (c) 2001-2007 OpenSS7 Corporation."/* This file can be processed by doxygen(1). */#define TR_INFO_REQ 0 /* Information request */#define TR_BIND_REQ 1 /* Bind to network address */#define TR_UNBIND_REQ 2 /* Unbind from network address */#define TR_OPTMGMT_REQ 5 /* Options management request */#define TR_UNI_REQ 6 /* Unidirectional request */#define TR_BEGIN_REQ 7 /* Begin transaction request */#define TR_BEGIN_RES 8 /* Begin transaction response-Continue request */#define TR_CONT_REQ 9 /* Continue transaction request */#define TR_END_REQ 10 /* End transaction request */#define TR_ABORT_REQ 11 /* Abort transaction request */#define TR_INFO_ACK 12 /* Information acknowledgement */#define TR_BIND_ACK 13 /* Bound to network address */#define TR_OK_ACK 15 /* Success acknowledgement */#define TR_ERROR_ACK 16 /* Error acknowledgement */#define TR_OPTMGMT_ACK 17 /* Options management acknowledgement */#define TR_UNI_IND 18 /* Unidirectional indication */#define TR_BEGIN_IND 19 /* Begin transaction indication */#define TR_BEGIN_CON 20 /* Begin transaction confirmation-Continue ind */#define TR_CONT_IND 21 /* Continue transaction indication */#define TR_END_IND 22 /* End transaction indication */#define TR_ABORT_IND 23 /* Abort transaction indication */#define TR_NOTICE_IND 24 /* Error indication */#define TR_QOS_SEL1 0x0501typedef struct { t_uscalar_t type; /* Always TR_QOS_SEL1 */ t_uscalar_t flags; /* Return option */ t_uscalar_t seq_ctrl; /* Sequence Control */ t_uscalar_t priority; /* Message priority */} TR_qos_sel1_t;#define TR_PROVIDER 0x0001#define TR_USER 0x0002/* * TRPI interface states */#define TRS_UNBND 0 /* TR user not bound to network address */#define TRS_WACK_BREQ 1 /* Awaiting acknowledgement of N_BIND_REQ */#define TRS_WACK_UREQ 2 /* Pending acknowledgement for N_UNBIND_REQ */#define TRS_IDLE 3 /* Idle, no connection */#define TRS_WACK_OPTREQ 4 /* Pending acknowledgement of N_OPTMGMT_REQ */#define TRS_WACK_RRES 5 /* Pending acknowledgement of N_RESET_RES */#define TRS_WCON_CREQ 6 /* Pending confirmation of N_CONN_REQ */#define TRS_WRES_CIND 7 /* Pending response of N_CONN_REQ */#define TRS_WACK_CRES 8 /* Pending acknowledgement of N_CONN_RES */#define TRS_DATA_XFER 9 /* Connection-mode data transfer */#define TRS_WCON_RREQ 10 /* Pending confirmation of N_RESET_REQ */#define TRS_WRES_RIND 11 /* Pending response of N_RESET_IND */#define TRS_WACK_DREQ6 12 /* Waiting ack of N_DISCON_REQ */#define TRS_WACK_DREQ7 13 /* Waiting ack of N_DISCON_REQ */#define TRS_WACK_DREQ9 14 /* Waiting ack of N_DISCON_REQ */#define TRS_WACK_DREQ10 15 /* Waiting ack of N_DISCON_REQ */#define TRS_WACK_DREQ11 16 /* Waiting ack of N_DISCON_REQ */#define TRS_NOSTATES 17/* * TR_ERROR_ACK error return code values */#define TRBADADDR 1 /* Incorrect address format/illegal address information */#define TRBADOPT 2 /* Options in incorrect format or contain illegal information */#define TRACCESS 3 /* User did not have proper permissions */#define TRNOADDR 5 /* TR Provider could not allocate address */#define TROUTSTATE 6 /* Primitive was issues in wrong sequence */#define TRBADSEQ 7 /* Sequence number in primitive was incorrect/illegal */#define TRSYSERR 8 /* UNIX system error occurred */#define TRBADDATA 10 /* User data spec. outside range supported by TR provider */#define TRBADFLAG 16 /* Flags specified in primitive were illegal/incorrect */#define TRNOTSUPPORT 18 /* Primitive type not supported by the TR provider */#define TRBOUND 19 /* Illegal second attempt to bind listener or default listener */#define TRBADQOSPARAM 20 /* QOS values specified are outside the range supported by the TR provider */#define TRBADQOSTYPE 21 /* QOS structure type specified is not supported by the TR provider */#define TRBADTOKEN 22 /* Token used is not associated with an open stream */#define TRNOPROTOID 23 /* Protocol id could not be allocated *//* * TR_INFO_REQ. This primitive consists of one M_PCPROTO message block. */typedef struct TR_info_req { t_uscalar_t PRIM_type; /* Always TR_INFO_REQ */} TR_info_req_t;/* * TR_INFO_ACK. This primitive consists of one M_PCPROTO message block. */typedef struct TR_info_ack { t_scalar_t PRIM_type; /* Always TR_INFO_ACK */ t_scalar_t TSDU_size; /* maximum TSDU size */ t_scalar_t ETSDU_size; /* maximum ETSDU size */ t_scalar_t CDATA_size; /* connect data size */ t_scalar_t DDATA_size; /* discon data size */ t_scalar_t ADDR_size; /* address size */ t_scalar_t OPT_size; /* options size */ t_scalar_t TIDU_size; /* transaction i/f data unit size */ t_scalar_t SERV_type; /* service type */ t_scalar_t CURRENT_state; /* current state */ t_scalar_t PROVIDER_flag; /* type of TR provider */ t_scalar_t TRPI_version; /* version # of trpi that is supported */} TR_info_ack_t;/* * TR_BIND_REQ. This primitive consists of one M_PROTO message block. */typedef struct TR_bind_req { t_uscalar_t PRIM_type; /* Always TR_BIND_REQ */ t_uscalar_t ADDR_length; /* address length */ t_uscalar_t ADDR_offset; /* address offset */ t_uscalar_t XACT_number; /* maximum outstanding transaction reqs. */ t_uscalar_t BIND_flags; /* bind flags */} TR_bind_req_t;/* * TR_BIND_ACK. This primitive consists of one M_PROTO message block. */typedef struct TR_bind_ack { t_uscalar_t PRIM_type; /* Always TR_BIND_ACK */ t_uscalar_t ADDR_length; /* address length */ t_uscalar_t ADDR_offset; /* address offset */ t_uscalar_t XACT_number; /* open transactions */ t_uscalar_t TOKEN_value; /* value of "token" assigned to stream */} TR_bind_ack_t;/* * TR_ADDR_REQ. This primitive consists of one M_PROTO message block. */typedef struct TR_addr_req { t_uscalar_t PRIM_type; /* Always TR_ADDR_REQ */ t_uscalar_t TRANS_id; /* Transaction id */} TR_addr_req_t;/* * TR_ADDR_ACK. This primitive consists of one M_PCPROTO message block. */typedef struct TR_addr_ack { t_uscalar_t PRIM_type; /* Always TR_ADDR_ACK */ t_uscalar_t LOCADDR_length; /* local address length */ t_uscalar_t LOCADDR_offset; /* local address offset */ t_uscalar_t REMADDR_length; /* remote address length */ t_uscalar_t REMADDR_offset; /* remote address offset */} TR_addr_ack_t;/* * TR_UNBIND_REQ. This primtive consists of one M_PROTO message block. */typedef struct TR_unbind_req {
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -