来自知识星球

Rx接口的result-code的取值

Rx接口的result-code的取值在RFC6733中定义。
截取如下:
7.1.3. Protocol Errors
Errors that fall within the Protocol Error category SHOULD be treated
on a per-hop basis, and Diameter proxies MAY attempt to correct the
error, if it is possible. Note that these errors MUST only be used
in answer messages whose 'E' bit is set.
DIAMETER_COMMAND_UNSUPPORTED 3001
This error code is used when a Diameter entity receives a message
with a Command Code that it does not support.
DIAMETER_UNABLE_TO_DELIVER 3002
This error is given when Diameter cannot deliver the message to
the destination, either because no host within the realm
supporting the required application was available to process the
request or because the Destination-Host AVP was given without the
associated Destination-Realm AVP.
DIAMETER_REALM_NOT_SERVED 3003
The intended realm of the request is not recognized.
DIAMETER_TOO_BUSY 3004
When returned, a Diameter node SHOULD attempt to send the message
to an alternate peer. This error MUST only be used when a
specific server is requested, and it cannot provide the requested
service.
DIAMETER_LOOP_DETECTED 3005
An agent detected a loop while trying to get the message to the
intended recipient. The message MAY be sent to an alternate peer,
if one is available, but the peer reporting the error has
identified a configuration problem.
DIAMETER_REDIRECT_INDICATION 3006
A redirect agent has determined that the request could not be
satisfied locally, and the initiator of the request SHOULD direct
the request directly to the server, whose contact information has
been added to the response. When set, the Redirect-Host AVP MUST
be present.
DIAMETER_APPLICATION_UNSUPPORTED 3007
A request was sent for an application that is not supported.
DIAMETER_INVALID_HDR_BITS 3008
A request was received whose bits in the Diameter header were set
either to an invalid combination or to a value that is
inconsistent with the Command Code's definition.
DIAMETER_INVALID_AVP_BITS 3009
A request was received that included an AVP whose flag bits are
set to an unrecognized value or that is inconsistent with the
AVP's definition.
DIAMETER_UNKNOWN_PEER 3010
A CER was received from an unknown peer.
7.1.4. Transient Failures
Errors that fall within the transient failures category are used to
inform a peer that the request could not be satisfied at the time it
was received but MAY be able to satisfy the request in the future.
Note that these errors MUST be used in answer messages whose 'E' bit
is not set.
DIAMETER_AUTHENTICATION_REJECTED 4001
The authentication process for the user failed, most likely due to
an invalid password used by the user. Further attempts MUST only
be tried after prompting the user for a new password.
DIAMETER_OUT_OF_SPACE 4002
A Diameter node received the accounting request but was unable to
commit it to stable storage due to a temporary lack of space.
ELECTION_LOST 4003
The peer has determined that it has lost the election process and
has therefore disconnected the transport connection.
7.1.5. Permanent Failures
Errors that fall within the permanent failures category are used to
inform the peer that the request failed and should not be attempted
again. Note that these errors SHOULD be used in answer messages
whose 'E' bit is not set. In error conditions where it is not
possible or efficient to compose application-specific answer grammar,
answer messages with the 'E' bit set and which comply to the grammar
described in Section 7.2 MAY also be used for permanent errors.
DIAMETER_AVP_UNSUPPORTED 5001
The peer received a message that contained an AVP that is not
recognized or supported and was marked with the 'M' (Mandatory)
bit. A Diameter message with this error MUST contain one or more
Failed-AVP AVPs containing the AVPs that caused the failure.
DIAMETER_UNKNOWN_SESSION_ID 5002
The request contained an unknown Session-Id.
DIAMETER_AUTHORIZATION_REJECTED 5003
A request was received for which the user could not be authorized.
This error could occur if the service requested is not permitted
to the user.
DIAMETER_INVALID_AVP_VALUE 5004
The request contained an AVP with an invalid value in its data
portion. A Diameter message indicating this error MUST include
the offending AVPs within a Failed-AVP AVP.
DIAMETER_MISSING_AVP 5005
The request did not contain an AVP that is required by the Command
Code definition. If this value is sent in the Result-Code AVP, a
Failed-AVP AVP SHOULD be included in the message. The Failed-AVP
AVP MUST contain an example of the missing AVP complete with the
Vendor-Id if applicable. The value field of the missing AVP
should be of correct minimum length and contain zeroes.
DIAMETER_RESOURCES_EXCEEDED 5006
A request was received that cannot be authorized because the user
has already expended allowed resources. An example of this error
condition is when a user that is restricted to one dial-up PPP
port attempts to establish a second PPP connection.
DIAMETER_CONTRADICTING_AVPS 5007
The Home Diameter server has detected AVPs in the request that
contradicted each other, and it is not willing to provide service
to the user. The Failed-AVP AVP MUST be present, which contain
the AVPs that contradicted each other.
DIAMETER_AVP_NOT_ALLOWED 5008
A message was received with an AVP that MUST NOT be present. The
Failed-AVP AVP MUST be included and contain a copy of the
offending AVP.
DIAMETER_AVP_OCCURS_TOO_MANY_TIMES 5009
A message was received that included an AVP that appeared more
often than permitted in the message definition. The Failed-AVP
AVP MUST be included and contain a copy of the first instance of
the offending AVP that exceeded the maximum number of occurrences.
DIAMETER_NO_COMMON_APPLICATION 5010
This error is returned by a Diameter node that receives a CER
whereby no applications are common between the CER sending peer
and the CER receiving peer.
DIAMETER_UNSUPPORTED_VERSION 5011
This error is returned when a request was received, whose version
number is unsupported.
DIAMETER_UNABLE_TO_COMPLY 5012
This error is returned when a request is rejected for unspecified
reasons.
DIAMETER_INVALID_BIT_IN_HEADER 5013
This error is returned when a reserved bit in the Diameter header
is set to one (1) or the bits in the Diameter header are set
incorrectly.
DIAMETER_INVALID_AVP_LENGTH 5014
The request contained an AVP with an invalid length. A Diameter
message indicating this error MUST include the offending AVPs
within a Failed-AVP AVP. In cases where the erroneous AVP length
value exceeds the message length or is less than the minimum AVP
header length, it is sufficient to include the offending AVP
header and a zero filled payload of the minimum required length
for the payloads data type. If the AVP is a Grouped AVP, the
Grouped AVP header with an empty payload would be sufficient to
indicate the offending AVP. In the case where the offending AVP
header cannot be fully decoded when the AVP length is less than
the minimum AVP header length, it is sufficient to include an
offending AVP header that is formulated by padding the incomplete
AVP header with zero up to the minimum AVP header length.
DIAMETER_INVALID_MESSAGE_LENGTH 5015
This error is returned when a request is received with an invalid
message length.
DIAMETER_INVALID_AVP_BIT_COMBO 5016
The request contained an AVP with which is not allowed to have the
given value in the AVP Flags field. A Diameter message indicating
this error MUST include the offending AVPs within a Failed-AVP
AVP.
DIAMETER_NO_COMMON_SECURITY 5017
This error is returned when a CER message is received, and there
are no common security mechanisms supported between the peers. A
Capabilities-Exchange-Answer (CEA) message MUST be returned with
the Result-Code AVP set to DIAMETER_NO_COMMON_SECURITY.
交给AI翻译,然后排版如下:
7.1.3. 协议错误
属于协议错误类别的错误应当基于每个节点来处理,Diameter代理可能尝试纠正错误(如果可能的
话)。注意,这些错误只应在设置了'E'位的回答消息中使用。
Diameter命令不支持 3001
当Diameter实体收到一个它不支持的命令代码的消息时,使用此错误代码。
Diameter无法传递 3002
当Diameter无法将消息传递到目的地时,给出此错误,原因可能是域内没有支持所需应用的主机可用
于处理请求,或是因为给出了Destination-Host AVP但没有相关的Destination-Realm AVP。
Diameter域未服务 3003
请求的预期域未被识别。
Diameter太忙 3004
当返回此错误时,Diameter节点应尝试将消息发送到备用对等节点。此错误仅在请求了特定服务器,
而它无法提供所请求的服务时使用。
Diameter检测到循环 3005
代理在尝试将消息传递给预期接收者时检测到循环。如果有一个可用的备用对等节点,消息可以发送
到该节点,但是报告错误的对等节点已经识别出一个配置问题。
Diameter重定向指示 3006
重定向代理已确定请求无法在本地满足,请求的发起者应直接将请求定向到服务器,其联系信息已添
加到响应中。当设置时,必须存在Redirect-Host AVP。
Diameter应用不支持 3007
发送了一个针对不支持的应用的请求。
Diameter无效头位 3008
收到的请求中,Diameter头的位被设置为无效的组合,或与命令代码的定义不一致。
Diameter无效AVP位 3009
收到的请求包括一个AVP,其标志位被设置为未识别的值,或与AVP的定义不一致。
Diameter未知对等节点 3010
从未知对等节点收到CER。
7.1.4. 暂时性故障
属于暂时性故障类别的错误用于告知对等节点,请求在接收时无法满足,但将来可能能够满足请求。注
意,这些错误必须在未设置'E'位的回答消息中使用。
Diameter认证拒绝 4001
用户的认证过程失败,很可能是因为用户使用了无效的密码。只有在提示用户输入新密码后,才能尝
试进一步的尝试。
Diameter空间不足 4002
Diameter节点收到了会计请求,但由于暂时缺乏空间而无法将其提交到稳定存储。
选举失败 4003
对等节点确定它已经失去了选举过程,并因此断开了传输连接。
7.1.5. 永久性故障
属于永久性故障类别的错误用于告知对等节点,请求失败且不应再次尝试。注意,这些错误应当在未设
置'E'位的回答消息中使用。在无法或不高效地构造特定应用答案语法的错误条件下,也可以使用设置
了'E'位且符合第7.2节描述的语法的回答消息来表示永久性错误。
Diameter AVP不支持 5001
对等节点收到了一个包含未识别或不支持的AVP的消息,并且该AVP被标记为'M'(强制性)。包含此
错误的Diameter消息必须包含一个或多个包含导致失败的AVP的Failed-AVP AVPs。
Diameter未知会话ID 5002
请求包含了一个未知的Session-Id。
Diameter授权拒绝 5003
收到了一个请求,用户无法获得授权。如果请求的服务不允许用户使用,则可能出现此错误。
Diameter无效AVP值 5004
请求包含了一个在其数据部分具有无效值的AVP。指示此错误的Diameter消息必须在一个Failed-AVP
AVP中包含违规的AVPs。
Diameter缺少AVP 5005
请求未包含命令代码定义所要求的AVP。如果此值在Result-Code AVP中发送,消息中应包括一个
Failed-AVP AVP。Failed-AVP AVP必须包含缺失AVP的示例,包括Vendor-Id(如果适用)。缺失AVP的
值字段应具有正确的最小长度,并包含零。
Diameter资源超限 5006
收到了一个请求,无法授权,因为用户已经耗尽了允许的资源。此错误条件的一个例子是,当一个被
限制只能使用一个拨号PPP端口的用户尝试建立第二个PPP连接时。
Diameter矛盾AVPs 5007
家庭Diameter服务器在请求中检测到相互矛盾的AVPs,并且不愿意为用户提供服务。必须存在
Failed-AVP AVP,其中包含相互矛盾的AVPs。
Diameter不允许的AVP 5008
收到了一个包含不应存在的AVP的消息。必须包括Failed-AVP AVP,并包含违规AVP的副本。
Diameter AVP出现次数过多 5009
收到了一个包含出现次数超过允许次数的AVP的消息。必须包括Failed-AVP AVP,并包含超过最大出
现次数的违规AVP的第一个实例的副本。
Diameter无共同应用 5010
当收到一个CER,且在CER发送对等节点和CER接收对等节点之间没有共同的应用时,Diameter节点
返回此错误。
Diameter不支持的版本 5011
当收到一个其版本号不支持的请求时,返回此错误。
Diameter无法遵守 5012
当一个请求因未指定的原因被拒绝时,返回此错误。
Diameter头中的无效位 5013
当Diameter头中的保留位被设置为一(1)或Diameter头中的位被错误设置时,返回此错误。
Diameter无效的AVP长度 5014
请求包含了一个长度无效的AVP。指示此错误的Diameter消息必须在一个Failed-AVP AVP中包含违规
的AVPs。在错误的AVP长度值超过消息长度或小于最小AVP头长度的情况下,只需包含违规AVP头和一
个填充了零的最小所需长度的有效载荷数据类型的零填充负载即可。如果AVP是分组AVP,包含一个空负
载的分组AVP头就足以指示违规的AVP。在AVP长度小于最小AVP头长度时,如果无法完全解码违规AVP
头,只需包含一个通过将不完整的AVP头填充零至最小AVP头长度来制定的违规AVP头即可。
Diameter无效的消息长度 5015
当收到一个具有无效消息长度的请求时,返回此错误。
Diameter AVP标志位组合无效 5016
请求包含了一个不允许在AVP标志字段中具有给定值的AVP。指示此错误的Diameter消息必须在一个
Failed-AVP AVP中包含违规的AVPs。
Diameter无共同安全机制 5017
当收到一个CER消息,且对等节点之间没有支持的共同安全机制时,返回此错误。必须返回一个
Result-Code AVP设置为DIAMETER_NO_COMMON_SECURITY的Capabilities-Exchange-Answer
(CEA)消息。