Network Working Group                                           K. Zhang
Request for Comments: 3423                                      E. Elkin
Category: Informational                               XACCT Technologies
                                                           November 2002
        
Network Working Group                                           K. Zhang
Request for Comments: 3423                                      E. Elkin
Category: Informational                               XACCT Technologies
                                                           November 2002
        

XACCT's Common Reliable Accounting for Network Element (CRANE) Protocol Specification Version 1.0

XACCT的网元(起重机)通用可靠计费协议规范1.0版

Status of this Memo

本备忘录的状况

This memo provides information for the Internet community. It does not specify an Internet standard of any kind. Distribution of this memo is unlimited.

本备忘录为互联网社区提供信息。它没有规定任何类型的互联网标准。本备忘录的分发不受限制。

Copyright Notice

版权公告

Copyright (C) The Internet Society (2002). All Rights Reserved.

版权所有(C)互联网协会(2002年)。版权所有。

Abstract

摘要

This document defines the Common Reliable Accounting for Network Element (CRANE) protocol that enables efficient and reliable delivery of any data, mainly accounting data from Network Elements to any systems, such as mediation systems and Business Support Systems (BSS)/ Operations Support Systems (OSS). The protocol is developed to address the critical needs for exporting high volume of accounting data from NE's with efficient use of network, storage, and processing resources.

本文档定义了通用可靠的网元计费(CRANE)协议,该协议能够高效可靠地传递任何数据,主要是从网元到任何系统的计费数据,如中介系统和业务支持系统(BSS)/运营支持系统(OSS)。开发该协议是为了满足从网元导出大量记帐数据的关键需求,并有效利用网络、存储和处理资源。

This document specifies the architecture of the protocol and the message format, which MUST be supported by all CRANE protocol implementations.

本文件规定了协议的体系结构和消息格式,所有CRANE协议实现都必须支持该体系结构和消息格式。

Table of Contents

目录

   1  Introduction...................................................2
      1.1  Specification of Requirements.............................3
      1.2  Terminology...............................................3
   2  Protocol Overview..............................................5
      2.1  CRANE Architecture........................................6
      2.2  CRANE over TCP............................................7
      2.3  Alternate servers.........................................7
      2.4  Templates.................................................9
      2.5  Template Transmission and Negotiation....................10
      2.6  Changing Templates.......................................11
      2.7  Flow Control.............................................12
      2.8  The CRANE Client Query Messages..........................13
        
   1  Introduction...................................................2
      1.1  Specification of Requirements.............................3
      1.2  Terminology...............................................3
   2  Protocol Overview..............................................5
      2.1  CRANE Architecture........................................6
      2.2  CRANE over TCP............................................7
      2.3  Alternate servers.........................................7
      2.4  Templates.................................................9
      2.5  Template Transmission and Negotiation....................10
      2.6  Changing Templates.......................................11
      2.7  Flow Control.............................................12
      2.8  The CRANE Client Query Messages..........................13
        
      2.9  CRANE Sessions...........................................13
   3  CRANE Message Format..........................................14
   4  CRANE Messages................................................16
      4.1  Flow Start (START).......................................16
      4.2  Flow Start Acknowledge (START ACK).......................16
      4.3  Flow Stop (STOP).........................................17
      4.4  Flow Stop Acknowledge (STOP ACK).........................17
      4.5  Connect (CONNECT)........................................18
      4.6  Template Data (TMPL DATA)................................18
      4.7  Template Data Acknowledge (TMPL DATA ACK)................23
      4.8  Final Template Data (FINAL TMPL DATA)....................25
      4.9  Final Template Data Acknowledge (FINAL TMPL DATA ACK)....26
      4.10  Get Sessions (GET SESS).................................26
      4.11  Get Sessions Response (GET SESS RSP)....................27
      4.12  Get Templates (GET TMPL)................................30
      4.13  Get Templates Response(GET TMPL RSP)....................30
      4.14  Start Negotiation (START NEGOTIATE).....................33
      4.15  Start Negotiation Acknowledge (START NEGOTIATE ACK).....34
      4.16  Data (DATA).............................................34
      4.17  Data Acknowledge (DATA ACK).............................36
      4.18  Error (ERROR)...........................................37
      4.19  Status Request (STATUS REQ).............................38
      4.20  Status Response (STATUS RSP)............................38
   5  Protocol Version Negotiation..................................39
   6  Security Considerations.......................................42
   7  References....................................................43
   8  Acknowledgments...............................................43
   9  Authors' Addresses............................................44
   10 Full Copyright Statement......................................45
        
      2.9  CRANE Sessions...........................................13
   3  CRANE Message Format..........................................14
   4  CRANE Messages................................................16
      4.1  Flow Start (START).......................................16
      4.2  Flow Start Acknowledge (START ACK).......................16
      4.3  Flow Stop (STOP).........................................17
      4.4  Flow Stop Acknowledge (STOP ACK).........................17
      4.5  Connect (CONNECT)........................................18
      4.6  Template Data (TMPL DATA)................................18
      4.7  Template Data Acknowledge (TMPL DATA ACK)................23
      4.8  Final Template Data (FINAL TMPL DATA)....................25
      4.9  Final Template Data Acknowledge (FINAL TMPL DATA ACK)....26
      4.10  Get Sessions (GET SESS).................................26
      4.11  Get Sessions Response (GET SESS RSP)....................27
      4.12  Get Templates (GET TMPL)................................30
      4.13  Get Templates Response(GET TMPL RSP)....................30
      4.14  Start Negotiation (START NEGOTIATE).....................33
      4.15  Start Negotiation Acknowledge (START NEGOTIATE ACK).....34
      4.16  Data (DATA).............................................34
      4.17  Data Acknowledge (DATA ACK).............................36
      4.18  Error (ERROR)...........................................37
      4.19  Status Request (STATUS REQ).............................38
      4.20  Status Response (STATUS RSP)............................38
   5  Protocol Version Negotiation..................................39
   6  Security Considerations.......................................42
   7  References....................................................43
   8  Acknowledgments...............................................43
   9  Authors' Addresses............................................44
   10 Full Copyright Statement......................................45
        

1 Introduction

1导言

Network Elements are often required to export usage information to mediation and business support systems (BSS) to facilitate accounting. Though there are several existing mechanisms for usage information export, they are becoming inadequate to support the evolving business requirements from service providers.

通常需要网络元素将使用情况信息导出到中介和业务支持系统(BSS)以方便记帐。尽管有几种现有的使用信息导出机制,但它们已不足以支持服务提供商不断变化的业务需求。

For example, some of the export mechanisms are legacies of the Telco world. Typically usage information is stored in Network Elements as Log files (e.g., CDR files), and exported to external systems in batches. These are reliable methods, however, they do not meet the real-time and high-performance requirements of today's rapidly evolving data networks.

例如,一些出口机制是电信世界的遗产。通常,使用信息作为日志文件(例如CDR文件)存储在网络元素中,并批量导出到外部系统。这些都是可靠的方法,但是,它们不能满足当今快速发展的数据网络的实时性和高性能要求。

RADIUS [1] is a widely deployed protocol that may be used for exporting usage information. However, it can only handle a few outstanding requests and is not extensible due to its limited command

RADIUS[1]是一种广泛部署的协议,可用于导出使用情况信息。但是,它只能处理少数未完成的请求,并且由于其命令有限而无法扩展

and attribute address space. RADIUS also does not support unsolicited messages from a server to a client. A detailed analysis of limitations of RADIUS can be found in [3].

和属性地址空间。RADIUS也不支持从服务器到客户端的未经请求的消息。关于半径限制的详细分析见[3]。

DIAMETER [2] is a new AAA protocol that retains the basic RADIUS model, and eliminates several drawbacks in RADIUS. The current DIAMETER protocol and its extensions focus on Internet and wireless network access, and their support to accounting is closely associated with authentication/authorization events. DIAMETER is intended to solve many problems in the AAA area; by doing so, it does not adequately address some critical issues such as efficiency and performance in an accounting protocol.

DIAMETER[2]是一个新的AAA协议,它保留了基本的RADIUS模型,并消除了RADIUS中的一些缺点。当前的DIAMETER协议及其扩展侧重于Internet和无线网络访问,它们对记帐的支持与身份验证/授权事件密切相关。直径旨在解决AAA地区的许多问题;这样做并不能充分解决一些关键问题,例如会计协议中的效率和性能。

There are also SNMP based mechanisms that generally require a large amount of processing and bandwidth resources.

还有一些基于SNMP的机制通常需要大量的处理和带宽资源。

Based on the above analysis, a critical need for a reliable, fast, efficient and flexible accounting protocol exists. The XACCT's CRANE protocol is designed to address these critical requirements.

基于上述分析,迫切需要一种可靠、快速、高效和灵活的记帐协议。XACCT的CRANE协议旨在满足这些关键需求。

This document defines the CRANE protocol that enables efficient and reliable delivery of any data, mainly accounting data from Network Elements to any systems, such as mediation systems and BSS/OSS. The protocol is developed to address the critical needs for exporting high volume of accounting data from NE's with efficient use of network, storage, and processing resources.

本文档定义了CRANE协议,该协议能够高效、可靠地将任何数据(主要是从网络元素到任何系统(如中介系统和BSS/OSS)的记帐数据)交付。开发该协议是为了满足从网元导出大量记帐数据的关键需求,并有效利用网络、存储和处理资源。

This document specifies the architecture of the protocol and the message format, which MUST be supported by all CRANE protocol implementations.

本文件规定了协议的体系结构和消息格式,所有CRANE协议实现都必须支持该体系结构和消息格式。

1.1 Specification of Requirements
1.1 需求说明

In this document, the keywords "MUST", "MUST NOT", "SHOULD", "SHOULD NOT", and "MAY" are to be interpreted as described in BCP 14 [5]. These keywords are not case sensitive in this document.

在本文件中,关键字“必须”、“不得”、“应该”、“不应该”和“可能”的解释如BCP 14[5]所述。在本文档中,这些关键字不区分大小写。

1.2 Terminology
1.2 术语

CRANE Protocol

起重机协议

CRANE stands for Common Reliable Accounting for Network Element. The CRANE Protocol maybe referred as CRANE, or the Protocol in this document. The CRANE Protocol is used at the interface(s) between a CRANE client and one or multiple CRANE servers for the purpose of delivering accounting data.

CRANE代表网元的通用可靠计费。起重机协议可称为起重机,或本文件中的协议。CRANE协议用于CRANE客户端和一个或多个CRANE服务器之间的接口,用于传递会计数据。

Client or CRANE Client

客户或起重机客户

A CRANE Client is an implementation on the data producing side of the CRANE protocol. It is typically integrated with the network element's software, enabling it to collect and send out accounting data to a mediation/billing system using the protocol defined herein.

CRANE客户端是CRANE协议数据生成端的一个实现。它通常与网元的软件集成,使其能够使用本文定义的协议收集和向中介/计费系统发送记帐数据。

Server or CRANE Server

服务器或起重机服务器

A CRANE Server is an implementation on the data receiving side of the CRANE protocol. It is typically part of a Business Support System (BSS) (e.g., Billing, Market Analysis, Fraud detection, etc.), or a mediation system. There could be more than one CRANE server connected to one CRANE client to improve robustness of the usage information export system.

CRANE服务器是CRANE协议数据接收端的实现。它通常是业务支持系统(BSS)(例如计费、市场分析、欺诈检测等)或调解系统的一部分。可以有多个CRANE服务器连接到一个CRANE客户端,以提高使用信息导出系统的健壮性。

CRANE Session

起重机会议

A CRANE Session is a logical connection between a CRANE client and one or multiple CRANE servers for the purpose of delivering accounting data. Multiple sessions MAY be maintained concurrently in a CRANE client or a CRANE server; they are distinguished by Session IDs.

CRANE会话是CRANE客户端和一个或多个CRANE服务器之间的逻辑连接,用于传递记帐数据。可以在CRANE客户端或CRANE服务器中同时维护多个会话;它们通过会话ID进行区分。

Server Priority

服务器优先级

A CRANE server is assigned with a Priority value. Accounting data is always delivered to the perceived operating CRANE server (from the CRANE client point of view) with the highest Priority value (the primary server) within a CRANE Session.

为起重机服务器分配了一个优先级值。在CRANE会话中,记帐数据始终以最高优先级值(主服务器)传递到感知的运行CRANE服务器(从CRANE客户端的角度)。

Message

消息

A Message is encoded according to rules specified by the CRANE protocol and transmitted across the interface between a CRANE client and a CRANE server. It contains a common CRANE header and optionally control or user data payload.

消息根据CRANE协议指定的规则进行编码,并通过CRANE客户端和CRANE服务器之间的接口进行传输。它包含一个通用起重机收割台和可选的控制或用户数据有效载荷。

Data Record

数据记录

A Data Record is a collection of information gathered by the Network Element for various purposes, e.g., accounting. The structure of a Data Record is defined by a Template.

数据记录是网元为各种目的(如会计)收集的信息的集合。数据记录的结构由模板定义。

Template

样板

A Template defines the structure of any types of Data Record, and specifies the data type, meaning, and location of the fields in the record.

模板定义任何类型数据记录的结构,并指定记录中字段的数据类型、含义和位置。

Data Sequence Number (DSN)

数据序列号(DSN)

An accounting Data Record level sequence number, which is attached to all data messages to facilitate reliable and in-sequence delivery.

一种会计数据记录级序列号,附在所有数据电文上,以便于可靠和按顺序传递。

2 Protocol Overview

2协议概述

The CRANE protocol is designed to deliver accounting data reliably, efficiently, and quickly. Due to the nature of accounting data, large records often need to be transmitted; thus supporting fragmentation of large records is required. Furthermore, the value associated with accounting data is high; to prevent data loss, quick detection of unresponsive CRANE servers is also required for added robustness.

CRANE协议旨在可靠、高效和快速地提供会计数据。由于会计数据的性质,经常需要传输大型记录;因此,需要支持大型记录的碎片化。此外,与会计数据相关的价值较高;为了防止数据丢失,还需要快速检测无响应的CRANE服务器,以增强健壮性。

The CRANE protocol can be viewed as an application that uses the data transport service provided by lower layer protocols. It relies on a transport layer protocol to deliver reliable, in-sequence data packets.

CRANE协议可以看作是一个应用程序,它使用较低层协议提供的数据传输服务。它依靠传输层协议来提供可靠的、按顺序的数据包。

UDP is a simple connectionless transport layer protocol that has advantages of being fast and agile, but it provides no reliability and lacks flow control mechanisms. Hence, The CRANE protocol must not use UDP as the transport layer protocol to avoid the risk of adversely impacting the networks it is being run over.

UDP是一种简单的无连接传输层协议,具有快速和灵活的优点,但它不提供可靠性,并且缺乏流量控制机制。因此,CRANE协议不得将UDP用作传输层协议,以避免对正在运行的网络产生不利影响的风险。

TCP and SCTP [4] are two transport layer protocols that fulfill the reliability requirement of CRANE. Either one of them MAY be used to transport CRANE messages. TCP meets some of the requirements, but not all (e.g., quick detection of server failure, the fact that TCP is stream oriented and not record oriented). Therefore, SCTP [4] is the preferred way to transmit CRANE messages.

TCP和SCTP[4]是满足起重机可靠性要求的两种传输层协议。其中任何一个都可用于传输起重机信息。TCP满足部分要求,但不是全部要求(例如,快速检测服务器故障,事实上TCP是面向流的,而不是面向记录的)。因此,SCTP[4]是传输起重机信息的首选方式。

2.1 CRANE Architecture
2.1 起重机建筑

The CRANE protocol is an application running over a reliable transport layer protocol. The transport layer protocol is responsible for delivering CRANE messages between CRANE clients and CRANE servers. It MUST support the following capabilities:

CRANE协议是在可靠传输层协议上运行的应用程序。传输层协议负责在CRANE客户端和CRANE服务器之间传递CRANE消息。它必须支持以下功能:

1. Reliable, in-sequence message delivery. 2. Connection oriented. 3. Delivery of messages with a length of up to 2^32 octets (i.e., the transport layer has to support fragmentation of messages when running over IP).

1. 可靠、按顺序传递消息。2.面向连接。3.传递长度高达2^32个八位字节的消息(即,传输层在IP上运行时必须支持消息分段)。

The transport layer MAY support:

传输层可以支持:

1. Authentication. 2. Bundling of multiple messages into a single datagram.

1. 认证。2.将多条消息捆绑到单个数据报中。

Possible transport layer protocols MAY be TCP or SCTP [4]. TCP supports the minimal requirements for CRANE, but lacks some desirable capabilities that are available in SCTP, these include:

可能的传输层协议可以是TCP或SCTP[4]。TCP支持起重机的最低要求,但缺少SCTP中可用的一些理想功能,包括:

1. Session level authentication. 2. Message based data delivery (as opposed to stream based). 3. Fast connection failure detection.

1. 会话级身份验证。2.基于消息的数据传递(与基于流的相反)。3.快速连接故障检测。

Reliable delivery of accounting data is achieved through both the transport layer level and the CRANE protocol level. The transport layer acknowledgments are used to ensure quick detection of lost data packets and unresponsive servers, while the CRANE protocol acknowledges CRANE messages after they have been processed and the accounting information has been placed in persistent storage.

通过传输层级别和CRANE协议级别实现会计数据的可靠交付。传输层确认用于确保快速检测丢失的数据包和无响应的服务器,而CRANE协议在处理CRANE消息并将记帐信息放入持久存储后确认CRANE消息。

Being a reliable protocol for delivering accounting data, traffic flowing from a CRANE client to a CRANE server is mostly accounting data. There are also bi-directional control message exchanges, though they only comprise of small portion of the traffic.

作为传递记帐数据的可靠协议,从CRANE客户端到CRANE服务器的流量主要是记帐数据。也有双向控制消息交换,尽管它们只包含一小部分流量。

The following diagram illustrates the CRANE protocol architecture:

下图说明了CRANE协议体系结构:

       +----------------+             +----------------+
       |    CRANE       |             |     CRANE      |+
       |    User        |             |     User       ||+
       +----------------+             +----------------+||
       |    CRANE       | ==========> |     CRANE      |+|
       |    Client      | <---------- |     Server     ||+
       +----------------+             +----------------+||
       |  Transport     |             |   Transport    |+|
       |    Layer       | <---------> |     Layer      ||+
       +----------------+             +----------------+||
       |    Lower       |             |     Lower      |+|
       |    Layers      | <---------> |     Layers     ||+
       +----------------+             +----------------+||
                                       +----------------+|
                                        +----------------+
        
       +----------------+             +----------------+
       |    CRANE       |             |     CRANE      |+
       |    User        |             |     User       ||+
       +----------------+             +----------------+||
       |    CRANE       | ==========> |     CRANE      |+|
       |    Client      | <---------- |     Server     ||+
       +----------------+             +----------------+||
       |  Transport     |             |   Transport    |+|
       |    Layer       | <---------> |     Layer      ||+
       +----------------+             +----------------+||
       |    Lower       |             |     Lower      |+|
       |    Layers      | <---------> |     Layers     ||+
       +----------------+             +----------------+||
                                       +----------------+|
                                        +----------------+
        
2.2 CRANE over TCP
2.2 TCP上的起重机

TCP can be used as a transport layer for the CRANE protocol. CRANE running over TCP MUST conform to the following rules:

TCP可用作CRANE协议的传输层。在TCP上运行的起重机必须符合以下规则:

1. The CRANE client MUST accept TCP connections over a specific TCP port. 2. The CRANE server MUST connect to the CRANE client, and SHOULD be responsible for reestablishing a connection in case of a failure. 3. CRANE messages are written as a stream of bytes into a TCP connection, the size of a CRANE message is specified by the Message Length field in the CRANE message header.

1. CRANE客户端必须通过特定的TCP端口接受TCP连接。2.CRANE服务器必须连接到CRANE客户端,并应负责在出现故障时重新建立连接。3.CRANE消息作为字节流写入TCP连接,CRANE消息的大小由CRANE消息头中的message Length字段指定。

2.3 Alternate servers
2.3 备用服务器

For purposes of improved reliability and robustness, redundant CRANE server configuration MAY be employed. The CRANE protocol supports delivering accounting data to alternate CRANE servers, which may be part of a mediation system or a BSS.

为了提高可靠性和鲁棒性,可采用冗余起重机服务器配置。CRANE协议支持将记帐数据传送到备用CRANE服务器,这些服务器可能是中介系统或BSS的一部分。

A CRANE session may comprise of one or more CRANE servers. The CRANE client is responsible for configuring network addresses of all CRANE servers belonging to the session. A Server Priority is assigned to each CRANE server. The Server Priority reflects the CRANE client's preference regarding which CRANE server should receive accounting data. The assignment of the Server Priority should consider factors such as geographical distance, communication cost, and CRANE server loading, etc. It is also possible for several CRANE servers to have the same priority. In this case, the CRANE client could randomly choose one of them as the primary server to deliver accounting data.

起重机会话可包括一个或多个起重机服务器。CRANE客户端负责配置属于会话的所有CRANE服务器的网络地址。为每个起重机服务器分配服务器优先级。服务器优先级反映了CRANE客户端关于哪个CRANE服务器应该接收记帐数据的偏好。服务器优先级的分配应考虑诸如地理距离、通信成本和起重机服务器加载等因素。也可以使多台起重机服务器具有相同的优先级。在这种情况下,CRANE客户端可以随机选择其中一个作为主要服务器来传递记帐数据。

Additional features such as load balancing may be implemented in a multi-server environment. The process of configuring CRANE client is carried out using the NE's configuration system and is outside the scope of this document.

可以在多服务器环境中实现负载平衡等附加功能。配置CRANE客户端的过程使用网元的配置系统执行,不在本文档的范围内。

A CRANE client MUST deliver accounting data to its perceived operating CRANE server with the highest priority; if this CRANE server is deemed unreachable, the CRANE client MUST deliver the accounting data to the next highest priority CRANE server that is perceived to be operating. If no perceived operating CRANE servers are available, accounting data MUST be queued in the CRANE client until any CRANE server is available or the client's queue space runs out. An alarm should be generated to inform the CRANE user of the queue overflow condition.

CRANE客户端必须以最高优先级向其感知的运行CRANE服务器交付会计数据;如果认为无法访问此CRANE服务器,则CRANE客户端必须将记帐数据传递给下一个被认为正在运行的优先级最高的CRANE服务器。如果没有可用的可感知运行的CRANE服务器,则必须在CRANE客户端中对记帐数据进行排队,直到任何CRANE服务器可用或客户端的队列空间用完为止。应发出警报,通知起重机用户队列溢出情况。

Accounting data delivery SHOULD revert to the higher priority server when it is perceived to be operating again.

当认为记帐数据传送再次运行时,应将其恢复到优先级较高的服务器。

The CRANE protocol does not specify how a CRANE client should redirect accounting data to other CRANE servers, which is considered an implementation issue. But all the supporting mechanisms are provided by the protocol to work in a multiple-server environment (e.g., the template negotiation process, and configuration procedures, etc.). The transport layer (together with some other means) is responsible for monitoring server's responsiveness and notifying CRANE protocol for any failures. The client may choose to transition to an alternate server.

CRANE协议没有指定CRANE客户端如何将记帐数据重定向到其他CRANE服务器,这被认为是一个实现问题。但是,协议提供了所有支持机制,以便在多服务器环境中工作(例如,模板协商过程和配置过程等)。传输层(以及其他一些方法)负责监控服务器的响应,并通知CRANE协议任何故障。客户端可以选择转换到备用服务器。

Implementation Note:

实施说明:

The transition to an alternate CRANE server is an implementation issue and should occur under the following conditions:

转换到备用CRANE服务器是一个实施问题,应在以下条件下进行:

A) Transport layer notifies the CRANE client that the corresponding port of the CRANE server is unresponsive.

A) 传输层通知CRANE客户端CRANE服务器的相应端口没有响应。

B) Total size of unacknowledged accounting records has exceeded a threshold (configurable) for certain duration (configurable).

B) 未确认会计记录的总大小在特定持续时间(可配置)内超过阈值(可配置)。

C) A STOP message is received from the active server.

C) 从活动服务器接收到停止消息。

D) A lower priority server is the active one and a higher priority server has recovered.

D) 优先级较低的服务器是活动服务器,而优先级较高的服务器已恢复。

2.4 Templates
2.4 模板

The CRANE protocol enables efficient delivery of accounting data. This is achieved by negotiating a set of Data Templates for a CRANE session before actual accounting data is delivered. A data template defines the structure of a DATA message payload by describing the data type, meaning, and location of the fields in the payload. By agreeing on session templates, CRANE servers understand how to process DATA messages received from a CRANE client. As a result, a CRANE client only needs to deliver actual accounting data without attaching any descriptors of the data; this reduces the amount of bytes sent over communication links.

CRANE协议可实现会计数据的高效交付。这是通过在交付实际会计数据之前协商起重机会话的一组数据模板来实现的。数据模板通过描述有效负载中字段的数据类型、含义和位置来定义数据消息有效负载的结构。通过商定会话模板,CRANE服务器了解如何处理从CRANE客户端接收的数据消息。因此,CRANE客户只需交付实际的会计数据,无需附加任何数据描述符;这减少了通过通信链路发送的字节数。

A template is an ordered list of keys. A key is the specification of a field in the template. It specifies an accounting item that a network element MAY collect and export. The specification MUST consist of the description and the data type of the accounting item. (e.g., 'Number of Sent Bytes' can be a key that is an unsigned integer of 32 bit long). A CRANE client typically defines keys.

模板是键的有序列表。键是模板中字段的规范。它指定网元可以收集和导出的记帐项目。规范必须包括会计项目的说明和数据类型。(例如,“发送字节数”可以是32位无符号整数的键)。CRANE客户端通常定义键。

The CRANE protocol supports usage of several templates concurrently (for different accounting records). Keys contained in a template could be enabled or disabled. An enabled key implies that the outgoing data record will contain the data item specified by the key. A disabled key implies that the outgoing record will omit the specified data item. The enabling/disabling mechanism further reduces bandwidth requirement; it could also reduce processing in network elements, as only needed data items are produced.

CRANE协议支持同时使用多个模板(用于不同的会计记录)。可以启用或禁用模板中包含的密钥。启用的键意味着传出数据记录将包含该键指定的数据项。禁用的键表示传出记录将忽略指定的数据项。启用/禁用机制进一步降低了带宽需求;它还可以减少网络元素中的处理,因为只生成所需的数据项。

In a CRANE session, all the CRANE servers and the CRANE client MUST use the same set of templates and associated enable/disable status. The templates' configuration and connectivity to an end application MUST be the same in all servers. The CRANE client MUST publish the relevant templates to all CRANE servers in a session through user configuration, before it starts to send data according to the templates.

在CRANE会话中,所有CRANE服务器和CRANE客户端必须使用相同的模板集和相关的启用/禁用状态。在所有服务器中,模板的配置和与最终应用程序的连接必须相同。CRANE客户端必须在开始根据模板发送数据之前,通过用户配置将相关模板发布到会话中的所有CRANE服务器。

The complete set of templates residing in a CRANE client MUST bear a configuration ID that identifies the template set. Each data record is delivered with the Template ID and the Configuration ID, so that the correct template can be referenced. A server, when receiving a record with an older Configuration ID, MAY handle the record gracefully by keeping some template history. The transport layer should ensure that a server would not get messages with future configuration IDs.

CRANE客户端中的整套模板必须具有标识模板集的配置ID。每个数据记录都带有模板ID和配置ID,以便可以引用正确的模板。服务器在接收具有较旧配置ID的记录时,可以通过保留一些模板历史记录来优雅地处理该记录。传输层应确保服务器不会获取具有未来配置ID的消息。

2.5 Template Transmission and Negotiation
2.5 模板传输与协商

As stated before, all CRANE servers MUST use the same set of templates in a CRANE session. In case that servers do not share the same set of templates (the templates are considered different if different keys are enabled or disabled), a negotiation process between the client and the server would ultimately determine one set of templates that is accepted and used by all the CRANE servers in a session.

如前所述,所有CRANE服务器必须在CRANE会话中使用相同的模板集。如果服务器不共享同一组模板(如果启用或禁用不同的密钥,则认为模板不同),客户端和服务器之间的协商过程将最终确定一组模板,该模板由会话中的所有CRANE服务器接受和使用。

After a CRANE session is established and the server sent a START message indicating that it is ready to take part in the session, the client MUST deliver the set of templates that it intends to use by sending a TMPL DATA message to the server. The CRANE server MUST acknowledge the reception of the set of templates.

CRANE会话建立后,服务器发送一条开始消息,指示它已准备好参与会话,客户端必须通过向服务器发送TMPL数据消息来交付它打算使用的模板集。CRANE服务器必须确认接收到模板集。

Templates are negotiable between a CRANE client and CRANE servers. A CRANE server may propose changes to the templates received from a CRANE client (e.g., enabling some keys and disabling others), or it can acknowledge the templates as is. In the case that a template or a key is not recognized by the server (e.g., they might be added to the client after the server configuration has completed), the server MAY choose to disable each unknown key or unknown templates in order to avoid unnecessary traffic. A template is disabled when all the keys are disabled. If changes were received from the CRANE servers, the client will send the changed template set to all connected servers (using FINAL_TMPL_DATA message). It is the client's responsibility to decide what would be the final set of templates used by a session. At this time, each CRANE server MUST accept and acknowledge the templates without changing anything (to avoid deadlock and loop conditions). Each CRANE server is given a single chance to propose any changes during the negotiation process.

模板可以在CRANE客户端和CRANE服务器之间协商。CRANE服务器可以建议对从CRANE客户端接收的模板进行更改(例如,启用某些密钥并禁用其他密钥),也可以按原样确认模板。如果服务器无法识别模板或密钥(例如,它们可能在服务器配置完成后添加到客户端),服务器可以选择禁用每个未知密钥或未知模板,以避免不必要的通信量。禁用所有键时,模板将被禁用。如果从CRANE服务器接收到更改,客户端将向所有连接的服务器发送更改的模板集(使用最终的\u TMPL\u数据消息)。客户有责任决定会话使用的最终模板集。此时,每个CRANE服务器必须在不更改任何内容的情况下接受和确认模板(以避免死锁和循环条件)。每个CRANE服务器都有一次机会在协商过程中提出任何更改。

The template negotiation process is outlined as follows:

模板谈判流程概述如下:

A) CRANE client sends a TMPL DATA message with a set of templates.

A) CRANE客户端发送带有一组模板的TMPL数据消息。

B) CRANE server either responds with the TMPL DATA ACK message with changes in the template set (process continues in step C) or responds with FINAL TMPL DATA ACK message if no changes are needed (process continues in step E).

B) CRANE服务器要么使用TMPL数据确认消息响应模板集的更改(流程在步骤C中继续),要么在不需要更改的情况下使用最终TMPL数据确认消息响应(流程在步骤E中继续)。

C) CRANE client receives proposed changes, incorporates them if possible and then sends a FINAL TMPL DATA message containing the new set of templates to all servers (in order to deploy the change).

C) CRANE客户端接收建议的更改,如果可能,将其合并,然后向所有服务器发送包含新模板集的最终TMPL数据消息(以便部署更改)。

D) CRANE server receives the FINAL TMPL DATA message containing the new set of templates and MUST send a FINAL TMPL DATA ACK message to

D) CRANE服务器接收包含新模板集的最终TMPL数据消息,并且必须向发送最终TMPL数据确认消息

acknowledge the reception of the templates. No changes are allowed at this stage and the templates, which the client sent, are going to be used.

确认收到模板。在此阶段不允许更改,并且将使用客户端发送的模板。

E) CRANE client receives a FINAL TMPL DATA ACK message from the server and can assume that the server knows which templates to use.

E) CRANE客户端从服务器接收最终的TMPL数据确认消息,并且可以假设服务器知道要使用哪些模板。

All these stages take place only when there are multiple CRANE servers with differences in the template set (e.g., not all key states are identical). If all CRANE servers within a session share the same configuration exactly, all servers will respond with FINAL TMPL DATA ACK and the ping-pong between the client and the servers will end immediately. This is the common case, but in case some other CRANE servers have a different configuration, the protocol offers the way to maintain consistency among CRANE servers.

所有这些阶段仅在多台CRANE服务器的模板集存在差异时发生(例如,并非所有关键状态都相同)。如果会话中的所有CRANE服务器完全共享相同的配置,则所有服务器将使用最终TMPL数据ACK进行响应,并且客户端和服务器之间的乒乓将立即结束。这是常见的情况,但如果其他一些CRANE服务器具有不同的配置,则该协议提供了保持CRANE服务器之间一致性的方法。

Implementation Note:

实施说明:

TMPL DATA messages SHOULD be sent only after all DATA messages with the previous configuration have been acknowledged. This ensures the server to transition properly to the new configuration.

TMPL数据消息应仅在确认具有先前配置的所有数据消息后发送。这可确保服务器正确转换到新配置。

2.6 Changing Templates
2.6 更改模板

Though TMPL DATA messages allow for deploying and publicizing template, a need to configure the template set still exists. Each of the CRANE servers in a CRANE session may change the template set, which is typically requested by an end-user through User Interface. If the end-users need to know what templates are available and the current template set status, they may issue the GET TMPL message.

尽管TMPL数据消息允许部署和公布模板,但仍然需要配置模板集。CRANE会话中的每个CRANE服务器都可以更改模板集,这通常是由最终用户通过用户界面请求的。如果最终用户需要知道哪些模板可用以及当前模板集状态,他们可能会发出GET TMPL消息。

The following steps are performed in order to change the templates:

执行以下步骤以更改模板:

A) The server MUST retrieve from CRANE client the template set that requires change by issuing GET TMPL message. The server can issue a GET TMPL even if it has not yet issued a START message.

A) 服务器必须通过发出GET TMPL消息从CRANE客户端检索需要更改的模板集。即使尚未发出开始消息,服务器也可以发出GET TMPL。

B) After received a GET TMPL message, the client sends back a GET TMPL RSP message with the requested data.

B) 在收到GET TMPL消息后,客户机将返回一条GET TMPL RSP消息和请求的数据。

C) The server makes the necessary changes to the templates and sends back a START NEGOTIATION message. This message triggers the CRANE client to inquire about changes made by the CRANE server.

C) 服务器对模板进行必要的更改,并发回开始协商消息。此消息触发CRANE客户端查询CRANE服务器所做的更改。

D) After received a START NEGOTIATE message, the client MUST respond with START NEGOTIATE ACK message followed by a TMPL DATA message. From this point on, the template negotiation process starts.

D) 在收到启动协商消息后,客户机必须使用启动协商确认消息和TMPL数据消息进行响应。从这一点开始,模板协商过程开始。

2.7 Flow Control
2.7 流量控制

After templates have been deployed, DATA messages start to arrive at the primary CRANE server (the operational one with the highest priority within the CRANE session). Each DATA message contains a Data Sequence Number (DSN). The primary CRANE server MUST accept the data as long as it is in-sequence. Out-of-sequence DATA messages should be discarded.

部署模板后,数据消息开始到达主CRANE服务器(CRANE会话中优先级最高的运行服务器)。每个数据消息都包含一个数据序列号(DSN)。只要数据按顺序排列,主CRANE服务器就必须接受该数据。应丢弃顺序错误的数据消息。

The CRANE server detects the start of accounting data when it receives the first DATA message either after startup or after a server transition. The first DATA message MUST have the 'S' bit ('DSN Synchronize' bit) set by the CRANE client. Upon reception of the message with initial DSN, the server MUST accept all in-sequence DATA messages. The DSN MUST be incremented by 1 for each new DATA message originated from the client.

CRANE服务器在启动后或服务器转换后收到第一条数据消息时,会检测到记帐数据的启动。第一条数据消息必须由CRANE客户端设置“S”位(“DSN同步”位)。在收到带有初始DSN的消息后,服务器必须接受所有按顺序发送的数据消息。对于来自客户端的每个新数据消息,DSN必须增加1。

A CRANE server MUST acknowledge the reception and correct processing of DATA messages by sending DATA ACK messages. The DATA ACK MUST contain the DSN of the last processed in-sequence DATA message. If the CRANE server receives an Out Of Sequence DATA message, it MUST also send a DATA ACK message. It will trigger an immediate retransmission of unacknowledged records.

起重机服务器必须通过发送数据确认消息来确认数据消息的接收和正确处理。数据确认必须包含最后一个按顺序处理的数据消息的DSN。如果起重机服务器接收到顺序错误的数据消息,则还必须发送数据确认消息。它将立即触发未确认记录的重新传输。

The CRANE client is responsible for delivering all the records. In the case of a redundant server configuration, there could be a scenario when one server does not receive all the records but another redundant CRANE server for the same mediation system receives the rest of the records. For example, server #1 could receive records 3042-3095 and then 3123-..., with server #2 receiving records 3096- 3122. It is the sender's responsibility to deliver all the records, in-sequence, but not necessarily to the same server.

起重机客户负责交付所有记录。在冗余服务器配置的情况下,可能存在这样一种情况:一台服务器不接收所有记录,但同一调解系统的另一台冗余CRANE服务器接收其余记录。例如,服务器1可以接收记录3042-3095,然后接收记录3123-…,而服务器2可以接收记录3096-3122。发送方负责按顺序传递所有记录,但不一定要传递到同一台服务器。

The billing/mediation system eventually receives all the records, possibly through more than one CRANE server. The CRANE client MUST convey all the records it received to the billing/mediation system. This MAY result in duplicate records in the billing/mediation system. In this case, the DSN MUST be used to remove duplicates. To aid the process of duplicate removal, whenever a record is re-sent to another server, its 'Duplicate' bit MUST be set to suggest that this record might be a duplicate.

计费/调解系统最终可能通过多个CRANE服务器接收所有记录。CRANE客户端必须将其收到的所有记录传送到计费/调解系统。这可能导致账单/调解系统中出现重复记录。在这种情况下,必须使用DSN删除重复项。为了帮助删除重复的过程,每当记录被重新发送到另一台服务器时,必须将其“重复”位设置为表明该记录可能是重复的。

Implementation Note:

实施说明:

When the amount of unacknowledged records reaches a threshold, a timer should be started. When the timer expires, all the unacknowledged records should be transmitted to an alternate

当未确认记录的数量达到阈值时,应启动计时器。当计时器过期时,所有未确认的记录都应传输到备用服务器

server with 'D' bit set in the DATA message; if alternate servers are not available, the records should be retransmitted.

数据消息中设置了“D”位的服务器;如果备用服务器不可用,则应重新传输记录。

