BLOG | DOCUMENTATION | TRAC

Home --> Documentations --> PJNATH Reference

pj_stun_xor_reflected_from_attr Struct Reference

Data Fields

pj_stun_attr_hdr hdr
 
pj_bool_t xor_ed
 
pj_sockaddr sockaddr
 

Detailed Description

This structure describes STUN generic IP address attribute, used for example to represent STUN MAPPED-ADDRESS attribute.

The generic IP address attribute indicates the transport address. It consists of an eight bit address family, and a sixteen bit port, followed by a fixed length value representing the IP address. If the address family is IPv4, the address is 32 bits, in network byte order. If the address family is IPv6, the address is 128 bits in network byte order.

The format of the generic IP address attribute is:

     0                   1                   2                   3
     0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |x x x x x x x x|    Family     |           Port                |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                   Address  (variable)
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

This structure describes STUN MAPPED-ADDRESS attribute. The MAPPED-ADDRESS attribute indicates the mapped transport address.

This describes STUN XOR-MAPPED-ADDRESS attribute (which has the same format as STUN MAPPED-ADDRESS attribute). The XOR-MAPPED-ADDRESS attribute is present in responses. It provides the same information that would present in the MAPPED- ADDRESS attribute but because the NAT's public IP address is obfuscated through the XOR function, STUN messages are able to pass through NATs which would otherwise interfere with STUN.

This describes STUN ALTERNATE-SERVER attribute. The alternate server represents an alternate transport address for a different STUN server to try. It is encoded in the same way as MAPPED-ADDRESS.

This structure describes STUN RESPONSE-ADDRESS attribute. The RESPONSE-ADDRESS attribute indicates where the response to a Binding Request should be sent. Its syntax is identical to MAPPED- ADDRESS.

Note that the usage of this attribute has been deprecated by the RFC 3489-bis standard.

This structure describes STUN CHANGED-ADDRESS attribute. The CHANGED-ADDRESS attribute indicates the IP address and port where responses would have been sent from if the "change IP" and "change port" flags had been set in the CHANGE-REQUEST attribute of the Binding Request. The attribute is always present in a Binding Response, independent of the value of the flags. Its syntax is identical to MAPPED-ADDRESS.

Note that the usage of this attribute has been deprecated by the RFC 3489-bis standard.

This structure describes STUN SOURCE-ADDRESS attribute. The SOURCE-ADDRESS attribute is present in Binding Responses. It indicates the source IP address and port that the server is sending the response from. Its syntax is identical to that of MAPPED- ADDRESS.

Note that the usage of this attribute has been deprecated by the RFC 3489-bis standard.

This describes the STUN REFLECTED-FROM attribute. The REFLECTED-FROM attribute is present only in Binding Responses, when the Binding Request contained a RESPONSE-ADDRESS attribute. The attribute contains the identity (in terms of IP address) of the source where the request came from. Its purpose is to provide traceability, so that a STUN server cannot be used as a reflector for denial-of-service attacks.

This describes the STUN XOR-PEER-ADDRESS attribute. The XOR-PEER-ADDRESS specifies the address and port of the peer as seen from the TURN server. It is encoded in the same way as XOR-MAPPED- ADDRESS.

This describes the STUN XOR-RELAYED-ADDRESS attribute. The XOR-RELAYED-ADDRESS is present in Allocate responses. It specifies the address and port that the server allocated to the client. It is encoded in the same way as XOR-MAPPED-ADDRESS.

This describes the XOR-REFLECTED-FROM attribute, as described by draft-macdonald-behave-nat-behavior-discovery-00. The XOR-REFLECTED-FROM attribute is used in place of the REFLECTED- FROM attribute. It provides the same information, but because the NAT's public address is obfuscated through the XOR function, It can pass through a NAT that would otherwise attempt to translate it to the private network address. XOR-REFLECTED-FROM has identical syntax to XOR-MAPPED-ADDRESS.

Field Documentation

pj_stun_attr_hdr pj_stun_xor_reflected_from_attr::hdr

Standard STUN attribute header.

pj_sockaddr pj_stun_xor_reflected_from_attr::sockaddr

The socket address

pj_bool_t pj_stun_xor_reflected_from_attr::xor_ed

Flag to indicate whether this attribute should be sent in XOR-ed format, or has been received in XOR-ed format.


The documentation for this struct was generated from the following file:

 


PJNATH - Open Source NAT traversal helper library supporting STUN, TURN, and ICE
Copyright (C) 2006-2009 Teluu Inc.