Expand description
STUN packets sending and receiving.
Modules§
- STUN Methods Registry
Structs§
- Class used to decode STUN messages
- Describes an error decoding a
StunMessage
- The transaction ID is a 96-bit identifier, used to uniquely identify STUN transactions. It primarily serves to correlate requests with responses, though it also plays a small role in helping to prevent certain types of attacks. The server also uses the transaction ID as a key to identify each transaction uniquely across all clients.
Enums§
- Errors that can occur when handling a STUN packet.
- The STUN message class. Although there are four message classes, there are only two types of transactions in STUN: request/response transactions (which consist of a request message and a response message) and indication transactions (which consist of a single indication message). Response classes are split into error and success responses to aid in quickly processing the STUN message.
- STUN Attributes that can be attached to a
StunMessage
Functions§
- Reports whether b is a STUN message.
- Parses a STUN binding request.
- Parses a successful binding response STUN packet. The IP address is extracted from the XOR-MAPPED-ADDRESS attribute.
- Generates a binding request STUN packet.
- Generates a binding response.