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/lmi.h



#ifndef __LMI_H__
#define __LMI_H__

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

#define LMI_PROTO_BASE		  16L

#define LMI_DSTR_FIRST		( 1L + LMI_PROTO_BASE )
#define LMI_INFO_REQ		( 1L + LMI_PROTO_BASE )
#define LMI_ATTACH_REQ		( 2L + LMI_PROTO_BASE )
#define LMI_DETACH_REQ		( 3L + LMI_PROTO_BASE )
#define LMI_ENABLE_REQ		( 4L + LMI_PROTO_BASE )
#define LMI_DISABLE_REQ		( 5L + LMI_PROTO_BASE )
#define LMI_OPTMGMT_REQ		( 6L + LMI_PROTO_BASE )
#define LMI_DSTR_LAST		( 6L + LMI_PROTO_BASE )

#define LMI_USTR_LAST		(-1L - LMI_PROTO_BASE )
#define LMI_INFO_ACK		(-1L - LMI_PROTO_BASE )
#define LMI_OK_ACK		(-2L - LMI_PROTO_BASE )
#define LMI_ERROR_ACK		(-3L - LMI_PROTO_BASE )
#define LMI_ENABLE_CON		(-4L - LMI_PROTO_BASE )
#define LMI_DISABLE_CON		(-5L - LMI_PROTO_BASE )
#define LMI_OPTMGMT_ACK		(-6L - LMI_PROTO_BASE )
#define LMI_ERROR_IND		(-7L - LMI_PROTO_BASE )
#define LMI_STATS_IND		(-8L - LMI_PROTO_BASE )
#define LMI_EVENT_IND		(-9L - LMI_PROTO_BASE )
#define LMI_USTR_FIRST		(-9L - LMI_PROTO_BASE )

#define LMI_UNATTACHED		1L
#define LMI_ATTACH_PENDING	2L
#define LMI_UNUSABLE		3L
#define LMI_DISABLED		4L
#define LMI_ENABLE_PENDING	5L
#define LMI_ENABLED		6L
#define LMI_DISABLE_PENDING	7L
#define LMI_DETACH_PENDING	8L

#define LMI_UNSPEC		0x00000000
#define LMI_BADADDRESS		0x00010000
#define LMI_BADADDRTYPE		0x00020000
#define LMI_BADDIAL		0x00030000
#define LMI_BADDIALTYPE		0x00040000
#define LMI_BADDISPOSAL		0x00050000
#define LMI_BADFRAME		0x00060000
#define LMI_BADPPA		0x00070000
#define LMI_BADPRIM		0x00080000
#define LMI_DISC		0x00090000
#define LMI_EVENT		0x000a0000
#define LMI_FATALERR		0x000b0000
#define LMI_INITFAILED		0x000c0000
#define LMI_NOTSUPP		0x000d0000
#define LMI_OUTSTATE		0x000e0000
#define LMI_PROTOSHORT		0x000f0000
#define LMI_SYSERR		0x00100000
#define LMI_WRITEFAIL		0x00110000
#define LMI_CRCERR		0x00120000
#define LMI_DLE_EOT		0x00130000
#define LMI_FORMAT		0x00140000
#define LMI_HDLC_ABORT		0x00150000
#define LMI_OVERRUN		0x00160000
#define LMI_TOOSHORT		0x00170000
#define LMI_INCOMPLETE		0x00180000
#define LMI_BUSY		0x00190000
#define LMI_NOANSWER		0x001a0000
#define LMI_CALLREJECT		0x001b0000
#define LMI_HDLC_IDLE		0x001c0000
#define LMI_HDLC_NOTIDLE	0x001d0000
#define LMI_QUIESCENT		0x001e0000
#define LMI_RESUMED		0x001f0000
#define LMI_DSRTIMEOUT		0x00200000
#define LMI_LAN_COLLISIONS	0x00210000
#define LMI_LAN_REFUSED		0x00220000
#define LMI_LAN_NOSTATION	0x00230000
#define LMI_LOSTCTS		0x00240000
#define LMI_DEVERR		0x00250000

typedef signed int lmi_long;
typedef unsigned int lmi_ulong;
typedef unsigned short lmi_ushort;
typedef unsigned char lmi_uchar;

typedef struct {
	lmi_long lmi_primitive;
} lmi_info_req_t;

typedef struct {
	lmi_long lmi_primitive;
	lmi_ulong lmi_version;
	lmi_ulong lmi_state;
	lmi_ulong lmi_max_sdu;
	lmi_ulong lmi_min_sdu;
	lmi_ulong lmi_header_len;
	lmi_ulong lmi_ppa_style;
	lmi_ulong lmi_ppa_length;
	lmi_ulong lmi_ppa_offset;
	lmi_ulong lmi_prov_flags;
	lmi_ulong lmi_prov_state;
	lmi_uchar lmi_ppa_addr[0];
} lmi_info_ack_t;

#define LMI_VERSION_1	    1
#define LMI_VERSION_2	    2
#define LMI_CURRENT_VERSION LMI_VERSION_2

#define LMI_STYLE1	0x00
#define LMI_STYLE2	0x01

typedef struct {
	lmi_long lmi_primitive;
	lmi_ulong lmi_ppa_length;
	lmi_ulong lmi_ppa_offset;
	lmi_uchar lmi_ppa[0];
} lmi_attach_req_t;

typedef struct {
	lmi_long lmi_primitive;
} lmi_detach_req_t;

