Links

GitHub

Open HUB

Quick Links

Download

STREAMS

SIGTRAN

SS7

Hardware

SCTP

Browse Source

Applications

SS7 Stack

ISDN Stack

SIGTRAN Stack

VoIP Stack

MG Stack

SS7/ISDN Devices

IP Transport

Embedded Systems

Operating System

Resources

Packages

Sys Req

Repositories

Download

Mailing Lists

Browse Source

CVS Archive

Bug Reports

Library

Hardware

Vendor Links

Home

Overview

Status

Documentation

Resources

About

News

Description: Code

File /code/strss7/src/include/ss7/mtpi.h



#ifndef __SS7_MTPI_H__
#define __SS7_MTPI_H__

#ident "@(#) mtpi.h,v openss7-0_9_2_G(0.9.2.8) Copyright (c) 2001-2008 OpenSS7 Corporation."

#define MTP_VERSION_1	    0x10
#define MTP_CURRENT_VERSION MTP_VERSION_1

typedef int32_t mtp_long;
typedef u_int32_t mtp_ulong;
typedef u_int16_t mtp_ushort;
typedef u_int8_t mtp_uchar;

#define MTP_BIND_REQ			 1+120
#define MTP_UNBIND_REQ			 2+120
#define MTP_CONN_REQ			 3+120
#define MTP_DISCON_REQ			 4+120
#define MTP_ADDR_REQ			 5+120
#define MTP_INFO_REQ			 6+120
#define MTP_OPTMGMT_REQ			 7+120
#define MTP_TRANSFER_REQ		 8+120

#define MTP_OK_ACK			 9+120
#define MTP_ERROR_ACK			10+120
#define MTP_BIND_ACK			11+120
#define MTP_ADDR_ACK			12+120
#define MTP_INFO_ACK			13+120
#define MTP_OPTMGMT_ACK			14+120
#define MTP_TRANSFER_IND		15+120
#define MTP_PAUSE_IND			16+120
#define MTP_RESUME_IND			17+120
#define MTP_STATUS_IND			18+120
#define MTP_RESTART_BEGINS_IND		19+120
#define MTP_RESTART_COMPLETE_IND	20+120

#define MTPS_UNBND			 0UL
#define MTPS_WACK_BREQ			 1UL
#define MTPS_IDLE			 2UL
#define MTPS_WACK_CREQ			 3UL
#define MTPS_WCON_CREQ			 4UL
#define MTPS_CONNECTED			 5UL
#define MTPS_WACK_UREQ			 6UL
#define MTPS_WACK_DREQ6			 7UL
#define MTPS_WACK_DREQ9			 8UL
#define MTPS_WACK_OPTREQ		 9UL
#define MTPS_WREQ_ORDREL		10UL
#define MTPS_WIND_ORDREL		11UL
#define MTPS_WRES_CIND			12UL
#define MTPS_UNUSABLE			0xffffffffUL

#ifndef __HAVE_MTP_ADDR
#ifndef AF_MTP
#define AF_MTP 0
#endif
typedef struct mtp_addr {
	unsigned int family __attribute__ ((packed));
	unsigned short int ni __attribute__ ((packed));
	unsigned short int si __attribute__ ((packed));
	unsigned int pc __attribute__ ((packed));
} mtp_addr_t;

#define __HAVE_MTP_ADDR
#endif

typedef struct MTP_info_req {
	mtp_ulong mtp_primitive;
} MTP_info_req_t;

typedef struct MTP_info_ack {
	mtp_ulong mtp_primitive;
	mtp_ulong mtp_msu_size;
	mtp_ulong mtp_addr_size;
	mtp_ulong mtp_addr_length;
	mtp_ulong mtp_addr_offset;
	mtp_ulong mtp_current_state;
	mtp_ulong mtp_serv_type;
	mtp_ulong mtp_version;
} MTP_info_ack_t;

#define M_COMS	1
#define M_CLMS	2

typedef struct MTP_addr_req {
	mtp_ulong mtp_primitive;
} MTP_addr_req_t;

