1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
//! Error codes that are defined in [RFC 5389 -- 15.6 ERROR-CODE]
//! (https://tools.ietf.org/html/rfc5389#section-15.6).
use ErrorCode;
/// `300`: "Try Alternate".
///
/// > The client should contact an alternate server for
/// > this request. This error response MUST only be sent if the
/// > request included a USERNAME attribute and a valid MESSAGE-
/// > INTEGRITY 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 attribute, and receivers
/// > MUST validate the MESSAGE-INTEGRITY 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.
/// >
/// > [RFC 5389 -- 15.6 ERROR-CODE](https://tools.ietf.org/html/rfc5389#section-15.6)
;
/// `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 for this error, so the client MUST NOT expect
/// > a valid MESSAGE-INTEGRITY attribute on this response.
/// >
/// > [RFC 5389 -- 15.6 ERROR-CODE](https://tools.ietf.org/html/rfc5389#section-15.6)
;
/// `401`: "Unauthorized".
///
/// > The request did not contain the correct
/// > credentials to proceed. The client should retry the request
/// > with proper credentials.
/// >
/// > [RFC 5389 -- 15.6 ERROR-CODE](https://tools.ietf.org/html/rfc5389#section-15.6)
;
/// `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.
/// >
/// > [RFC 5389 -- 15.6 ERROR-CODE](https://tools.ietf.org/html/rfc5389#section-15.6)
;
/// `438`: "Stale Nonce".
///
/// > The NONCE used by the client was no longer valid.
/// > The client should retry, using the NONCE provided in the
/// > response.
/// >
/// > [RFC 5389 -- 15.6 ERROR-CODE](https://tools.ietf.org/html/rfc5389#section-15.6)
;
/// `500`: "Server Error".
///
/// > The server has suffered a temporary error. The
/// > client should try again.
/// >
/// > [RFC 5389 -- 15.6 ERROR-CODE](https://tools.ietf.org/html/rfc5389#section-15.6)
;