typedef struct {
	lmi_long lmi_primitive;
	lmi_ulong lmi_rem_length;
	lmi_ulong lmi_rem_offset;
	lmi_uchar lmi_rem[0];
} lmi_enable_req_t;

typedef struct {
	lmi_long lmi_primitive;
} lmi_disable_req_t;

typedef struct {
	lmi_long lmi_primitive;
	lmi_long lmi_correct_primitive;
	lmi_ulong lmi_state;
} lmi_ok_ack_t;

typedef struct {
	lmi_long lmi_primitive;
	lmi_ulong lmi_errno;
	lmi_ulong lmi_reason;
	lmi_long lmi_error_primitive;
	lmi_ulong lmi_state;
} lmi_error_ack_t;

typedef struct {
	lmi_long lmi_primitive;
	lmi_ulong lmi_state;
} lmi_enable_con_t;

typedef struct {
	lmi_long lmi_primitive;
	lmi_ulong lmi_state;
} lmi_disable_con_t;

typedef struct {
	lmi_long lmi_primitive;
	lmi_ulong lmi_opt_length;
	lmi_ulong lmi_opt_offset;
	lmi_ulong lmi_mgmt_flags;
} lmi_optmgmt_req_t;

typedef struct {
	lmi_long lmi_primitive;
	lmi_ulong lmi_opt_length;
	lmi_ulong lmi_opt_offset;
	lmi_ulong lmi_mgmt_flags;
} lmi_optmgmt_ack_t;

#undef LMI_DEFAULT

#define LMI_NEGOTIATE		0x0004
#define LMI_CHECK		0x0008
#define LMI_DEFAULT		0x0010
#define LMI_SUCCESS		0x0020
#define LMI_FAILURE		0x0040
#define LMI_CURRENT		0x0080
#define LMI_PARTSUCCESS		0x0100
#define LMI_READONLY		0x0200
#define LMI_NOTSUPPORT		0x0400

typedef struct {
	lmi_long lmi_primitive;
	lmi_ulong lmi_errno;
	lmi_ulong lmi_reason;
	lmi_ulong lmi_state;
} lmi_error_ind_t;

typedef struct {
	lmi_long lmi_primitive;
	lmi_ulong lmi_interval;
	lmi_ulong lmi_timestamp;
} lmi_stats_ind_t;

typedef struct {
	lmi_long lmi_primitive;
	lmi_ulong lmi_objectid;
	lmi_ulong lmi_timestamp;
	lmi_ulong lmi_severity;
} lmi_event_ind_t;

union LMI_primitive {
	lmi_long lmi_primitive;
	lmi_ok_ack_t ok_ack;
	lmi_error_ack_t error_ack;
	lmi_error_ind_t error_ind;
	lmi_stats_ind_t stats_ind;
	lmi_event_ind_t event_ind;
};

union LMI_primitives {
	lmi_long lmi_primitive;
	lmi_info_req_t info_req;
	lmi_info_ack_t info_ack;
	lmi_attach_req_t attach_req;
	lmi_detach_req_t detach_req;
	lmi_enable_req_t enable_req;
	lmi_disable_req_t disable_req;
	lmi_ok_ack_t ok_ack;
	lmi_error_ack_t error_ack;
	lmi_enable_con_t enable_con;
	lmi_disable_con_t disable_con;
	lmi_error_ind_t error_ind;
	lmi_stats_ind_t stats_ind;
	lmi_event_ind_t event_ind;
};

#define LMI_INFO_REQ_SIZE	sizeof(lmi_info_req_t)
#define LMI_INFO_ACK_SIZE	sizeof(lmi_info_ack_t)
#define LMI_ATTACH_REQ_SIZE	sizeof(lmi_attach_req_t)
#define LMI_DETACH_REQ_SIZE	sizeof(lmi_detach_req_t)
#define LMI_ENABLE_REQ_SIZE	sizeof(lmi_enable_req_t)
#define LMI_DISABLE_REQ_SIZE	sizeof(lmi_disable_req_t)
#define LMI_OK_ACK_SIZE		sizeof(lmi_ok_ack_t)
#define LMI_ERROR_ACK_SIZE	sizeof(lmi_error_ack_t)
#define LMI_ENABLE_CON_SIZE	sizeof(lmi_enable_con_t)
#define LMI_DISABLE_CON_SIZE	sizeof(lmi_disable_con_t)
#define LMI_ERROR_IND_SIZE	sizeof(lmi_error_ind_t)
#define LMI_STATS_IND_SIZE	sizeof(lmi_stats_ind_t)
#define LMI_EVENT_IND_SIZE	sizeof(lmi_event_ind_t)

typedef struct lmi_opthdr {
	lmi_ulong level;
	lmi_ulong name;
	lmi_ulong length;
	lmi_ulong status;
	lmi_uchar value[0];

} lmi_opthdr_t;

#define LMI_LEVEL_COMMON	'\0'
#define LMI_LEVEL_SDL		'd'
#define LMI_LEVEL_SDT		't'
#define LMI_LEVEL_SL		'l'
#define LMI_LEVEL_SLS		's'
#define LMI_LEVEL_MTP		'M'
#define LMI_LEVEL_SCCP		'S'
#define LMI_LEVEL_ISUP		'I'
#define LMI_LEVEL_TCAP		'T'

#define LMI_OPT_PROTOCOL	1
#define LMI_OPT_STATISTICS	2

#endif

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