typedef struct MTP_addr_ack {
	mtp_ulong mtp_primitive;
	mtp_ulong mtp_loc_length;
	mtp_ulong mtp_loc_offset;
	mtp_ulong mtp_rem_length;
	mtp_ulong mtp_rem_offset;
} MTP_addr_ack_t;

typedef struct MTP_bind_req {
	mtp_ulong mtp_primitive;
	mtp_ulong mtp_addr_length;
	mtp_ulong mtp_addr_offset;
	mtp_ulong mtp_bind_flags;
} MTP_bind_req_t;

typedef struct MTP_bind_ack {
	mtp_ulong mtp_primitive;
	mtp_ulong mtp_addr_length;
	mtp_ulong mtp_addr_offset;
} MTP_bind_ack_t;

typedef struct MTP_unbind_req {
	mtp_ulong mtp_primitive;
} MTP_unbind_req_t;

typedef struct MTP_conn_req {
	mtp_ulong mtp_primitive;
	mtp_ulong mtp_addr_length;
	mtp_ulong mtp_addr_offset;
	mtp_ulong mtp_conn_flags;
} MTP_conn_req_t;

typedef struct MTP_discon_req {
	mtp_ulong mtp_primitive;
} MTP_discon_req_t;

typedef struct MTP_optmgmt_req {
	mtp_ulong mtp_primitive;
	mtp_ulong mtp_opt_length;
	mtp_ulong mtp_opt_offset;
	mtp_ulong mtp_mgmt_flags;
} MTP_optmgmt_req_t;

#define MTP_DEFAULT	0UL
#define MTP_CHECK	1UL
#define MTP_NEGOTIATE	2UL
#define MTP_CURRENT	3UL

typedef struct MTP_optmgmt_ack {
	mtp_ulong mtp_primitive;
	mtp_ulong mtp_opt_length;
	mtp_ulong mtp_opt_offset;
	mtp_ulong mtp_mgmt_flags;
} MTP_optmgmt_ack_t;

typedef struct MTP_ok_ack {
	mtp_ulong mtp_primitive;
	mtp_ulong mtp_correct_prim;
} MTP_ok_ack_t;

typedef struct MTP_error_ack {
	mtp_ulong mtp_primitive;
	mtp_ulong mtp_error_primitive;
	mtp_ulong mtp_mtpi_error;
	mtp_ulong mtp_unix_error;
} MTP_error_ack_t;

#define MSYSERR		0UL
#define MACCESS		1UL
#define MBADADDR	2UL
#define MNOADDR		3UL
#define MBADPRIM	4UL
#define MOUTSTATE	5UL
#define MNOTSUPP	6UL
#define MBADFLAG	7UL
#define MBADOPT		8UL

typedef struct MTP_transfer_req {
	mtp_ulong mtp_primitive;
	mtp_ulong mtp_dest_length;
	mtp_ulong mtp_dest_offset;
	mtp_ulong mtp_mp;
	mtp_ulong mtp_sls;
} MTP_transfer_req_t;

typedef struct MTP_transfer_ind {
	mtp_ulong mtp_primitive;
	mtp_ulong mtp_srce_length;
	mtp_ulong mtp_srce_offset;
	mtp_ulong mtp_mp;
	mtp_ulong mtp_sls;
} MTP_transfer_ind_t;

typedef struct MTP_pause_ind {
	mtp_ulong mtp_primitive;
	mtp_ulong mtp_addr_length;
	mtp_ulong mtp_addr_offset;
} MTP_pause_ind_t;

typedef struct MTP_resume_ind {
	mtp_ulong mtp_primitive;
	mtp_ulong mtp_addr_length;
	mtp_ulong mtp_addr_offset;
} MTP_resume_ind_t;

typedef struct MTP_status_ind {
	mtp_ulong mtp_primitive;
	mtp_ulong mtp_addr_length;
	mtp_ulong mtp_addr_offset;
	mtp_ulong mtp_type;
	mtp_ulong mtp_status;
} MTP_status_ind_t;