The CRANE flow control also supports redundant server configuration. A server MUST send a START message in order to move to the 'ready' state. In the 'ready' state, the server can receive and process CRANE messages. To leave the 'ready' state and stop the message flows from the client, the server should send a STOP message to the client.

起重机流量控制还支持冗余服务器配置。服务器必须发送开始消息才能移动到“就绪”状态。在“就绪”状态下,服务器可以接收和处理CRANE消息。要离开“就绪”状态并停止来自客户端的消息流,服务器应向客户端发送停止消息。

2.8 The CRANE Client Query Messages
2.8 CRANE客户端查询消息

A CRANE server may query a CRANE client's status by sending query messages after it has established a session with the client. A CRANE client that is connected to the server MUST respond with response messages. All the Query Messages MUST be initiated by a CRANE server. The CRANE protocol defines three such Query Message pairs, they are:

CRANE服务器可以在与客户端建立会话后通过发送查询消息来查询CRANE客户端的状态。连接到服务器的CRANE客户端必须使用响应消息进行响应。所有查询消息必须由CRANE服务器启动。CRANE协议定义了三个这样的查询消息对,它们是:

Get Session (GET SESS) Get Session Response (GET SESS RSP)

获取会话(获取SESS)获取会话响应(获取SESS RSP)

Get Template (GET TMPL) Get Template Response (GET TMPL RSP)

获取模板(gettmpl)获取模板响应(gettmplrsp)

Status Request (STATUS REQ) Status Response (STATUS RSP)

状态请求(状态请求)状态响应(状态RSP)

All the query messages incorporate a Request ID field for tagging purposes and matching requests and responses. This field contains a 16 bit counter incremented with every request and is set by the initiator of the request. Along with the CRANE server's IP address and port number, this constitutes a unique identifier for a request. This value MUST be copied to Request ID field in the response message in order to associate a specific response with a request.

所有查询消息都包含一个请求ID字段,用于标记以及匹配请求和响应。此字段包含一个随每个请求递增的16位计数器,由请求的发起人设置。这与CRANE服务器的IP地址和端口号一起构成请求的唯一标识符。必须将此值复制到响应消息中的请求ID字段,以便将特定响应与请求关联。

The CRANE client SHOULD collect and send out meta-data about the data collected (counters, statistics, etc.). This is done by creating status templates, which are treated like any other template, with the exception that these templates are marked with a /'Status' bit. Status templates are used with the set of STATUS REQ and STATUS RSP messages. A server MAY issue a STATUS REQ to a CRANE client and receive a STATUS RSP message with the requested data.

CRANE客户端应收集并发送有关所收集数据的元数据(计数器、统计数据等)。这是通过创建状态模板来完成的,状态模板与任何其他模板一样处理,但这些模板用/'status'位标记。状态模板用于一组状态请求和状态RSP消息。服务器可以向CRANE客户端发出状态REQ,并接收带有请求数据的状态RSP消息。

2.9 CRANE Sessions
2.9 起重机会议

A CRANE client MAY deliver accounting data to different mediation/billing systems by establishing different CRANE sessions.

CRANE客户端可以通过建立不同的CRANE会话向不同的中介/计费系统交付会计数据。

Each session MAY consist of several CRANE servers in a redundant configuration. The session ID imbedded in all the CRANE messages enables the correct association of CRANE sessions with CRANE users. All the CRANE processes (e.g., template negotiation, configuration, flow control, etc.) should be carried out in the same way in a multi session scenario.

每个会话可能由多个冗余配置的CRANE服务器组成。嵌入在所有CRANE消息中的会话ID可以使CRANE会话与CRANE用户正确关联。所有起重机流程(例如,模板协商、配置、流程控制等)应在多会话场景中以相同的方式执行。

Each session has its set of templates (these may be the same templates, but the keys could be enabled or disabled differently). The sessions are configured in the NE, each with a different session name with associated Session IDs. The session ID is carried in each message to associate the message with a specific session.

每个会话都有一组模板(这些模板可能是相同的,但密钥的启用或禁用方式可能不同)。会话在网元中配置,每个会话都具有不同的会话名称和关联的会话ID。会话ID在每条消息中携带,以将消息与特定会话关联。

A CRANE server MAY take part in different sessions. When configuring a server, it needs to know the sessions in which it participates. The server can issue a GET SESS message to receive a list of relevant sessions.

CRANE服务器可以参与不同的会话。在配置服务器时,它需要知道它参与的会话。服务器可以发出GET SESS消息以接收相关会话的列表。

3 CRANE Message Format

3起重机信息格式

A summary of the CRANE protocol message format is shown below. A CRANE message consists of an 8 octet message header; it is followed by a variable length message payload that is aligned to 32 bit boundary. Some of the messages do not have the CRANE Message Payload part. The fields are in network byte order and transmitted from left to right.

CRANE协议消息格式的摘要如下所示。CRANE消息由8个八位字节的消息头组成;它后面是与32位边界对齐的可变长度消息有效负载。有些信息没有起重机信息有效负载部分。字段按网络字节顺序从左向右传输。

       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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |  Version      |Message ID(MID)|  Session ID   | Message Flags |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                         Message Length                        |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                                                               |
      ~                    CRANE Message Payload                      ~
      |                                                               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        
       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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |  Version      |Message ID(MID)|  Session ID   | Message Flags |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                         Message Length                        |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                                                               |
      ~                    CRANE Message Payload                      ~
      |                                                               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        

Version: 8 bit unsigned integer

版本:8位无符号整数

The Version field indicates the supported CRANE protocol implementation. This field MUST be set to 1 to indicate the CRANE protocol Version 1.0. CRANE protocol Version 1.0 only supports Ipv4 addressing; however, it can be used to transfer information related to Ipv6 flows.

版本字段表示支持的CRANE协议实现。该字段必须设置为1,以指示起重机协议版本1.0。CRANE协议版本1.0仅支持Ipv4寻址;但是,它可以用于传输与Ipv6流相关的信息。

Message ID (MID): 8 bit unsigned integer

消息ID(MID):8位无符号整数

The Message ID field identifies the type of the message. The message IDs defined by CRANE Version 1 are:

消息ID字段标识消息的类型。CRANE版本1定义的消息ID为:

      Message Name               Short Name         Message ID
      ---------------------      ---------------    ------------
      Reserved                                         0x00
        
      Message Name               Short Name         Message ID
      ---------------------      ---------------    ------------
      Reserved                                         0x00
        

Flow Start START 0x01 Flow Start Acknowledge START ACK 0x02 Flow Stop STOP 0x03 Flow Stop Acknowledge STOP ACK 0x04 Connect CONNECT 0x05

流量启动启动0x01流量启动确认启动确认0x02流量停止停止0x03流量停止确认停止确认0x04连接0x05

Template Data TMPL DATA 0x10 Template Data Acknowledge TMPL DATA ACK 0x11 Final Template Data FINAL TMPL DATA 0x12 Final Template Data Ack. FINAL TMPL DATA ACK 0x13 Get Sessions GET SESS 0x14 Get Sessions Response GET SESS RSP 0x15 Get Template GET TMPL 0x16 Get Template Response GET TMPL RSP 0x17 Start Negotiation START NEGOTIATE 0x18 Start Negotiation Ack. START NEGOTIATE ACK 0x19

模板数据TMPL数据0x10模板数据确认TMPL数据确认0x11最终模板数据最终TMPL数据0x12最终模板数据确认。最终TMPL数据确认0x13获取会话获取SESS 0x14获取会话响应获取SESS RSP 0x15获取模板获取TMPL 0x16获取模板响应获取TMPL RSP 0x17开始协商开始协商0x18开始协商确认。开始协商确认0x19

Data DATA 0x20 Data Acknowledge DATA ACK 0x21 Error ERROR 0x23

数据数据0x20数据确认数据确认0x21错误0x23

Status Request STATUS REQ 0x30 Status Response STATUS RSP 0x31

状态请求状态请求0x30状态响应状态RSP 0x31

Session ID: 8 bit unsigned char

会话ID:8位无符号字符

The Session ID field identifies the session with which the message is associated. The session ID is ignored in the case of GET SESS and GET SESS RSP messages. More details about session can be found in Section 2.9.

会话ID字段标识与消息关联的会话。在GET SESS和GET SESS RSP消息的情况下,将忽略会话ID。有关会话的更多详细信息,请参见第2.9节。

Message Flags: 8 bit unsigned char

消息标志:8位无符号字符

The Message Flags field can be used to identify options associated with the message. For CRANE Version 1.0, all the flags are reserved; unless otherwise specified, the flags are set to zero on transmit and are ignored on receipt.

消息标志字段可用于标识与消息关联的选项。CRANE版本1.0保留所有标志;除非另有规定,否则标志在传输时设置为零,在接收时忽略。

Message Length: 32 bit unsigned integer

消息长度:32位无符号整数

The Message Length field is the total length of the CRANE message in octet including the header.

Message Length(消息长度)字段是CRANE消息的总长度,以八位字节为单位,包括标头。

4 CRANE Messages

4起重机信息

This section defines CRANE mandatory messages. They MUST be supported by any CRANE protocol implementation.

本节定义了起重机强制信息。它们必须得到任何CRANE协议实现的支持。

4.1 Flow Start (START)
4.1 流量启动(启动)

Description

描述

The Flow Start message is sent from a CRANE server to a CRANE client to indicate that the CRANE server is ready to receive CRANE messages.

流程启动消息从CRANE服务器发送到CRANE客户端,以指示CRANE服务器已准备好接收CRANE消息。

Message 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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |  Version      |  MID=0x01     | Session ID    | Message Flags |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                         Message Length                        |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        
       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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |  Version      |  MID=0x01     | Session ID    | Message Flags |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                         Message Length                        |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        
4.2 Flow Start Acknowledge (START ACK)
4.2 流量启动确认(启动确认)

Description

描述

The Flow Start Acknowledge message is sent by a CRANE client to acknowledge the reception of a START message from a specific CRANE server. It is sent only to that server to indicate that the client considers it ready to receive CRANE messages.

流程启动确认消息由CRANE客户端发送,以确认从特定CRANE服务器接收到启动消息。它只发送到该服务器,以表明客户端认为它已准备好接收CRANE消息。

Message 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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |  Version      |  MID=0x02     | Session ID    | Message Flags |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                         Message Length                        |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                        Client Boot Time                       |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        
       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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |  Version      |  MID=0x02     | Session ID    | Message Flags |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                         Message Length                        |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                        Client Boot Time                       |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        

Client Boot Time: 32 bit unsigned integer

客户端启动时间:32位无符号整数

The Client Boot Time field is the timestamp of the last client startup in seconds from 1970. This field can be combined with the DSN and the client's IP address to serve as a system wide unique record identifier.

客户端启动时间字段是自1970年以来最后一次客户端启动的时间戳(以秒为单位)。此字段可以与DSN和客户机的IP地址组合,用作系统范围内的唯一记录标识符。

4.3 Flow Stop (STOP)
4.3 流量停止(停止)

Description

描述

The Flow Stop message is sent from a CRANE server to a CRANE client to instruct it to stop sending data (to that server). The STOP message does not disconnect the server; it only stops the CRANE client from sending "DATA" messages.

流停止消息从CRANE服务器发送到CRANE客户端,以指示其停止(向该服务器)发送数据。停止消息不会断开服务器连接;它只会阻止CRANE客户端发送“数据”消息。

Message 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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |  Version      |  MID=0x03     | Session ID    | Message Flags |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                         Message Length                        |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        
       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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |  Version      |  MID=0x03     | Session ID    | Message Flags |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                         Message Length                        |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        
4.4 Flow Stop Acknowledge (STOP ACK)
4.4 流量停止确认(停止确认)

Description

描述

The Flow Stop Acknowledgement message acknowledges the STOP message issued by a CRANE server.

流量停止确认消息确认起重机服务器发出的停止消息。

Message 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
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |  Version      |  MID=0x04     | Session ID    | Message Flags |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |                         Message Length                        |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        
      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
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |  Version      |  MID=0x04     | Session ID    | Message Flags |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |                         Message Length                        |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        
4.5 Connect (CONNECT)
4.5 连接(连接)

Description

描述

The CONNECT message is sent from a CRANE server to a CRANE client to identify itself. The message MUST be the first message sent over a transport layer connection between the server and the client.

连接消息从CRANE服务器发送到CRANE客户端,以识别自身。该消息必须是通过服务器和客户端之间的传输层连接发送的第一条消息。

Message 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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |  Version      |  MID=0x05     | Session ID    | Message Flags |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                         Message Length                        |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                         Server Address                        |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |          Server Port          |           Reserved            |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        
       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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |  Version      |  MID=0x05     | Session ID    | Message Flags |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                         Message Length                        |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                         Server Address                        |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |          Server Port          |           Reserved            |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        

Server Address: 32 bit unsigned integer

服务器地址:32位无符号整数

The Server Address field is the server's IP address (IPV4).

服务器地址字段是服务器的IP地址(IPV4)。

