Correct handling of dns:decode_message error conditions.
Add type signatures.