#define MTP_STATUS_TYPE_CONG		0x00
#define MTP_STATUS_TYPE_UPU		0x01
#define MTP_STATUS_TYPE_RSTR		0x02

#define MTP_STATUS_UPU_UNKNOWN		0x01
#define MTP_STATUS_UPU_UNEQUIPPED	0x02
#define MTP_STATUS_UPU_INACCESSIBLE	0x03

#define MTP_STATUS_CONGESTION_LEVEL0	0x00
#define MTP_STATUS_CONGESTION_LEVEL1	0x01
#define MTP_STATUS_CONGESTION_LEVEL2	0x02
#define MTP_STATUS_CONGESTION_LEVEL3	0x03
#define MTP_STATUS_CONGESTION		0x04

typedef struct MTP_restart_begins_ind {
	mtp_ulong mtp_primitive;
} MTP_restart_begins_ind_t;

typedef struct MTP_restart_complete_ind {
	mtp_ulong mtp_primitive;
} MTP_restart_complete_ind_t;

union MTP_primitives {
	mtp_ulong mtp_primitive;
	MTP_info_req_t info_req;
	MTP_info_ack_t info_ack;
	MTP_addr_req_t addr_req;
	MTP_addr_ack_t addr_ack;
	MTP_bind_req_t bind_req;
	MTP_bind_ack_t bind_ack;
	MTP_unbind_req_t unbind_req;
	MTP_conn_req_t conn_req;
	MTP_discon_req_t discon_req;
	MTP_optmgmt_req_t optmgmt_req;
	MTP_optmgmt_ack_t optmgmt_ack;
	MTP_ok_ack_t ok_ack;
	MTP_error_ack_t error_ack;
	MTP_transfer_req_t transfer_req;
	MTP_transfer_ind_t transfer_ind;
	MTP_pause_ind_t pause_ind;
	MTP_resume_ind_t resume_ind;
	MTP_status_ind_t status_ind;
	MTP_restart_complete_ind_t restart_complete_ind;
};

typedef struct {
	mtp_ulong mtp_affected_dpc;
} mtp_pause_ind_t;

typedef struct {
	mtp_ulong mtp_affected_dpc;
} mtp_resume_ind_t;

typedef struct {
	mtp_ulong mtp_affected_dpc;
	mtp_uchar mtp_cause;
	mtp_uchar mtp_level;
} mtp_status_ind_t;

typedef struct {
	mtp_ulong dpc;
	mtp_ulong opc;
	mtp_ulong sls;
} mtp_rl_t;

typedef struct {
	mtp_uchar si;
	mtp_uchar mp;
	mtp_uchar ni;
	mtp_rl_t rl;
} mtp_hdr_t;

typedef struct {
	mtp_uchar si;
	mtp_uchar mp;
	mtp_uchar ni;
	mtp_rl_t rl;
	mtp_uchar h0;
	mtp_uchar h1;
} mtp_msu_t;

typedef struct {
	mtp_long mtp_primitive;
	mtp_ulong mtp_signal;
	mtp_msu_t mtp_msg;
	mtp_ulong mtp_slc;
	mtp_ulong mtp_fsnc;
} mtp_signal_coo_t;

typedef struct {
	mtp_long mtp_primitive;
	mtp_ulong mtp_signal;
	mtp_msu_t mtp_msg;
} mtp_signal_coa_t;

typedef struct {
	mtp_long mtp_primitive;
	mtp_ulong mtp_signal;
	mtp_msu_t mtp_msg;
} mtp_signal_cbd_t;

typedef struct {
	mtp_long mtp_primitive;
	mtp_ulong mtp_signal;
	mtp_msu_t mtp_msg;
} mtp_signal_cba_t;

typedef struct {
	mtp_long mtp_primitive;
	mtp_ulong mtp_signal;
	mtp_msu_t mtp_msg;
} mtp_signal_eco_t;

typedef struct {
	mtp_long mtp_primitive;
	mtp_ulong mtp_signal;
	mtp_msu_t mtp_msg;
} mtp_signal_eca_t;

typedef struct {
	mtp_long mtp_primitive;
	mtp_ulong mtp_signal;
	mtp_msu_t mtp_msg;
} mtp_signal_rct_t;

typedef struct {
	mtp_long mtp_primitive;
	mtp_ulong mtp_signal;
	mtp_msu_t mtp_msg;
} mtp_signal_tfc_t;

typedef struct {
	mtp_long mtp_primitive;
	mtp_ulong mtp_signal;
	mtp_msu_t mtp_msg;
} mtp_signal_tfp_t;

typedef struct {
	mtp_long mtp_primitive;
	mtp_ulong mtp_signal;
	mtp_msu_t mtp_msg;
} mtp_signal_tfr_t;

typedef struct {
	mtp_long mtp_primitive;
	mtp_ulong mtp_signal;
	mtp_msu_t mtp_msg;
} mtp_signal_tfa_t;

typedef struct {
	mtp_long mtp_primitive;
	mtp_ulong mtp_signal;
	mtp_msu_t mtp_msg;
} mtp_signal_rsp_t;

typedef struct {
	mtp_long mtp_primitive;
	mtp_ulong mtp_signal;
	mtp_msu_t mtp_msg;
} mtp_signal_rsr_t;

typedef struct {
	mtp_long mtp_primitive;
	mtp_ulong mtp_signal;
	mtp_msu_t mtp_msg;
} mtp_signal_lin_t;

typedef struct {
	mtp_long mtp_primitive;
	mtp_ulong mtp_signal;
	mtp_msu_t mtp_msg;
} mtp_signal_lun_t;

typedef struct {
	mtp_long mtp_primitive;
	mtp_ulong mtp_signal;
	mtp_msu_t mtp_msg;
} mtp_signal_lia_t;

typedef struct {
	mtp_long mtp_primitive;
	mtp_ulong mtp_signal;
	mtp_msu_t mtp_msg;
} mtp_signal_lua_t;

typedef struct {
	mtp_long mtp_primitive;
	mtp_ulong mtp_signal;
	mtp_msu_t mtp_msg;
} mtp_signal_lid_t;

typedef struct {
	mtp_long mtp_primitive;
	mtp_ulong mtp_signal;
	mtp_msu_t mtp_msg;
} mtp_signal_lfu_t;

typedef struct {
	mtp_long mtp_primitive;
	mtp_ulong mtp_signal;
	mtp_msu_t mtp_msg;
} mtp_signal_llt_t;

typedef struct {
	mtp_long mtp_primitive;
	mtp_ulong mtp_signal;
	mtp_msu_t mtp_msg;
} mtp_signal_lrt_t;

typedef struct {
	mtp_long mtp_primitive;
	mtp_ulong mtp_signal;
	mtp_msu_t mtp_msg;
} mtp_signal_tra_t;

typedef struct {
	mtp_long mtp_primitive;
	mtp_ulong mtp_signal;
	mtp_msu_t mtp_msg;
} mtp_signal_dlc_t;

typedef struct {
	mtp_long mtp_primitive;
	mtp_ulong mtp_signal;
	mtp_msu_t mtp_msg;
} mtp_signal_css_t;

typedef struct {
	mtp_long mtp_primitive;
	mtp_ulong mtp_signal;
	mtp_msu_t mtp_msg;
} mtp_signal_cns_t;

typedef struct {
	mtp_long mtp_primitive;
	mtp_ulong mtp_signal;
	mtp_msu_t mtp_msg;
} mtp_signal_cnp_t;

typedef struct {
	mtp_long mtp_primitive;
	mtp_ulong mtp_signal;
	mtp_msu_t mtp_msg;
} mtp_signal_upu_t;

typedef struct {
	mtp_long mtp_primitive;
	mtp_ulong mtp_signal;
	mtp_msu_t mtp_msg;
} mtp_signal_sltm_t;

