stun_rs::attributes

Module discovery

source
Expand description

NAT Behavior Discovery attributes defined for STUN RFC5780

Structs§

  • The change request attribute contains two flags to control the IP address and port that the server uses to send the response. These flags are called the “change IP” and “change port” flags. This attribute is allowed only in the Binding Request. The “change IP” and “change port” flags are useful for determining the current filtering behavior of a NAT. They instruct the server to send the Binding Responses from the alternate source IP address and/or alternate port. The change request attribute is optional in the Binding Request.
  • The other address attribute is used in Binding Responses. It informs the client of the source IP address and port that would be used if the client requested the “change IP” and “change port” behavior. This attribute MUST NOT be inserted into a Binding Response unless the server has a second IP address.
  • The padding attribute allows for the entire message to be padded to force the STUN message to be divided into IP fragments. This attribute consists entirely of a free-form string, the value of which does not matter. Padding can be used in either Binding Requests or Binding Responses.
  • The response origin attribute is inserted by the server and indicates the source IP address and port the response was sent from. It is useful for detecting double NAT configurations. It is only present in Binding Responses.
  • The response port attribute contains a port. This attribute can be present in the Binding Request and indicates which port the Binding Response will be sent to. For servers which support the response port attribute, the Binding Response MUST be transmitted to the source IP address of the Binding Request and the port contained in response port.

Enums§

  • The change request attribute contains two flags to control the IP address and port that the server uses to send the response. These flags are called the “change IP” and “change port” flags.