Server Port: 16 bit unsigned integer

服务器端口:16位无符号整数

The Server Port field is the server's port number for the transport layer (the port number specified here doesn't necessarily have to match the port number used by the transport layer)

服务器端口字段是传输层的服务器端口号(此处指定的端口号不必与传输层使用的端口号匹配)

4.6 Template Data (TMPL DATA)
4.6 模板数据(TMPL数据)

Description

描述

A CRANE client sends the Template Data message to a CRANE server after a START or a START NEGOTIATE message was received from the server. The message MUST contain all the templates that are going to be used for the session. It SHOULD also include the template for the status records (See section 2.8)

在从服务器接收到启动或启动协商消息后,CRANE客户端将模板数据消息发送到CRANE服务器。消息必须包含会话将使用的所有模板。还应包括状态记录模板(见第2.8节)

The receiving CRANE server MUST acknowledge the message by sending either a TMPL DATA ACK (if template changes are needed) or a FINAL TMPL DATA ACK message. For more information, see section 2.5.

接收CRANE服务器必须通过发送TMPL数据确认(如果需要更改模板)或最终TMPL数据确认消息来确认消息。有关更多信息,请参见第2.5节。

Message 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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |  Version      |  MID=0x10     | Session ID    | Message Flags |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                         Message Length                        |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |   Config ID   |  Flags      |E|       Number of Templates     |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                                                               |
      ~                       Template Block                          ~
      |                                                               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                                                               |
      ~                       ...       ...                           ~
      |                                                               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                                                               |
      ~                       Template Block                          ~
      |                                                               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        
       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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |  Version      |  MID=0x10     | Session ID    | Message Flags |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                         Message Length                        |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |   Config ID   |  Flags      |E|       Number of Templates     |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                                                               |
      ~                       Template Block                          ~
      |                                                               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                                                               |
      ~                       ...       ...                           ~
      |                                                               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                                                               |
      ~                       Template Block                          ~
      |                                                               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        

Configuration ID (Config. ID): 8 bit unsigned char

配置ID(Config.ID):8位无符号字符

The Configuration ID field identifies the version number associated with a template set. Changes to any of the templates would result in a new template version, and the version number would be incremented by one. An implementation SHOULD handle rollovers of the version number.

配置ID字段标识与模板集关联的版本号。对任何模板的更改都会产生新的模板版本,并且版本号将增加1。实现应该处理版本号的滚动。

Flags: 8 bit unsigned char

标志:8位无符号字符

The Flags field identifies any options associated to the message.

Flags字段标识与消息关联的任何选项。

The flag defined by the CRANE Version 1 is:

起重机版本1定义的标志为:

The 'E' bit indicates the transmission order of the "DATA" messages. If the field is set to 1, data is in big endian format; otherwise, little endian format is used.

“E”位表示“数据”信息的传输顺序。如果字段设置为1,则数据为大端格式;否则,使用little endian格式。

Number of Templates: 16 bit unsigned integer

模板数:16位无符号整数

The Number of Templates field is the number of Templates (a template is described by a Template Block) specified by the message.

“模板数”字段是消息指定的模板数(模板由模板块描述)。

Template Block

模板块

The Template Block field is of variable length and aligned to 32 bit boundary. It is the specification of a template.

模板块字段长度可变,并与32位边界对齐。它是模板的规范。

Template Block 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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |        Template ID            |         Number of Keys        |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |      Template Flags         |T|      Description Length       |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                     Template Block Length                     |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                                                               |
      ~                         Description                           ~
      |                                                               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                                                               |
      ~                          Key Block                            ~
      |                                                               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                                                               |
      ~                       ...       ...                           ~
      |                                                               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                                                               |
      ~                          Key Block                            ~
      |                                                               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        
       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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |        Template ID            |         Number of Keys        |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |      Template Flags         |T|      Description Length       |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                     Template Block Length                     |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                                                               |
      ~                         Description                           ~
      |                                                               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                                                               |
      ~                          Key Block                            ~
      |                                                               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                                                               |
      ~                       ...       ...                           ~
      |                                                               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                                                               |
      ~                          Key Block                            ~
      |                                                               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        

Template ID: 16 bit unsigned integer

模板ID:16位无符号整数

The Template ID field identifies a specific template.

模板ID字段标识特定模板。

Number of Keys: 16 bit unsigned integer

键数:16位无符号整数

The Number of Keys field is the number of keys included in the template.

“关键帧数”字段是模板中包含的关键帧数。

Template Flags: 16 bit unsigned integer

模板标志:16位无符号整数

The Template Flags field is composed of flags that indicate different attributes of the template. In CRANE Version 1.0, only the 'T' bit is defined, other bits in the field SHOULD be set to zero by the sender and ignored by the receiver.

模板标志字段由指示模板不同属性的标志组成。在CRANE版本1.0中,仅定义了“T”位,发送方应将字段中的其他位设置为零,接收方应忽略。

The 'T' bit ('Status' bit) indicates that the template is a status template that is used by the STATUS RSP message only. See section 2.8 for more details.

“T”位(“状态”位)表示该模板是仅由状态RSP消息使用的状态模板。详见第2.8节。

Description Length: 16 bit unsigned integer

说明长度:16位无符号整数

The Description Length field is the length of the Description field. If no description is supplied, the length MUST be 0.

描述长度字段是描述字段的长度。如果未提供说明,则长度必须为0。

Template Block Length: 32 bit unsigned integer

模板块长度:32位无符号整数

The Template Block Length is the length of the template block in octets.

模板块长度是模板块的长度(以八位字节为单位)。

Description: Variable length unsigned char

描述:可变长度无符号字符

The Description field contains the text description of the template (e.g., "Aggregated by interface and ToS bits"). It is a variable length field of up to 64Kb long, and padded with 0 to the next 32 bit boundary.

描述字段包含模板的文本描述(例如,“通过接口和ToS位聚合”)。它是一个长度最多为64Kb的可变字段,并用0填充到下一个32位边界。

Key Block

键块

A key Block contains the specification of a key within a template.

密钥块包含模板中密钥的规范。

Key Block 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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                            Key ID                             |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |          Key Type ID          |            Reserved           |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                      Key Attribute Vector                   |K|
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        
       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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                            Key ID                             |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |          Key Type ID          |            Reserved           |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                      Key Attribute Vector                   |K|
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        

Key ID: 32 bit unsigned integer

密钥ID:32位无符号整数

The Key ID field identifies the key within a template. See section 2.4 for more details.

密钥ID字段标识模板中的密钥。详见第2.4节。

Key Type ID: 16 bit unsigned integer

密钥类型ID:16位无符号整数

The Key Type ID field specifies the data type of the key.

密钥类型ID字段指定密钥的数据类型。

The fixed length data types are defined as following:

固定长度数据类型定义如下:

               Data Type             Data Type ID
           ---------------------    --------------
            Boolean (1)                 0x0001
            Unsigned Integer8           0x0002
            Signed Integer8             0x0003
            Unsigned Integer16          0x0004
            Signed Integer16            0x0005
            Unsigned Integer32          0x0006
            Signed Integer32            0x0007
            Unsigned Integer64          0x0008
            Signed Integer64            0x0009
        
               Data Type             Data Type ID
           ---------------------    --------------
            Boolean (1)                 0x0001
            Unsigned Integer8           0x0002
            Signed Integer8             0x0003
            Unsigned Integer16          0x0004
            Signed Integer16            0x0005
            Unsigned Integer32          0x0006
            Signed Integer32            0x0007
            Unsigned Integer64          0x0008
            Signed Integer64            0x0009
        

Float (2) 0x000a Double (2) 0x000b

浮动(2)0x000a双(2)0x000b

IP address (Ipv4) 0x0010 IP address (Ipv6) 0x0011 Time_SEC (3) 0x0012 Time_MSEC_64(4) 0x0013 Time_USEC_64 (5) 0x0014 Time_MSEC_32 (6) 0x0015 Time_USEC_32 (7) 0x0016

IP地址(Ipv4)0x0010 IP地址(Ipv6)0x0011秒(3)0x0012秒(4)0x0013秒(5)0x0014秒(6)0x0015秒(7)0x0016

The variable length data types are defined as following:

可变长度数据类型定义如下:

String (8) 0x400c Null Terminated String 0x400d UTF-8 String 0x400e UTF-16 String 0x400f Arbitrary Data (BLOB) (9) 0x4015

字符串(8)0x400c空终止字符串0x400d UTF-8字符串0x400e UTF-16字符串0x400f任意数据(BLOB)(9)0x4015

(1) Boolean is represented as a single octet holding 0 for a value of FALSE and 1 for a value of TRUE.

(1) 布尔值表示为一个八位字节,值为FALSE时为0,值为TRUE时为1。

(2) Float and Double are single and double precision floating point numbers that comply with the IEEE-754 standard.

(2) Float和Double是符合IEEE-754标准的单精度和双精度浮点数。

(3) Time_SEC is a 32 bit value, most significant octet first - seconds since 00:00:00 GMT, January 1, 1970.

(3) Time_SEC是一个32位的值,是自1970年1月1日格林威治标准时间00:00:00以来最有效的八位字节第一秒。

(4) Time_MSEC_64 is a 64 bit value, most significant octet first - milliseconds since 00:00:00 GMT, January 1, 1970.

(4) Time_MSEC_64是一个64位值,是自1970年1月1日格林威治时间00:00:00以来最有效的八位组第一毫秒。

(5) Time_USEC_64 is a 64 bit value, most significant octet first - microseconds since 00:00:00 GMT, January 1, 1970.

(5) Time_USEC_64是一个64位值,是自1970年1月1日格林尼治标准时间00:00:00以来最重要的八位组第一微秒。

(6) Time_MSEC_32 is a 32 bit value, most significant octet first - milliseconds since 00:00:00 GMT, January 1, 1970.

(6) Time_MSEC_32是一个32位的值,是自1970年1月1日格林威治标准时间00:00:00起的最有效的八位字节第一毫秒。

(7) Time_USEC_32 is a 32 bit value, most significant octet first - microseconds since 00:00:00 GMT, January 1, 1970.

(7) Time_USEC_32是一个32位的值,是自1970年1月1日格林威治标准时间00:00:00以来最重要的八位元第一微秒。

(8) String is prefixed by a 32 bit length field that indicates the length of the string, and followed by ASCII codes of the string characters. This representation MUST only be used for encoding data records in a "DATA" message.

(8) 字符串的前缀是指示字符串长度的32位长度字段,后跟字符串字符的ASCII码。此表示只能用于对“数据”消息中的数据记录进行编码。

(9) The arbitrary data is prefixed by a 32 bit length field and followed by the data in binary format.

(9) 任意数据的前缀是32位长度的字段,后面是二进制格式的数据。

Key Attribute Vector: 32 bit unsigned integer

键属性向量:32位无符号整数

The Key Attribute Vector field indicates different attributes of the key. In CRANE Version 1, only the 'K' bit is defined, other bits in the field SHOULD be set to zero by the sender and ignored by the receiver.

键属性向量字段指示键的不同属性。在CRANE版本1中,仅定义了“K”位,发送方应将字段中的其他位设置为零,接收方应忽略。

The 'K' bit ('Disabled bit') is set to 1 when the key is disabled in this template.

在此模板中禁用密钥时,“K”位(“禁用位”)设置为1。

4.7 Template Data Acknowledge (TMPL DATA ACK)
4.7 模板数据确认(TMPL数据确认)

Description

描述

The Template Data Acknowledge message is sent from a CRANE server to a CRANE client after a TMPL DATA message has been received. It proposes changes of the templates and/or key status changes (enable/disable) for the templates.

收到TMPL数据消息后,模板数据确认消息从CRANE服务器发送到CRANE客户端。它建议更改模板和/或更改模板的关键状态(启用/禁用)。

If a CRANE server wishes to acknowledge reception of TMPL DATA without changes, it MUST respond with the FINAL TMPL DATA ACK message.

如果CRANE服务器希望确认接收到TMPL数据而不进行更改,则必须使用最终TMPL数据确认消息进行响应。

Message 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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |  Version      |  MID=0x11     | Session ID    | Message Flags |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                         Message Length                        |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |    Config. ID |    Reserved   |   Number of Template Changes  |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                                                               |
      ~                    Template Change Block                      ~
      |                                                               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                                                               |
      ~                       ...       ...                           ~
      |                                                               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                                                               |
      ~                    Template Change Block                      ~
      |                                                               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        
       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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |  Version      |  MID=0x11     | Session ID    | Message Flags |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                         Message Length                        |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |    Config. ID |    Reserved   |   Number of Template Changes  |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                                                               |
      ~                    Template Change Block                      ~
      |                                                               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                                                               |
      ~                       ...       ...                           ~
      |                                                               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                                                               |
      ~                    Template Change Block                      ~
      |                                                               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        

Configuration ID (Config. ID): 8 bit unsigned char

配置ID(Config.ID):8位无符号字符

See Section 4.6. The value MUST be identical to the Config. ID field of the acknowledged TMPL DATA message.

