#[repr(u16)]pub enum AttrKind {
Show 20 variants
UserName = 6,
Data = 19,
Realm = 20,
Nonce = 21,
XorPeerAddress = 18,
XorRelayedAddress = 22,
XorMappedAddress = 32,
MappedAddress = 1,
ResponseOrigin = 32_811,
Software = 32_802,
MessageIntegrity = 8,
ErrorCode = 9,
Lifetime = 13,
ReqeestedTransport = 25,
Fingerprint = 32_808,
ChannelNumber = 12,
IceControlled = 32_809,
Priority = 36,
UseCandidate = 37,
IceControlling = 32_810,
}
Expand description
STUN Attributes Registry
A STUN attribute type is a hex number in the range 0x0000-0xFFFF. STUN attribute types in the range 0x0000-0x7FFF are considered comprehension-required; STUN attribute types in the range 0x8000-0xFFFF are considered comprehension-optional. A STUN agent handles unknown comprehension-required and comprehension-optional attributes differently.
STUN attribute types in the first half of the comprehension-required range (0x0000-0x3FFF) and in the first half of the comprehension- optional range (0x8000-0xBFFF) are assigned by IETF Review RFC8126. STUN attribute types in the second half of the comprehension-required range (0x4000-0x7FFF) and in the second half of the comprehension- optional range (0xC000-0xFFFF) are assigned by Expert Review RFC8126. The responsibility of the expert is to verify that the selected codepoint(s) are not in use and that the request is not for an abnormally large number of codepoints. Technical review of the extension itself is outside the scope of the designated expert responsibility.
IANA has updated the names for attributes 0x0002, 0x0004, 0x0005, 0x0007, and 0x000B as well as updated the reference from RFC5389 to RFC8489 for each the following STUN methods.
In addition, RFC5389 introduced a mistake in the name of attribute 0x0003; RFC5389 called it CHANGE-ADDRESS when it was actually previously called CHANGE-REQUEST. Thus, IANA has updated the description for 0x0003 to read “Reserved; was CHANGE-REQUEST prior to RFC5389”.
Comprehension-required range (0x0000-0x7FFF): 0x0000: Reserved 0x0001: MAPPED-ADDRESS 0x0002: Reserved; was RESPONSE-ADDRESS prior to RFC5389 0x0003: Reserved; was CHANGE-REQUEST prior to RFC5389 0x0004: Reserved; was SOURCE-ADDRESS prior to RFC5389 0x0005: Reserved; was CHANGED-ADDRESS prior to RFC5389 0x0006: USERNAME 0x0007: Reserved; was PASSWORD prior to RFC5389 0x0008: MESSAGE-INTEGRITY 0x0009: ERROR-CODE 0x000A: UNKNOWN-ATTRIBUTES 0x000B: Reserved; was REFLECTED-FROM prior to RFC5389 0x0014: REALM 0x0015: NONCE 0x0020: XOR-MAPPED-ADDRESS
Comprehension-optional range (0x8000-0xFFFF) 0x8022: SOFTWARE 0x8023: ALTERNATE-SERVER 0x8028: FINGERPRINT
IANA has added the following attribute to the “STUN Attributes” registry:
Comprehension-required range (0x0000-0x7FFF): 0x001C: MESSAGE-INTEGRITY-SHA256 0x001D: PASSWORD-ALGORITHM 0x001E: USERHASH
Comprehension-optional range (0x8000-0xFFFF) 0x8002: PASSWORD-ALGORITHMS 0x8003: ALTERNATE-DOMAIN