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

📄 xti.h

📁 7号信令功能代码,为开源代码
💻 H
📖 第 1 页 / 共 2 页
字号:
/***************************************************************************** @(#) xti.h,v 1.1.4.1 2004/01/12 23:44:51 brian Exp -----------------------------------------------------------------------------     Copyright (C) 2001-2004 OpenSS7 Corporation.  All Rights Reserved.                                  PUBLIC LICENSE     This license is provided without fee, provided that the above copy-     right notice and this public license must be retained on all copies,     extracts, compilations and derivative works.  Use or distribution of     this work in a manner that restricts its use except as provided here     will render this license void.     The author(s) hereby waive any and all other restrictions in respect     of their copyright in this software and its associated documentation.     The authors(s) of this software place in the public domain any novel     methods or processes which are embodied in this software.     The author(s) undertook to write it for the sake of the advancement     of the Arts and Sciences, but it is provided as is, and the author(s)     will not take any responsibility in it. ----------------------------------------------------------------------------- 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). ----------------------------------------------------------------------------- Last Modified 2004/01/12 23:44:51 by brian *****************************************************************************/#ifndef _XTI_XTI_H#define _XTI_XTI_H#ident "@(#) xti.h,v LiS-2_16_18-8(1.1.4.1) Copyright (c) 1997-2004 OpenSS7 Corporation."#include <unistd.h>#include <features.h>/* *INDENT-OFF* */__BEGIN_DECLS/* *INDENT-ON* */#ifndef t_scalar_t/** * \ingroup libxti * XTI signed scalar type. * * Strangely enough, t_uscalar_t is defined in stropts.h for SUSv2 and SUSv3 * systems, however, t_scalar_t is only defined here. */typedef int32_t t_scalar_t;#define t_scalar_t t_scalar_t#endif#if !defined _STROPTS_H || defined NEED_T_USCALAR_T#ifndef t_uscalar_t/** * \ingroup libxti * XTI unsigned scalar type. * * This type is not defined in the XTI Library as it is supposed to be defined * in stropts.h according to SUSv2 and SUSv3. */typedef u_int32_t t_uscalar_t;#define t_uscalar_t t_uscalar_t#endif#endif				/* !defined _STROPTS_H || defined NEED_T_USCALAR_T *//*  * The following are the error codes needed by both the kernel * level transport providers and the user level library. */#define TBADADDR	 1	/* incorrect addr format */#define TBADOPT		 2	/* incorrect option format */#define TACCES		 3	/* incorrect permissions */#define TBADF		 4	/* illegal transport fd */#define TNOADDR		 5	/* couldn't allocate addr */#define TOUTSTATE	 6	/* out of state */#define TBADSEQ		 7	/* bad call sequence number */#define TSYSERR		 8	/* system error */#define TLOOK		 9	/* event requires attention */#define TBADDATA	10	/* illegal amount of data */#define TBUFOVFLW	11	/* buffer not large enough */#define TFLOW		12	/* flow control */#define TNODATA		13	/* no data */#define TNODIS		14	/* discon_ind not found on queue */#define TNOUDERR	15	/* unitdata error not found */#define TBADFLAG	16	/* bad flags */#define TNOREL		17	/* no ord rel found on queue */#define TNOTSUPPORT	18	/* primitive/action not supported */#define TSTATECHNG	19	/* state is in process of changing *//*  *  The following are XPG3 and up. */#define TNOSTRUCTYPE	20	/* unsupported struct-type requested */#define TBADNAME	21	/* invalid transport provider name */#define TBADQLEN	22	/* qlen is zero */#define TADDRBUSY	23	/* address in use *//*  *  The following are _XOPEN_SOURCE (XPG4 and up). */#if defined(_XOPEN_SOURCE)#define TINDOUT		24	/* outstanding connection indications */#define TPROVMISMATCH	25	/* transport provider mismatch */#define TRESQLEN	26	/* resfd specified to accept w/qlen >0 */#define TRESADDR	27	/* resfd not bound to same addr as fd */#define TQFULL		28	/* incoming connection queue full */#define TPROTO		29	/* XTI protocol error */#endif/*  * The following are the events returned from t_look(). */#define T_LISTEN	0x0001	/* connection indication received */#define T_CONNECT	0x0002	/* connection confirmation received */#define T_DATA		0x0004	/* normal data received */#define T_EXDATA	0x0008	/* expedited data received */#define T_DISCONNECT	0x0010	/* disconnection received */#define T_UDERR		0x0040	/* datagram error indication */#define T_ORDREL	0x0080	/* orderly release indication */#define T_GODATA	0x0100	/* sending normal data is again possible */#define T_GOEXDATA	0x0200	/* sending expedited data is again possible */#define T_LEAFCHANGE	0x0400	/* status of a leaf has changed */#define T_EVENTS	0x0800#define T_ERROR		(~0)/*  * The following are the flag definitions needed by the * user level library routines. */#define T_MORE		0x001	/* more data */#define T_EXPEDITED	0x002	/* expedited data */#define T_PUSH		0x004	/* send data immediately */#define T_NEGOTIATE	0x004	/* set opts */#define T_CHECK		0x008	/* check opts */#define T_DEFAULT	0x010	/* get default opts */#define T_SUCCESS	0x020	/* successful */#define T_FAILURE	0x040	/* failure *//*  *  The following are _XOPEN_SOURCE (XPG4 and up). */#if defined(_XOPEN_SOURCE)#define T_CURRENT	0x080	/* get current options */#define T_PARTSUCCESS	0x100	/* partial success */#define T_READONLY	0x200	/* read-only */#define T_NOTSUPPORT	0x400	/* not supported */#endif/*  * extern int t_errno; *  * XTI error return.  t_errno is a modifiable lvalue of type int.  The above * definition is typical of a single-threaded environment.  In a * multi-threading environment a typical definition of t_errno is: */extern int *_t_errno(void);#define t_errno (*(_t_errno()))/*  * iov maximum */#define T_IOV_MAX  16		/* Maximum number of scatter/gather buffers. The value is not				   mandatory.  The value must be at least 16. *//*  *  IO vector structure. */struct t_iovec {	void *iov_base;			/* The base of the vector component. */	size_t iov_len;			/* The length of the vector component. */};/*  *  \struct t_info *  Protocol-specific service limits.  Provides information on protocol *  service limits for the transport endpoint. */struct t_info {	t_scalar_t addr;		/* max size of the transport protocol address */	t_scalar_t options;		/* max number of bytes of protocol-specific options */	t_scalar_t tsdu;		/* max size of a transport service data unit. */	t_scalar_t etsdu;		/* max size of expedited transport service data unit. */	t_scalar_t connect;		/* max amount of data allowed on connection establishment					   functions. */	t_scalar_t discon;		/* max data allowed on t_snddis(), t_rcvdis(),					   t_sndreldata() and t_rcvreldata() functions. */	t_scalar_t servtype;		/* Service type supported by transport provider. */#if defined(_XOPEN_SOURCE)	t_scalar_t flags;		/* Other info about the transport provider. */	t_scalar_t tidu;		/* max size of interface transport data unit. */#endif};/*  *  Service type defines. */#define T_COTS		1	/* Connection-mode transport service. */#define T_COTS_ORD	2	/* Connection-mode with orderly release. */#define T_CLTS		3	/* Connectionless-mode transport service. *//*  *  Flags defines (other info about the transport provider). */#define T_SENDZERO	0x001	/* supports 0-length TSDUs */#define T_ORDRELDATA	0x002	/* supports orderly release data */#define T_XPG4_1	0x100	/* XPG4 and higher *//*  * netbuf structure. */struct netbuf {	unsigned int maxlen;	unsigned int len;	char *buf;};#undef t_opthdr/*  * t_opthdr structure */struct t_opthdr {	t_uscalar_t len;		/* total length of option; i.e, sizeof (struct t_opthdr) +					   length of option value in bytes */	t_uscalar_t level;		/* protocol affected */	t_uscalar_t name;		/* option name */	t_uscalar_t status;		/* status value */	/* followed by option value(s) */};/*  *  Format of the address and options arguments of bind. */struct t_bind {	struct netbuf addr;	unsigned int qlen;};/*  * Options management structure. */struct t_optmgmt {	struct netbuf opt;	t_scalar_t flags;};/*  * Disconnection structure. */struct t_discon {	struct netbuf udata;		/* user data */	int reason;			/* reason code */	int sequence;			/* sequence number */};/*  * Call structure. */struct t_call {	struct netbuf addr;		/* address */	struct netbuf opt;		/* options */	struct netbuf udata;		/* user data */	int sequence;			/* sequence number */};/*  * Datagram structure. */struct t_unitdata {	struct netbuf addr;		/* address */	struct netbuf opt;		/* options */	struct netbuf udata;		/* user data */};

⌨️ 快捷键说明

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