见第4.6节。该值必须与配置相同。已确认的TMPL数据消息的ID字段。

Number of Template Changes: 16 bit unsigned integer

模板更改数:16位无符号整数

The Number of Template Changes field is the number of changed Templates (a changed template is described by a Template Change Block) specified by the message.

模板更改数字段是消息指定的更改模板数(更改的模板由模板更改块描述)。

Template Change Block

模板更改块

       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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |        Template ID            |        Number of Keys         |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                                                               |
      ~                          Key Block                            ~
      |                                                               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                                                               |
      ~                       ...       ...                           ~
      |                                                               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                                                               |
      ~                          Key Block                            ~
      |                                                               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        
       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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |        Template ID            |        Number of Keys         |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                                                               |
      ~                          Key Block                            ~
      |                                                               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                                                               |
      ~                       ...       ...                           ~
      |                                                               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                                                               |
      ~                          Key Block                            ~
      |                                                               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        

Template ID: 16 bit unsigned integer

模板ID:16位无符号整数

See Section 4.6.

见第4.6节。

Number of Keys: 16 bit unsigned integer

键数:16位无符号整数

See Section 4.6.

见第4.6节。

Key Block

键块

See Section 4.6, only relevant keys are described.

参见第4.6节,仅描述了相关钥匙。

4.8 Final Template Data (FINAL TMPL DATA)
4.8 最终模板数据(最终TMPL数据)

Description

描述

The Final Template Data message is sent by a CRANE client to all the CRANE servers in a session, to convey the finalize templates. It is similar to the TMPL DATA message, with the only difference that a server must accept the templates in this message.

最终模板数据消息由CRANE客户端发送到会话中的所有CRANE服务器,以传递最终模板。它与TMPL数据消息类似,唯一的区别是服务器必须接受此消息中的模板。

Message Format

消息格式

Identical to the TMPL DATA (see section 4.6)

与TMPL数据相同(见第4.6节)

Message ID (MID)

消息ID(MID)

0x12 Final Template Data

0x12最终模板数据

4.9 Final Template Data Acknowledge (FINAL TMPL DATA ACK)
4.9 最终模板数据确认(最终TMPL数据确认)

Description

描述

The CRANE server acknowledges reception of the TMPL DATA or FINAL TMPL DATA by sending a Final Template Data Acknowledge message. It does not carry any changes to the templates. Unlike TMPL DATA ACK messages, a FINAL TMPL DATA ACK message indicates the acceptance of the templates for the session. A server MAY respond with this message to a TMPL DATA (if it does not want any changes in the templates). A server MUST respond with this message to a FINAL TMPL DATA.

CRANE服务器通过发送最终模板数据确认消息确认TMPL数据或最终TMPL数据的接收。它不会对模板进行任何更改。与TMPL数据确认消息不同,最终的TMPL数据确认消息表示接受会话模板。服务器可以使用此消息对TMPL数据进行响应(如果不希望模板中有任何更改)。服务器必须用此消息响应最终的TMPL数据。

Message 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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |  Version      |  MID=0x13     | Session ID    | Message Flags |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                         Message Length                        |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |   Config. ID  |                     Reserved                  |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        
       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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |  Version      |  MID=0x13     | Session ID    | Message Flags |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                         Message Length                        |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |   Config. ID  |                     Reserved                  |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        

Configuration ID: 8 bit unsigned char

配置ID:8位无符号字符

See Section 4.6. This field MUST copy the configuration ID from the acknowledged message.

见第4.6节。此字段必须从已确认的消息中复制配置ID。

4.10 Get Sessions (GET SESS)
4.10 获取会话(获取SES)

Description

描述

The Get Sessions message is sent by a CRANE server to a CRANE client to query what are the sessions it should participate. This is typically done just before a UI configuration of the CRANE client's templates. As each session has its own set of templates, there is a need to know the server's participation of all the sessions.

Get Sessions消息由CRANE服务器发送到CRANE客户端,以查询它应该参与哪些会话。这通常在CRANE客户端模板的UI配置之前完成。由于每个会话都有自己的模板集,因此需要了解服务器参与所有会话的情况。

The Session ID field in the CRANE message header MUST be ignored by the receiver.

接收方必须忽略CRANE消息头中的会话ID字段。

Message 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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |  Version      |  MID=0x14     | Session ID    | Message Flags |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                         Message Length                        |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |           Request ID          |        Reserved               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        
       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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |  Version      |  MID=0x14     | Session ID    | Message Flags |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                         Message Length                        |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |           Request ID          |        Reserved               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        

Request ID: 16 bit unsigned integer

请求ID:16位无符号整数

The Request ID field identifies the specific request issued by the server. The same Request ID MUST be placed in the responding message in order to associate it with the request.

请求ID字段标识服务器发出的特定请求。为了将响应消息与请求关联,必须在响应消息中放置相同的请求ID。

4.11 Get Sessions Response (GET SESS RSP)
4.11 获取会话响应(获取SESS RSP)

Description

描述

The Get Sessions Response message is sent by a CRANE client to a CRANE server as a reply to a GET SESS request. The message MUST contain all the information related to any session with which the requesting server is associated.

Get Sessions响应消息由CRANE客户端发送到CRANE服务器,作为对Get SESS请求的答复。消息必须包含与请求服务器关联的任何会话相关的所有信息。

The Session ID field in the common message header MUST be ignored by the receiver.

接收方必须忽略公共消息头中的会话ID字段。

Message 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
      --+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |  Version      |  MID=0x15     | Session ID    | Message Flags |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                         Message Length                        |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |           Request ID          |       Number of Sessions      |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |    Vendor String Length       |           Reserved            |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|
      |                                                               |
      ~                       Vendor String                           ~
      |                                                               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                                                               |
      ~                         Session Block                         ~
      |                                                               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                                                               |
      ~                       ...       ...                           ~
      |                                                               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                                                               |
      ~                         Session Block                         ~
      |                                                               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        
       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
      --+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |  Version      |  MID=0x15     | Session ID    | Message Flags |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                         Message Length                        |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |           Request ID          |       Number of Sessions      |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |    Vendor String Length       |           Reserved            |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|
      |                                                               |
      ~                       Vendor String                           ~
      |                                                               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                                                               |
      ~                         Session Block                         ~
      |                                                               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                                                               |
      ~                       ...       ...                           ~
      |                                                               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                                                               |
      ~                         Session Block                         ~
      |                                                               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        

Request ID: 16 bit unsigned integer

请求ID:16位无符号整数

See Section 4.10.

见第4.10节。

Number of Sessions: 16 bit unsigned integer

会话数:16位无符号整数

The Number of Sessions field is the number of session blocks in the message.

“会话数”字段是消息中会话块的数目。

Vendor String Length: 16 bit unsigned integer

供应商字符串长度:16位无符号整数

The Vendor String Length field is the length of Vendor String field in octet. The field limits vendor strings to 64Kb long. If no such string is supplied, the length MUST be set to 0.

供应商字符串长度字段是以八位字节为单位的供应商字符串字段的长度。该字段将供应商字符串的长度限制为64Kb。如果未提供此类字符串,则长度必须设置为0。

Vendor String: Variable length unsigned char

供应商字符串:可变长度无符号字符

The Vendor String field is a variable length field. It identifies the vendor that created the session. It MUST be padded with 0 to the next 32 bit boundary. The information differentiates similar templates from different vendors. The actual format of the information is application specific and outside the scope of this document.

供应商字符串字段是可变长度字段。它标识创建会话的供应商。它必须用0填充到下一个32位边界。该信息区分了不同供应商的类似模板。信息的实际格式是特定于应用程序的,不在本文件的范围内。

Session Block

会话块

       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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      | Session ID    |   Reserved    |      Session Name Length      |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |  Session Description Length   |             Reserved          |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                                                               |
      ~                          Session Name                         ~
      |                                                               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                                                               |
      ~                       Session Description                     ~
      |                                                               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        
       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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      | Session ID    |   Reserved    |      Session Name Length      |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |  Session Description Length   |             Reserved          |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                                                               |
      ~                          Session Name                         ~
      |                                                               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                                                               |
      ~                       Session Description                     ~
      |                                                               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        

Session ID: 8 bit unsigned char

会话ID:8位无符号字符

See Section 3.

见第3节。

Session Name Length: 16 bit unsigned integer

会话名称长度:16位无符号整数

The Session Name Length field is the length of the Session Name field. The field limits the session name strings to 64 Kb long. As a name is mandatory to differentiate between sessions, this field MUST NOT be 0.

会话名称长度字段是会话名称字段的长度。该字段将会话名称字符串的长度限制为64 Kb。由于名称是区分会话所必需的,因此此字段不能为0。

Session Description Length: 16 bit unsigned integer

会话描述长度:16位无符号整数

The Session Description Length field is the length of a session description. The field limits the session description to 64Kb long. If no such Description is supplied, the length MUST be set to 0.

会话描述长度字段是会话描述的长度。该字段将会话描述限制为64Kb长。如果未提供此类说明,则长度必须设置为0。

Session Name: Variable length unsigned char

会话名称:可变长度无符号字符

The Session Name field is the name for a session, which MAY be displayed to end-users. It MUST be padded with 0 to the next 32 bit boundary. Session Name MUST be unique within a CRANE client. This field is mandatory and MUST be a part of any Session Block.

会话名称字段是会话的名称,可以显示给最终用户。它必须用0填充到下一个32位边界。在CRANE客户端中,会话名称必须是唯一的。此字段是必填字段,必须是任何会话块的一部分。

Session Description: Variable length unsigned char

会话描述:可变长度无符号字符

The Session Description field is the text description of a session; it could be displayed to end-users. It MUST be padded with 0 to the next 32 bit boundary.

会话描述字段是会话的文本描述;它可以显示给最终用户。它必须用0填充到下一个32位边界。

4.12 Get Templates (GET TMPL)
4.12 获取模板(获取TMPL)

Description

描述

The Get Templates message is sent by a CRANE server to a CRANE client to query templates in a session.

获取模板消息由CRANE服务器发送到CRANE客户端,以在会话中查询模板。

Message 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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |  Version      |  MID=0x16     | Session ID    | Message Flags |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                         Message Length                        |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |           Request ID          |            Reserved           |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        
       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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |  Version      |  MID=0x16     | Session ID    | Message Flags |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                         Message Length                        |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |           Request ID          |            Reserved           |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        

Request ID: 16 bit unsigned integer

请求ID:16位无符号整数

See Section 4.10.

见第4.10节。

4.13 Get Templates Response (GET TMPL RSP)
4.13 获取模板响应(获取TMPL RSP)

Description

描述

The Get Templates Response message is sent by a CRANE client to a CRANE server as a response to a GET TMPL message. The message SHOULD contain all templates available for the specific session.

Get Templates响应消息由CRANE客户端发送到CRANE服务器,作为对Get TMPL消息的响应。消息应包含特定会话可用的所有模板。

Message 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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |  Version      |  MID=0x17     | Session ID    | Message Flags |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                         Message Length                        |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |           Request ID          |       Number of Templates     |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                                                               |
      ~                       Template Block                          ~
      |                                                               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                                                               |
      ~                       ...       ...                           ~
      |                                                               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                                                               |
      ~                       Template Block                          ~
      |                                                               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        
       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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |  Version      |  MID=0x17     | Session ID    | Message Flags |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                         Message Length                        |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |           Request ID          |       Number of Templates     |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                                                               |
      ~                       Template Block                          ~
      |                                                               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                                                               |
      ~                       ...       ...                           ~
      |                                                               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                                                               |
      ~                       Template Block                          ~
      |                                                               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        

Request ID: 16 bit unsigned integer

请求ID:16位无符号整数

See Section 4.10.

见第4.10节。

Number of Templates: 16 bit unsigned integer

模板数:16位无符号整数

See Section 4.6.

见第4.6节。

Template Block

模板块

Same as the template block defined in the TMPL DATA message (see Section 4.6). However, Extended Key Blocks MUST be used instead of Key Blocks. Extended key Block field provides extensive informational data that MAY be displayed to end-users.

与TMPL数据消息中定义的模板块相同(参见第4.6节)。但是,必须使用扩展密钥块而不是密钥块。扩展键块字段提供可显示给最终用户的广泛信息数据。

Extended Key Block

扩展密钥块

The Extended Key Block field provides comprehensive information about a key.

扩展密钥块字段提供有关密钥的全面信息。

Extended Key Block 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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                            Key ID                             |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |          Key Type ID          |        Key Name Length        |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |          Key Label Length     |        Key Help Length        |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                                                               |
      ~                            Key Name                           ~
      |                                                               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                                                               |
      ~                            Key Label                          ~
      |                                                               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                                                               |
      ~                            Key Help                           ~
      |                                                               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                      Key Attribute Vector                   |K|
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        
       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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                            Key ID                             |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |          Key Type ID          |        Key Name Length        |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |          Key Label Length     |        Key Help Length        |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                                                               |
      ~                            Key Name                           ~
      |                                                               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                                                               |
      ~                            Key Label                          ~
      |                                                               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                                                               |
      ~                            Key Help                           ~
      |                                                               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                      Key Attribute Vector                   |K|
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        

