BLOG | DOCUMENTATION | TRAC

Home --> Documentations --> PJNATH Reference

Data Fields

pj_stun_attr_hdr hdr
 
pj_uint32_t value
 

Detailed Description

This structure represents a generic STUN attributes with 32bit (unsigned) integer value, such as STUN FINGERPRINT and REFRESH-INTERVAL attributes.

This structure describes STUN FINGERPRINT attribute. The FINGERPRINT attribute can be present in all STUN messages. It is computed as the CRC-32 of the STUN message up to (but excluding) the FINGERPRINT attribute itself, xor-d with the 32 bit value 0x5354554e

This describes STUN REFRESH-INTERVAL attribute. The REFRESH-INTERVAL indicates the number of milliseconds that the server suggests the client should use between refreshes of the NAT bindings between the client and server.

This structure describes STUN CHANGE-REQUEST attribute. The CHANGE-REQUEST attribute is used by the client to request that the server use a different address and/or port when sending the response.

Bit 29 of the value is the "change IP" flag. If true, it requests the server to send the Binding Response with a different IP address than the one the Binding Request was received on.

Bit 30 of the value is the "change port" flag. If true, it requests the server to send the Binding Response with a different port than the one the Binding Request was received on.

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

This describes TURN CHANNEL-NUMBER attribute. In this library, this attribute is represented with 32bit integer. Application may use PJ_STUN_GET_CH_NB() and PJ_STUN_SET_CH_NB() to extract/set channel number value from the 32bit integral value.

The CHANNEL-NUMBER attribute contains the number of the channel. It is a 16-bit unsigned integer, followed by a two-octet RFFU field which MUST be set to 0 on transmission and ignored on reception.

   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
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |        Channel Number         |         RFFU                  |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

This describes STUN LIFETIME attribute. The lifetime attribute represents the duration for which the server will maintain an allocation in the absence of data traffic either from or to the client. It is a 32 bit value representing the number of seconds remaining until expiration.

This describes STUN BANDWIDTH attribute. The bandwidth attribute represents the peak bandwidth, measured in kbits per second, that the client expects to use on the binding. The value represents the sum in the receive and send directions.

This describes the REQUESTED-ADDRESS-TYPE attribute. The REQUESTED-ADDRESS-TYPE attribute is used by clients to request the allocation of a specific address type from a server. The following is the format of the REQUESTED-ADDRESS-TYPE attribute.

     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
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |        Family                 |           Reserved            |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

This describes the TURN REQUESTED-TRANSPORT attribute, encoded in STUN generic integer attribute.

This attribute allows the client to request that the port in the relayed-transport-address be even, and (optionally) that the server reserve the next-higher port number. The attribute is 8 bits long. Its format is:

      0
      0 1 2 3 4 5 6 7
     +-+-+-+-+-+-+-+-+
     |R|    RFFU     |
     +-+-+-+-+-+-+-+-+

The attribute contains a single 1-bit flag:

R: If 1, the server is requested to reserve the next higher port number (on the same IP address) for a subsequent allocation. If 0, no such reservation is requested.

The other 7 bits of the attribute must be set to zero on transmission and ignored on reception.

This describes the TURN REQUESTED-TRANSPORT attribute, encoded in STUN generic integer attribute.

This attribute is used by the client to request a specific transport protocol for the allocated transport address. It has the following format:

     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
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |    Protocol   |                    RFFU                       |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

The Protocol field specifies the desired protocol. The codepoints used in this field are taken from those allowed in the Protocol field in the IPv4 header and the NextHeader field in the IPv6 header [Protocol-Numbers]. This specification only allows the use of codepoint 17 (User Datagram Protocol).

The RFFU field is set to zero on transmission and ignored on receiption. It is reserved for future uses.

This describes the PRIORITY attribute from draft-ietf-mmusic-ice-13. The PRIORITY attribute indicates the priority that is to be associated with a peer reflexive candidate, should one be discovered by this check. It is a 32 bit unsigned integer, and has an attribute type of 0x0024.

This describes the STUN TIMER-VAL attribute. The TIMER-VAL attribute is used only in conjunction with the Set Active Destination response. It conveys from the server, to the client, the value of the timer used in the server state machine.

This describes TURN ICMP attribute

Field Documentation

pj_stun_attr_hdr pj_stun_icmp_attr::hdr

Standard STUN attribute header.

pj_uint32_t pj_stun_icmp_attr::value

The 32bit value, in host byte order.


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.