Enum stun_coder::MessageDecodeError [−][src]
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
IO error when reading a field value
Tuple Fields of ReadFailure
0: Error
Failure to decode the STUN header section
Tuple Fields of HeaderDecodeFailure
Failure to decode a STUN attribute
Tuple Fields of AttributeDecodeFailure
Failure to generate an integrity verification key
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.
Fields of IncorrectFingerprintAttributePosition
Stored and calculated fingerprints mismatch. Means that the message integrity has been compromised.
Fields of FingerprintMismatch
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.
Fields of MessageIntegrityFail
Trait Implementations
Performs the conversion.
Performs the conversion.