Key ID: 32 bit unsigned integer

密钥ID:32位无符号整数

Same as section 4.6.

与第4.6节相同。

Key Type ID: 16 bit unsigned integer

密钥类型ID:16位无符号整数

Same as section 4.6.

与第4.6节相同。

Key Name Length: 16 bit unsigned integer

密钥名称长度:16位无符号整数

The Key Name Length field is the length of the Key Name field. The field limits Key Name strings to 64 Kb long. As a name is mandatory to a key, this field MUST NOT be 0.

Key Name Length字段是Key Name字段的长度。该字段将键名字符串的长度限制为64 Kb。由于名称是键的必填项,因此此字段不能为0。

Key Label Length: 16 bit unsigned integer

键标签长度:16位无符号整数

The Key Label Length field is the length of the Key Label field. The field limits Key Label strings to 64 Kb long. Length of 0 means that the Label field is to be skipped.

“关键点标签长度”字段是关键点标签字段的长度。该字段将键标签字符串的长度限制为64 Kb。长度为0表示将跳过标签字段。

Key Help Length: 16 bit unsigned integer

键帮助长度:16位无符号整数

The Key Help Length field is the length of the Key Help field. The field limits Key Help strings to 64 Kb long. Length of 0 means that the Help field is to be skipped.

键帮助长度字段是键帮助字段的长度。该字段将键帮助字符串的长度限制为64 Kb。长度为0表示将跳过帮助字段。

Key Name: Variable length unsigned char

关键字名称:可变长度无符号字符

The Key Name field is the name for the key, which could be displayed to end users. It MUST be padded with 0 to the next 32 bit boundary. Key Name MUST be unique (within the template) and case sensitive. This field is mandatory and MUST be a part of any Extended Key Block.

密钥名称字段是密钥的名称,可以显示给最终用户。它必须用0填充到下一个32位边界。密钥名称必须是唯一的(在模板中)并且区分大小写。此字段是必填字段,必须是任何扩展密钥块的一部分。

Key Label: Variable length unsigned char

键标签:可变长度无符号字符

The Key Label field is a descriptive label, which could be displayed to end users concerning this key. It MUST be padded with 0 to the next 32 bit boundary. This field SHOULD be a part of any Extended Key Block.

密钥标签字段是一个描述性标签,可向最终用户显示该密钥。它必须用0填充到下一个32位边界。此字段应该是任何扩展密钥块的一部分。

Key Help: Variable length unsigned char

关键帮助:可变长度无符号字符

The Key Help field is any Help string that could be displayed to end users concerning this key. It MUST be padded with 0 to the next 32 bit boundary. This field MAY be a part of any Extended Key Block.

密钥帮助字段是可以显示给最终用户的与此密钥相关的任何帮助字符串。它必须用0填充到下一个32位边界。此字段可以是任何扩展密钥块的一部分。

Key Attribute Vector: 32 bit unsigned integer

键属性向量:32位无符号整数

Same as section 4.6.

与第4.6节相同。

4.14 Start Negotiation (START NEGOTIATE)
4.14 开始协商(开始协商)

Description

描述

The Start Negotiation message is sent by a CRANE server after the configuration process has completed. The message should initiate template negotiation by the client with all CRANE servers in a session. The CRANE server MAY re-send this message up to 3 times with repeat interval of 5 seconds unless it is acknowledged by the CRANE client. Otherwise, the CRANE user will be informed. The client should send TMPL DATA message to the servers after acknowledged the message.

配置过程完成后,起重机服务器将发送启动协商消息。该消息应启动客户端与会话中所有CRANE服务器的模板协商。除非CRANE客户端确认,否则CRANE服务器最多可重新发送此消息3次,重复间隔为5秒。否则,将通知起重机用户。客户端应在确认消息后向服务器发送TMPL数据消息。

Message 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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |  Version      |  MID=0x18     | Session ID    | Message Flags |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                         Message Length                        |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        
       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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |  Version      |  MID=0x18     | Session ID    | Message Flags |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                         Message Length                        |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        
4.15 Start Negotiation Acknowledge (START NEGOTIATE ACK)
4.15 开始协商确认(开始协商确认)

Description

描述

The Start Negotiation Acknowledge message MUST be sent by a CRANE client to the server to acknowledge the reception of the START NEGOTIATE message.

起重机客户端必须向服务器发送启动协商确认消息,以确认接收到启动协商消息。

Message 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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |  Version      |  MID=0x19     | Session ID    | Message Flags |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                         Message Length                        |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        
       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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |  Version      |  MID=0x19     | Session ID    | Message Flags |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                         Message Length                        |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        
4.16 Data (DATA)
4.16 数据(数据)

Description

描述

The DATA message carries actual data records from a CRANE client to a CRANE server. A data record is a structured collection of fields that matches a specific template.

数据消息将实际数据记录从CRANE客户端传送到CRANE服务器。数据记录是与特定模板匹配的字段的结构化集合。

Message 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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |  Version      |  MID=0x20     | Session ID    | Message Flags |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                         Message Length                        |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |        Template ID            |    Config. ID |  Flags    |D|S|
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                   Data Sequence Number (DSN)                  |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                                                               |
      ~                          Record Data                          ~
      |                                                               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        
       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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |  Version      |  MID=0x20     | Session ID    | Message Flags |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                         Message Length                        |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |        Template ID            |    Config. ID |  Flags    |D|S|
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                   Data Sequence Number (DSN)                  |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                                                               |
      ~                          Record Data                          ~
      |                                                               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        

Template ID: 16 bit unsigned integer

模板ID:16位无符号整数

See Section 4.6.

见第4.6节。

Configuration ID: 8 bit unsigned char

配置ID:8位无符号字符

See Section 4.6. The Config. ID field can prevent out-of-the-blue messages with outdated templates arriving and erroneously processed. A server MAY keep a short history of templates in order to cope with this scenario.

见第4.6节。配置。ID字段可以防止带有过时模板的突然消息到达并被错误处理。服务器可能会保留模板的简短历史记录,以应对这种情况。

Flags: 8 bit unsigned char

标志:8位无符号字符

The Flags field is composed of flag bits that indicate processing requirements of the data records. The CRANE Version 1 defined two flags for these purposes. Unless otherwise specified, the other flags are set to zero on transmit and are ignored on receipt.

标志字段由标志位组成,标志位指示数据记录的处理要求。CRANE版本1为此定义了两个标志。除非另有规定,否则其他标志在传输时设置为零,在接收时忽略。

The following flags are defined in CRANE Version 1:

起重机版本1中定义了以下标志:

The 'D' bit ('Duplicate' bit): It is set for records that are re-sent to an alternate server after a server transition occurs. When the same records are sent to different servers, there is a possibility that duplicated data exists. The Status of the 'D' bit will help the billing/mediation system to perform de-duplication if desired.

“D”位(“重复”位):为发生服务器转换后重新发送到备用服务器的记录设置。当相同的记录发送到不同的服务器时,可能存在重复数据。如果需要,“D”位的状态将有助于计费/调解系统执行重复数据消除。

The 'S' bit ('DSN Synchronize' bit): When set, it indicates that the record is the first one received by the server after starting (or restarting) of data transmission to this server. The server MUST set the initial DSN to the DSN specified in the record. The flag is set to zero by default.

“S”位(“DSN Synchronize”位):设置后,表示该记录是服务器启动(或重新启动)到此服务器的数据传输后收到的第一条记录。服务器必须将初始DSN设置为记录中指定的DSN。默认情况下,该标志设置为零。

Data Sequence Number: 32 bit unsigned integer

数据序列号:32位无符号整数

The Data Sequence Number field is the record sequence number used for preserving data orders and detecting data losses. The DSN MUST be incremented by one for each new record transmitted. The selection of the initial DSN number is implementation specific.

数据序列号字段是用于保存数据顺序和检测数据丢失的记录序列号。对于传输的每个新记录,DSN必须增加1。初始DSN编号的选择取决于具体实现。

Record Data: Variable Length unsigned octets

记录数据:可变长度无符号八位字节

The Record Data field carries the actual accounting/billing data that is structured according to the template identified by the Template ID field.

记录数据字段携带根据模板ID字段标识的模板构造的实际会计/账单数据。

4.17 Data Acknowledge (DATA ACK)
4.17 数据确认(数据确认)

Description

描述

The Data Acknowledgement message is sent from a CRANE server to acknowledge receipt of records. It acknowledges the maximal in-sequence DSN received.

数据确认消息从起重机服务器发送,以确认收到记录。它确认接收到的最大顺序DSN。

Message 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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |  Version      |  MID=0x21     | Session ID    | Message Flags |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                         Message Length                        |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                      Data Sequence Number                     |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |   Config. ID  |                  Reserved                     |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        
       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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |  Version      |  MID=0x21     | Session ID    | Message Flags |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                         Message Length                        |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                      Data Sequence Number                     |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |   Config. ID  |                  Reserved                     |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        

Data Sequence Number: 32 bit unsigned integer

数据序列号:32位无符号整数

See Section 4.16. It MUST be DSN of the last in-sequence record that was received by the server.

见第4.16节。它必须是服务器接收到的最后一条顺序记录的DSN。

Configuration ID: 8 bit unsigned char

配置ID:8位无符号字符

See Section 4.16.

见第4.16节。

4.18 Error (ERROR)
4.18 错误(错误)

Description

描述

The Error message MAY be issued by either a CRANE server or client. It indicates an error condition that was detected by the sender.

错误消息可能由CRANE服务器或客户端发出。它表示发送方检测到的错误情况。

Message 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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |  Version      |  MID=0x23     | Session ID    | Message Flags |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                         Message Length                        |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                           Timestamp                           |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |         Error Code            |      Description Length       |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                                                               |
      ~                          Description                          ~
      |                                                               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        
       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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |  Version      |  MID=0x23     | Session ID    | Message Flags |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                         Message Length                        |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                           Timestamp                           |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |         Error Code            |      Description Length       |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                                                               |
      ~                          Description                          ~
      |                                                               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        

Timestamp: 32 bit unsigned integer

时间戳:32位无符号整数

The Timestamp field is a timestamp in seconds since 00:00:00 GMT, January 1, 1970.

时间戳字段是自1970年1月1日格林威治标准时间00:00:00以来的时间戳(以秒为单位)。

Error Code: 16 bit unsigned integer

错误代码:16位无符号整数

The Error Code field is a code assigned to an error condition.

错误代码字段是分配给错误条件的代码。

The following error codes are defined in CRANE Version 1:

起重机版本1中定义了以下错误代码:

          Error Condition                   Error Code
         -----------                    --------------
          Unknown                           0
        
          Error Condition                   Error Code
         -----------                    --------------
          Unknown                           0
        

Description Length: 16 bit unsigned integer

说明长度:16位无符号整数

The Description Length field is the length of the Description field. The field limits Description strings to 64 Kb long. Length of 0 means that the Description field is to be skipped.

描述长度字段是描述字段的长度。该字段将描述字符串的长度限制为64 Kb。长度为0表示将跳过描述字段。

Description: Variable Length unsigned char

描述:可变长度无符号字符

The Description field is a text description that allows the sender to provide more detailed information about the error condition. It MUST be padded with 0 to the next 32 bit boundary.

描述字段是一种文本描述,允许发送方提供有关错误情况的更详细信息。它必须用0填充到下一个32位边界。

4.19 Status Request (STATUS REQ)
4.19 状态请求(状态请求)

Description

描述

CRANE servers MAY inquire general operation status of a client by sending the Status Request message. The status information SHOULD include a collection of states, counters, accumulators of the data collection functions that reside with the client. The status MAY include more information about the CRANE client itself.

CRANE服务器可以通过发送状态请求消息来查询客户端的一般操作状态。状态信息应包括驻留在客户端的数据采集功能的状态、计数器、累加器的集合。状态可能包括有关CRANE客户端本身的更多信息。

The status reporting mechanism relies on the status template of a session. It is determined similarly as other templates. Without a determined status template, no status information can be delivered.

状态报告机制依赖于会话的状态模板。它的确定与其他模板类似。如果没有确定的状态模板,则无法传递状态信息。

Message 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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |  Version      |  MID=0x30     | Session ID    | Message Flags |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                         Message Length                        |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        
       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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |  Version      |  MID=0x30     | Session ID    | Message Flags |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                         Message Length                        |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        
4.20 Status Response (STATUS RSP)
4.20 状态响应(状态RSP)

Description

描述

The Status Response message contains a status report that MUST be compatible with the status template of the session. It is client's response to a STATUS REQ message from a server.

状态响应消息包含的状态报告必须与会话的状态模板兼容。它是客户端对来自服务器的状态REQ消息的响应。

