Enum stun_coder::MessageDecodeError
source · [−]pub enum MessageDecodeError {
ReadFailure(Error),
HeaderDecodeFailure(HeaderDecodeError),
AttributeDecodeFailure(AttributeDecodeError),
IntegrityKeyGenerationFailure(IntegrityKeyGenerationError),
IncorrectFingerprintAttributePosition {
msg_len: usize,
attr_pos: usize,
},
FingerprintMismatch {
attr_value: u32,
computed_value: u32,
},
MessageIntegrityFail {
attr_value: Vec<u8>,
computed_value: Vec<u8>,
},
}
Expand description
Message encoding errors.
Variants
ReadFailure(Error)
IO error when reading a field value
HeaderDecodeFailure(HeaderDecodeError)
Failure to decode the STUN header section
AttributeDecodeFailure(AttributeDecodeError)
Failure to decode a STUN attribute
IntegrityKeyGenerationFailure(IntegrityKeyGenerationError)
Failure to generate an integrity verification key
IncorrectFingerprintAttributePosition
Fields
msg_len: usize
STUN message length
attr_pos: usize
Fingerprint attribute position in that message
Fingerprint attribute is not the last one. This can mean that either the provided byte data contains more than only the STUN message, or message integrity has been compromised.
FingerprintMismatch
Stored and calculated fingerprints mismatch. Means that the message integrity has been compromised.
MessageIntegrityFail
The calculated HMAC value doesn’t match with the provided one.
Either the provided integrity_key
is incorrect or the message integrity has been compromised.
Trait Implementations
Performs the conversion.
Performs the conversion.