#[repr(u16)]pub enum Kind {
Show 14 variants
TryAlternate = 768,
BadRequest = 1_024,
Unauthorized = 1_025,
Forbidden = 1_027,
RequestTimedout = 1_032,
UnknownAttribute = 1_044,
AllocationMismatch = 1_061,
StaleNonce = 1_062,
AddressFamilyNotSupported = 1_064,
WrongCredentials = 1_065,
UnsupportedTransportAddress = 1_066,
AllocationQuotaReached = 1_110,
ServerError = 1_280,
InsufficientCapacity = 1_288,
}
Expand description
The following error codes, along with their recommended reason phrases, are defined:
300 Try Alternate: The client should contact an alternate server for this request. This error response MUST only be sent if the request included either a USERNAME or USERHASH attribute and a valid MESSAGE-INTEGRITY or MESSAGE-INTEGRITY-SHA256 attribute; otherwise, it MUST NOT be sent and error code 400 (Bad Request) is suggested. This error response MUST be protected with the MESSAGE-INTEGRITY or MESSAGE-INTEGRITY-SHA256 attribute, and receivers MUST validate the MESSAGE-INTEGRITY or MESSAGE- INTEGRITY-SHA256 of this response before redirecting themselves to an alternate server. Note: Failure to generate and validate message integrity for a 300 response allows an on-path attacker to falsify a 300 response thus causing subsequent STUN messages to be sent to a victim.
400 Bad Request: The request was malformed. The client SHOULD NOT retry the request without modification from the previous attempt. The server may not be able to generate a valid MESSAGE-INTEGRITY or MESSAGE-INTEGRITY-SHA256 for this error, so the client MUST NOT expect a valid MESSAGE-INTEGRITY or MESSAGE- INTEGRITY-SHA256 attribute on this response.
401 Unauthenticated: The request did not contain the correct credentials to proceed. The client should retry the request with proper credentials.
420 Unknown Attribute: The server received a STUN packet containing a comprehension-required attribute that it did not understand. The server MUST put this unknown attribute in the UNKNOWN- ATTRIBUTE attribute of its error response.
438 Stale Nonce: The NONCE used by the client was no longer valid. The client should retry, using the NONCE provided in the response.
500 Server Error: The server has suffered a temporary error. The client should try again.