Message 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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |  Version      |  MID=0x31     | Session ID    | Message Flags |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                         Message Length                        |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |        Template ID            |  Reserved     |Config. ID     |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                         Record Length                         |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                                                               |
      ~                         Record Data                           ~
      |                                                               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        
       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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |  Version      |  MID=0x31     | Session ID    | Message Flags |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                         Message Length                        |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |        Template ID            |  Reserved     |Config. ID     |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                         Record Length                         |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                                                               |
      ~                         Record Data                           ~
      |                                                               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        

Template ID: 16 bit unsigned integer

模板ID:16位无符号整数

See Section 4.6.

见第4.6节。

Configuration ID: 8 bit unsigned integer

配置ID:8位无符号整数

See Section 4.6. The version is needed here to prevent out-of-the-blue messages with outdated templates arriving and erroneously processed. A server MAY keep a short history of templates in order to cope with this scenario.

见第4.6节。这里需要这个版本,以防止带有过时模板的突然消息到达并被错误处理。服务器可能会保留模板的简短历史记录,以应对这种情况。

Record Length: 32 bit unsigned integer

记录长度:32位无符号整数

The Record Length field is the length of the Record Data field in octets.

记录长度字段是记录数据字段的长度(以八位字节为单位)。

Record Data: Variable Length unsigned octets

记录数据:可变长度无符号八位字节

The Record Data field contains the status data that complies with the status template. For more details see section 2.4

记录数据字段包含符合状态模板的状态数据。有关更多详细信息,请参见第2.4节

5 Protocol Version Negotiation

5协议版本协商

Since the CRANE protocol may evolve in the future and it may run over different transport layers, a transport neutral version negotiation mechanism running over UDP is defined. A CRANE server MAY inquire a CRANE client about the CRANE protocol version and transport layer support by sending a UDP packet on an agreed UDP port. The client MUST respond to this request with a UDP packet carrying the protocol

由于CRANE协议将来可能会发展,并且可能会运行在不同的传输层上,因此定义了一种运行在UDP上的与传输无关的版本协商机制。CRANE服务器可以通过在商定的UDP端口上发送UDP数据包,向CRANE客户端查询CRANE协议版本和传输层支持。客户端必须使用携带协议的UDP数据包响应此请求

version, the transport type and the port number used for the specific transport. The Protocol Version Negotiation is optional for CRANE Version 1.

版本、传输类型和用于特定传输的端口号。对于CRANE版本1,协议版本协商是可选的。

The CRANE server sends the following message to query the client's protocol support.

CRANE服务器发送以下消息以查询客户端的协议支持。

Message 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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                         Server Address                        |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                        Server Boot Time                       |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |     'C'       |    'R'        |    'A'        |    'N'        |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        
       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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                         Server Address                        |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                        Server Boot Time                       |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |     'C'       |    'R'        |    'A'        |    'N'        |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        

Server Address:

服务器地址:

The Server Address field is the IP address (Ipv4) of the CRANE server.

服务器地址字段是CRANE服务器的IP地址(Ipv4)。

Server Boot Time

服务器启动时间

The Server Boot Time field is the timestamp of the last server startup in seconds from 1970.

服务器启动时间字段是自1970年起最后一次服务器启动的时间戳(以秒为单位)。

'C', 'R', 'A', 'N':

‘C’、‘R’、‘A’、‘N’:

The 'C', 'R', 'A', 'N' fields are ASCII encoded characters to identify the CRANE server.

“C”、“R”、“A”、“N”字段是ASCII编码字符,用于标识CRANE服务器。

The client's reply to a version negotiation request MUST comply with the following structure:

客户对版本协商请求的回复必须符合以下结构:

Message 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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                      Default Protocol Info                    |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                    Additional Protocols Count                 |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                    Additional Protocols Info                  |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |              ...   Additional Protocols Info  ...             |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                    Additional Protocols Info                  |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        
       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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                      Default Protocol Info                    |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                    Additional Protocols Count                 |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                    Additional Protocols Info                  |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |              ...   Additional Protocols Info  ...             |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                    Additional Protocols Info                  |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        

Default Protocol Info:

默认协议信息:

The Default Protocol Info field contains information of the default protocol supported by the client. The field is structured as a Protocol Info Block described below.

默认协议信息字段包含客户端支持的默认协议的信息。该字段的结构为下文所述的协议信息块。

Additional Protocols Count: 32 bit unsigned integer

附加协议计数:32位无符号整数

The Additional Protocols Count field specifies the number of additional protocols supported by the client. In the case that only the default protocol is supported, the field MUST be set to 0.

附加协议计数字段指定客户端支持的附加协议数。如果只支持默认协议,则该字段必须设置为0。

Additional Protocols Info:

附加协议信息:

The Additional Protocol Info field is an array of Protocol Info Blocks (described below) contain information about additional protocols supported by the client.

附加协议信息字段是一组协议信息块(如下所述),其中包含有关客户端支持的附加协议的信息。

Protocol Info Block

协议信息块

       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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                         Transport Type                        |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                        Protocol Version                       |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |         Port Number           |            Reserved           |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        
       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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                         Transport Type                        |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                        Protocol Version                       |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |         Port Number           |            Reserved           |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        

Transport Type: 32 bit unsigned integer

传输类型:32位无符号整数

1 - TCP, 2 - SCTP

1-TCP,2-SCTP

Protocol Version: 32 bit unsigned integer

协议版本:32位无符号整数

Version number of the CRANE protocol supported over the specific transport layer, the current version is 1.

特定传输层上支持的CRANE协议的版本号,当前版本为1。

Port Number: 16 bit unsigned integer

端口号:16位无符号整数

Port number (either SCTP or TCP port) used for the protocol

用于协议的端口号(SCTP或TCP端口)

6 Security Considerations

6安全考虑

The CRANE protocol can be viewed as an application running over a reliable transport layer, such as TCP and SCTP. The CRANE protocol is end-to-end in the sense that the CRANE messages are communicated between clients and servers identified by the host address and the transport protocol port number. Before any CRANE sessions can be initiated, a set of CRANE servers' addresses should be provisioned on a CRANE client. Similarly, a CRANE server maintains a list of CRANE clients' address with which it communicates. The provisioning is typically carried out securely using a network management system; in this way, the CRANE end-points can be authenticated and authorized. As this scheme is static, without additional security protections the CRANE protocol is vulnerable to attacks such as address spoofing.

CRANE协议可以看作是在可靠传输层(如TCP和SCTP)上运行的应用程序。CRANE协议是端到端的,即CRANE消息在由主机地址和传输协议端口号标识的客户端和服务器之间进行通信。在启动任何CRANE会话之前,应在CRANE客户端上设置一组CRANE服务器的地址。类似地,CRANE服务器维护与之通信的CRANE客户端地址列表。供应通常使用网络管理系统安全地执行;通过这种方式,可以对起重机端点进行认证和授权。由于该方案是静态的,没有额外的安全保护,CRANE协议容易受到地址欺骗等攻击。

The CRANE protocol itself does not offer strong security facilities; therefore, it cannot ensure confidentiality and integrity of CRANE messages. It is strongly recommended that users of the CRANE protocol evaluate their deployment configurations and implement appropriate security policies. For example, if the CRANE protocol is deployed over a local area network or a dedicated connection that

CRANE协议本身没有提供强大的安全设施;因此,它无法确保CRANE消息的机密性和完整性。强烈建议CRANE协议的用户评估其部署配置并实施适当的安全策略。例如,如果通过局域网或专用连接部署CRANE协议

ensure security, no additional security services or procedures may be required; however, if CRANE clients and servers are connected through the Internet, lower layer security services should be invoked.

确保安全,不需要额外的安全服务或程序;但是,如果CRANE客户端和服务器通过Internet连接,则应调用较低层的安全服务。

To achieve a strong security protection of communications between CRANE clients and servers, lower layer security services are strongly recommended. The lower layer security services are transparent to the CRANE protocols. Security mechanisms may be provided at the IP layer using IPSEC [6], or it may be implemented for transport layer using TLS [7]. The provisioning of the lower layer security services is out of the scope of this document.

为了实现CRANE客户端和服务器之间通信的强大安全保护,强烈建议使用较低层的安全服务。下层安全服务对CRANE协议是透明的。可以使用IPSEC在IP层提供安全机制[6],也可以使用TLS在传输层实现安全机制[7]。较低层安全服务的提供不在本文档的范围内。

7 References

7参考文献

[1] Rigney, C., Willens, S., Rubens, A. and W. Simpson, "Remote Authentication Dial In User Service (RADIUS)", RFC 2865, June 2000.

[1] Rigney,C.,Willens,S.,Rubens,A.和W.Simpson,“远程认证拨入用户服务(RADIUS)”,RFC 28652000年6月。

[2] Calhoun, P., "DIAMETER Base Protocol", Work in Progress.

[2] Calhoun,P.,“直径基准协议”,正在进行中。

[3] Calhoun, P., et. al., "DIAMETER Framework Document", Work in Progress.

[3] Calhoun,P.等人,“直径框架文件”,正在进行的工作。

[4] Stewart, R., Xie, Q., Morneault, K., Sharp, C., Schwarzbauer, H., Taylor, T., Rytina, I., Kalla, M., Zhang, L. and V. Paxson, "Simple Control Transmission Protocol", RFC 2960, October 2000.

[4] Stewart,R.,Xie,Q.,Morneault,K.,Sharp,C.,Schwarzbauer,H.,Taylor,T.,Rytina,I.,Kalla,M.,Zhang,L.和V.Paxson,“简单控制传输协议”,RFC 29602000年10月。

[5] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997.

[5] Bradner,S.,“RFC中用于表示需求水平的关键词”,BCP 14,RFC 2119,1997年3月。

[6] Kent, S. and R. Atkinson, "Security Architecture for the Internet Protocol", RFC 2401, November 1998.

[6] Kent,S.和R.Atkinson,“互联网协议的安全架构”,RFC 2401,1998年11月。

[7] Dierks, T. and C. Allen, "The TLS Protocol, Version 1.0", RFC 2246, January 1999.

[7] Dierks,T.和C.Allen,“TLS协议,版本1.0”,RFC 2246,1999年1月。

8 Acknowledgments

8致谢

Special thanks are due to Tal Givoly, Limor Schweitzer for conceiving the work, and Nir Pedhatzur, Batya Ferder, and Peter Ludemann from XACCT Technologies for accomplishing the first CRANE protocol implementation.

特别感谢Tal Givoly、Limor Schweitzer构思这项工作,感谢XACCT Technologies的Nir Pedhatzur、Batya Ferder和Peter Ludemann完成第一个CRANE协议的实施。

Thanks are also due to Nevil Brownlee for his valuable comments on the work, as well as the IETF IPFIX WG.

感谢Nevil Brownlee对这项工作以及IETF IPFIX工作组提出的宝贵意见。

9 Authors' Addresses

9作者地址

Kevin Zhang 10124 Treble Court Rockville, MD 20850 U.S.A.

Kevin Zhang 10124美国马里兰州罗克维尔三重法院20850。

Phone +1 301 315 0033 EMail: kevinzhang@ieee.org

电话+1 301 315 0033电子邮件:kevinzhang@ieee.org

Eitan Elkin XACCT Technologies, Ltd. www.xacct.com 12 Hachilazon St. Ramat-Gan, Israel 52522

Eitan Elkin XACCT Technologies,Ltd.www.XACCT.com 12 Hachilazon St.Ramat Gan,以色列52522

Phone +1 972 3 576 4111 EMail: eitan@xacct.com

电话+1 972 3 576 4111电子邮件:eitan@xacct.com

10 Full Copyright Statement

10完整版权声明

Copyright (C) The Internet Society (2002). All Rights Reserved.

版权所有(C)互联网协会(2002年)。版权所有。

This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this paragraph are included on all such copies and derivative works. However, this document itself may not be modified in any way, such as by removing the copyright notice or references to the Internet Society or other Internet organizations, except as needed for the purpose of developing Internet standards in which case the procedures for copyrights defined in the Internet Standards process must be followed, or as required to translate it into languages other than English.

本文件及其译本可复制并提供给他人,对其进行评论或解释或协助其实施的衍生作品可全部或部分编制、复制、出版和分发,不受任何限制,前提是上述版权声明和本段包含在所有此类副本和衍生作品中。但是,不得以任何方式修改本文件本身,例如删除版权通知或对互联网协会或其他互联网组织的引用,除非出于制定互联网标准的需要,在这种情况下,必须遵循互联网标准过程中定义的版权程序,或根据需要将其翻译成英语以外的其他语言。

The limited permissions granted above are perpetual and will not be revoked by the Internet Society or its successors or assigns.

上述授予的有限许可是永久性的,互联网协会或其继承人或受让人不会撤销。

This document and the information contained herein is provided on an "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.

本文件和其中包含的信息是按“原样”提供的,互联网协会和互联网工程任务组否认所有明示或暗示的保证,包括但不限于任何保证,即使用本文中的信息不会侵犯任何权利,或对适销性或特定用途适用性的任何默示保证。

Acknowledgement

确认

Funding for the RFC Editor function is currently provided by the Internet Society.

RFC编辑功能的资金目前由互联网协会提供。