RANAP协议解析设计 - 图文(3)

2019-08-31 11:50

Variable-Length Parameter Format

0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Parameter Tag | Parameter Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ \\ \\ / Parameter Value / \\ \\ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Parameter Tag

Common parameters used by adaptation layers are in the range of 0x00 to 0x3f. M3UA-specific parameters have Tags in the range 0x0200 to 0x02ff. The parameter Tags defined are as follows:

Common Parameters:

Parameter Name Parameter ID ============== ============ Reserved 0x0000 Not Used in M3UA 0x0001 Not Used in M3UA 0x0002 Not Used in M3UA 0x0003 INFO String 0x0004 Not Used in M3UA 0x0005 Routing Context 0x0006 Diagnostic Information 0x0007 Not Used in M3UA 0x0008 Heartbeat Data 0x0009 Not Used in M3UA 0x000a Traffic Mode Type 0x000b Error Code 0x000c Status 0x000d Not Used in M3UA 0x000e Not Used in M3UA 0x000f Not Used in M3UA 0x0010 ASP Identifier 0x0011 Affected Point Code 0x0012 Correlation ID 0x0013

M3UA-Specific parameters:

Parameter Name Parameter ID ============== ============ Network Appearance 0x0200 Reserved 0x0201 Reserved 0x0202 Reserved 0x0203 User/Cause 0x0204 Congestion Indications 0x0205 Concerned Destination 0x0206 Routing Key 0x0207 Registration Result 0x0208 Deregistration Result 0x0209 Local Routing Key Identifier 0x020a Destination Point Code 0x020b Service Indicators 0x020c Reserved 0x020d Originating Point Code List 0x020e Reserved 0x020f Protocol Data 0x0210 Reserved 0x0211 Registration Status 0x0212 Deregistration Status 0x0213

Reserved by the IETF 0x0214 to 0xffff

Parameter Length

The Parameter Length field contains the size of the parameter in octets, including the Parameter Tag, Parameter Length, and Parameter Value fields. Parameter Value

The Parameter Value field contains the actual information to be transferred in the parameter. The total length of a parameter (including Tag, Parameter Length, and Value fields) MUST be a multiple of 4 octets. If the length of the parameter is not a multiple of 4 octets, the sender pads the Parameter at the end (i.e., after the Parameter Value field) with all zero octets. The length of the padding is NOT included in the parameter length field. A sender MUST NOT pad with more than 3 octets. The receiver MUST ignore the padding octets.

Transfer Messages

The following describes the Transfer messages and parameter contents.

Payload Data Message (DATA)

The DATA message contains the following variable-length parameters:

Network Appearance Optional (固定长度4Bytes) Routing Context Conditional(固定长度4Bytes) Protocol Data Mandatory(可变长度) Correlation Id Optional(固定长度4Bytes) The following format MUST be used for the Data Message:

0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Tag = 0x0200 | Length = 8 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Network Appearance | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Tag = 0x0006 | Length = 8 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Routing Context | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Tag = 0x0210 | Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ \\ \\ / Protocol Data / \\ \\ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Tag = 0x0013 | Length = 8 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Correlation Id | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Network Appearance Routing Context Protocol Data

The Protocol Data parameter contains the following fields:

Service Indicator Network Indicator Message Priority

Destination Point Code Originating Point Code

Signalling Link Selection Code (SLS) User Protocol Data, which includes

MTP3-User protocol elements (e.g., ISUP, SCCP, or TUP parameters) The Protocol Data parameter is encoded as follows:

0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Originating Point Code | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Destination Point Code | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | SI | NI | MP | SLS | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ \\ \\ / User Protocol Data / \\ \\ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Correlation Id 程序设计思路

首先定义M3uaHeader结构体,包含Common Message Header的所有字段和一个指向Parameter Tag的指针。

分别定义NetworkAppearance、RoutingContext、ProtocolData和CorrelationId结构体。根据Parameter Tag的值来对应填充相应的结构体。提取相应

的结构体字段以备后续使用。

ProtocolData结构体的定义除了包含Protocol Data parameter所有字段还需要定义一个指向用户协议数据的指针。

5. SCCP(Signalling Connection Control Part)

SCCP消息组成

A SCCP message consists of the following parts: – The message type code; –The mandatory fixed part; –The mandatory variable part;

–The optional part, which may contain fixed length and variable length fields.


RANAP协议解析设计 - 图文(3).doc 将本文的Word文档下载到电脑 下载失败或者文档不完整,请联系客服人员解决!

下一篇:10汽修《汽车故障》授课计划

相关阅读
本类排行
× 注册会员免费下载(下载后可以自由复制和排版)

马上注册会员

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: