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

📄 chi.h

📁 OpenSS7 This the fourth public release of the OpenSS7 Master Package. See README in the release for
💻 H
📖 第 1 页 / 共 2 页
字号:
/***************************************************************************** @(#) chi.h,v 0.9.2.5 2007/02/13 14:05:28 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:28 by brian ----------------------------------------------------------------------------- chi.h,v Revision 0.9.2.5  2007/02/13 14:05:28  brian - corrected ulong and long for 32-bit compat *****************************************************************************/#ifndef __SS7_CHI_H__#define __SS7_CHI_H__#ident "@(#) chi.h,v openss7-0_9_2_E(0.9.2.5) Copyright (c) 2001-2007 OpenSS7 Corporation."/* This file can be processed by doxygen(1). */typedef int32_t ch_long;typedef u_int32_t ch_ulong;typedef u_int16_t ch_ushort;typedef u_int8_t ch_uchar;#define CH_INFO_REQ		 1UL#define CH_OPTMGMT_REQ		 2UL#define CH_ATTACH_REQ		 3UL#define CH_ENABLE_REQ		 4UL#define CH_CONNECT_REQ		 5UL#define CH_DATA_REQ		 6UL#define CH_DISCONNECT_REQ	 7UL#define CH_DISABLE_REQ		 8UL#define CH_DETACH_REQ		 9UL#define CH_INFO_ACK		10UL#define CH_OPTMGMT_ACK		11UL#define CH_OK_ACK		12UL#define CH_ERROR_ACK		13UL#define CH_ENABLE_CON		14UL#define CH_CONNECT_CON		15UL#define CH_DATA_IND		16UL#define CH_DISCONNECT_IND	17UL#define CH_DISCONNECT_CON	18UL#define CH_DISABLE_IND		19UL#define CH_DISABLE_CON		20UL#define CH_EVENT_IND		21UL/* *  CH STATES */#define CHS_UNINIT		-2UL#define CHS_UNUSABLE		-1UL#define CHS_DETACHED		 0UL#define CHS_WACK_AREQ		 1UL#define CHS_WACK_UREQ		 2UL#define CHS_ATTACHED		 3UL#define CHS_WACK_EREQ		 4UL#define CHS_WCON_EREQ		 5UL#define CHS_WACK_RREQ		 6UL#define CHS_WCON_RREQ		 7UL#define CHS_ENABLED		 8UL#define CHS_WACK_CREQ		 9UL#define CHS_WCON_CREQ		10UL#define CHS_WACK_DREQ		11UL#define CHS_WCON_DREQ		12UL#define CHS_CONNECTED		13UL/* *  CH STATE FLAGS */#define CHSF_UNINIT		(1<<CHS_UNINIT)#define CHSF_UNUSABLE		(1<<CHS_UNUSABLE)#define CHSF_DETACHED		(1<<CHS_DETACHED)#define CHSF_WACK_AREQ		(1<<CHS_WACK_AREQ)#define CHSF_WACK_UREQ		(1<<CHS_WACK_UREQ)#define CHSF_ATTACHED		(1<<CHS_ATTACHED)#define CHSF_WACK_EREQ		(1<<CHS_WACK_EREQ)#define CHSF_WCON_EREQ		(1<<CHS_WCON_EREQ)#define CHSF_WACK_RREQ		(1<<CHS_WACK_RREQ)#define CHSF_WCON_RREQ		(1<<CHS_WCON_RREQ)#define CHSF_ENABLED		(1<<CHS_ENABLED)#define CHSF_WACK_CREQ		(1<<CHS_WACK_CREQ)#define CHSF_WCON_CREQ		(1<<CHS_WCON_CREQ)#define CHSF_WACK_DREQ		(1<<CHS_WACK_DREQ)#define CHSF_WCON_DREQ		(1<<CHS_WCON_DREQ)#define CHSF_CONNECTED		(1<<CHS_CONNECTED)/* *  CH PROTOCOL PRIMITIVES *//* *  CH_INFO_REQ *  ------------------------------------------------------------------------- */typedef struct CH_info_req {	ch_ulong ch_primitive;		/* always CH_INFO_REQ */} CH_info_req_t;/* *  CH_INFO_ACK *  ------------------------------------------------------------------------- *  Indicates to the channel user requested information concerning the channel *  provider and the attached channel (if any). */typedef struct CH_info_ack {	ch_ulong ch_primitive;		/* always CH_INFO_ACK */	ch_ulong ch_addr_length;	/* channel address length */	ch_ulong ch_addr_offset;	/* channel address offset */	ch_ulong ch_parm_length;	/* channel paramters length */	ch_ulong ch_parm_offset;	/* channel paramters offset */	ch_ulong ch_prov_flags;		/* provider options flags */	ch_ulong ch_style;		/* provider style */	ch_ulong ch_version;		/* channel interface version */	ch_ulong ch_state;		/* channel state */} CH_info_ack_t;#define CH_STYLE1	0x0	/* does not perform attach */#define CH_STYLE2	0x1	/* does perform attach */#define CH_VERSION_1_0	0x10	/* version 1.0 of interface */#define CH_VERSION_1_1	0x11	/* version 1.1 of interface */#define CH_VERSION	CH_VERSION_1_1#define CH_PARMS_CIRCUIT	0x01	/* parms structure type */typedef struct CH_parms_circuit {	ch_ulong cp_type;		/* always CH_PARMS_CIRCUIT */	ch_ulong cp_encoding;		/* encoding */	ch_ulong cp_block_size;		/* data block size (bits) */	ch_ulong cp_samples;		/* samples per block */	ch_ulong cp_sample_size;	/* sample size (bits) */	ch_ulong cp_rate;		/* clock rate (samples/second) */	ch_ulong cp_tx_channels;	/* number of tx channels */	ch_ulong cp_rx_channels;	/* number of rx channels */	ch_ulong cp_opt_flags;		/* options flags */} CH_parms_circuit_t;union CH_parms {	ch_ulong cp_type;		/* structure type */	CH_parms_circuit_t circuit;	/* circuit structure */};#define CH_PARM_OPT_CLRCH	0x01	/* supports clear channel */#define CH_ENCODING_NONE	 0#define CH_ENCODING_CN		 1#define CH_ENCODING_DVI4	 2#define CH_ENCODING_FS1015	 3#define CH_ENCODING_FS1016	 4#define CH_ENCODING_G711_PCM_A	 5#define CH_ENCODING_G711_PCM_L	 6#define CH_ENCODING_G711_PCM_U	 7#define CH_ENCODING_G721	 8#define CH_ENCODING_G722	 9#define CH_ENCODING_G723	10#define CH_ENCODING_G726	11#define CH_ENCODING_G728	12#define CH_ENCODING_G729	13#define CH_ENCODING_GSM		14#define CH_ENCODING_GSM_EFR	15#define CH_ENCODING_GSM_HR	16#define CH_ENCODING_LPC		17#define CH_ENCODING_MPA		18#define CH_ENCODING_QCELP	19#define CH_ENCODING_RED		20#define CH_ENCODING_S16_BE	21#define CH_ENCODING_S16_LE	22#define CH_ENCODING_S8		23#define CH_ENCODING_U16_BE	24#define CH_ENCODING_U16_LE	25#define CH_ENCODING_U8		26#define CH_ENCODING_VDVI	27#define CH_RATE_VARIABLE	0#define CH_RATE_8000		8000#define CH_RATE_11025		11025#define CH_RATE_16000		16000#define CH_RATE_22050		22050#define CH_RATE_44100		44100#define CH_RATE_90000		90000#define CH_RATE_184000		184000	/* 23B */#define CH_RATE_192000		192000	/* T1 */#define CH_RATE_240000		240000	/* 30B */#define CH_RATE_248000		248000	/* E1 *//* *  CH_OPTMGMT_REQ *  ------------------------------------------------------------------------- */typedef struct CH_optmgmt_req {	ch_ulong ch_primitive;		/* always CH_OPTMGMT_REQ */	ch_ulong ch_opt_length;		/* length of options */	ch_ulong ch_opt_offset;		/* offset of options */	ch_ulong ch_mgmt_flags;		/* option flags */} CH_optmgmt_req_t;/* *  CH_OPTMGMT_ACK

⌨️ 快捷键说明

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