typedef struct {
	mtp_long mtp_primitive;
	mtp_ulong mtp_signal;
	mtp_msu_t mtp_msg;
} mtp_signal_slta_t;

typedef struct {
	mtp_long mtp_primitive;
	mtp_ulong mtp_signal;
	mtp_msu_t mtp_msg;
} mtp_signal_ssltm_t;

typedef struct {
	mtp_long mtp_primitive;
	mtp_ulong mtp_signal;
	mtp_msu_t mtp_msg;
} mtp_signal_sslta_t;

typedef struct {
	mtp_long mtp_primitive;
	mtp_ulong mtp_signal;
	mtp_hdr_t mtp_msg;
} mtp_signal_user_t;

typedef union {
	mtp_long mtp_primitive;
	mtp_signal_user_t msg;
	mtp_signal_coo_t coo;
	mtp_signal_coa_t coa;
	mtp_signal_cbd_t cbd;
	mtp_signal_cba_t cba;
	mtp_signal_eco_t eco;
	mtp_signal_eca_t eca;
	mtp_signal_rct_t rct;
	mtp_signal_tfc_t tfc;
	mtp_signal_tfp_t tfp;
	mtp_signal_tfr_t tfr;
	mtp_signal_tfa_t tfa;
	mtp_signal_rsp_t rsp;
	mtp_signal_rsr_t rsr;
	mtp_signal_lin_t lin;
	mtp_signal_lun_t lun;
	mtp_signal_lia_t lia;
	mtp_signal_lua_t lua;
	mtp_signal_lid_t lid;
	mtp_signal_lfu_t lfu;
	mtp_signal_llt_t llt;
	mtp_signal_lrt_t lrt;
	mtp_signal_tra_t tra;
	mtp_signal_dlc_t dlc;
	mtp_signal_css_t css;
	mtp_signal_cns_t cns;
	mtp_signal_cnp_t cnp;
	mtp_signal_upu_t upu;
	mtp_signal_sltm_t sltm;
	mtp_signal_slta_t slta;
	mtp_signal_ssltm_t ssltm;
	mtp_signal_sslta_t sslta;
	mtp_signal_user_t user;
} MTP_signals;

typedef MTP_signals mtp_msu_req_t;

typedef MTP_signals mtp_msu_ind_t;

#define MTP_SIGNAL_NONE		 0
#define MTP_SIGNAL_COO		 1
#define MTP_SIGNAL_COA		 2
#define MTP_SIGNAL_CBD		 3
#define MTP_SIGNAL_CBA		 4
#define MTP_SIGNAL_ECO		 5
#define MTP_SIGNAL_ECA		 6
#define MTP_SIGNAL_LIN		14
#define MTP_SIGNAL_LUN		15
#define MTP_SIGNAL_LIA		16
#define MTP_SIGNAL_LUA		17
#define MTP_SIGNAL_LID		18
#define MTP_SIGNAL_LFU		19
#define MTP_SIGNAL_LLT		20
#define MTP_SIGNAL_LRT		21
#define MTP_SIGNAL_TRA		22

#define MTP_SIGNAL_RCT		 7
#define MTP_SIGNAL_TFC		 8
#define MTP_SIGNAL_TFP		 9
#define MTP_SIGNAL_TFR		10
#define MTP_SIGNAL_TFA		11
#define MTP_SIGNAL_RSP		12
#define MTP_SIGNAL_RSR		13
#define MTP_SIGNAL_UPU		27

#define MTP_SIGNAL_DLC		23
#define MTP_SIGNAL_CSS		24
#define MTP_SIGNAL_CNS		25
#define MTP_SIGNAL_CNP		26

#define MTP_SIGNAL_SLTM		28
#define MTP_SIGNAL_SLTA		29
#define MTP_SIGNAL_SSLTM	30
#define MTP_SIGNAL_SSLTA	31

#define MTP_SIGNAL_USER		32

#endif

Last modified: Thu, 28 Nov 2024 15:49:20 GMT  
Copyright © 2014 OpenSS7 Corporation All Rights Reserved.