WARNING: The online documentation has moved to https://docs.pjsip.org.

Visit the new documentation at https://docs.pjsip.org:

BLOG | DOCUMENTATION | GITHUB

Home --> Documentations --> PJNATH Reference

#include <stun_msg.h>

Data Fields

pj_uint16_t type
 
pj_uint16_t length
 

Detailed Description

This structre describes STUN attribute header. Each attribute is TLV encoded, with a 16 bit type, 16 bit length, and variable value. Each STUN attribute ends on a 32 bit boundary:

     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
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |         Type                  |            Length             |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Field Documentation

◆ length

pj_uint16_t pj_stun_attr_hdr::length

The Length refers to the length of the actual useful content of the Value portion of the attribute, measured in bytes. The value in the Length field refers to the length of the Value part of the attribute prior to padding - i.e., the useful content.

◆ type

pj_uint16_t pj_stun_attr_hdr::type

STUN attribute type.


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.