The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

STUN::Attributes - STUN Attributes types. (RFC 5389)

SYNPOSIS

    use STUN::Attributes qw(attr_message :constants);

    print attr_message('0001'), "\n";

    print STUN_MAPPEDADDRESS. "\n";

DESCRIPTION

STUN::Attributes is a library of routines for defining and classifying STUN attributes types.

A STUN Attribute type is a hex number in the range 0x0000 - 0xFFFF. STUN attribute types in the range 0x0000 - 0x7FFF are considered comprehension-required; STUN attribute types in the range 0x8000 - 0xFFFF are considered comprehension-optional. A STUN agent handles unknown comprehension-required and comprehension-optional attributes differently.

CONSTANTS

The following constant functions can be used as mnemonic status code names. None of these are exported by default. Use the :constants tag to import them all.

    STUN_MAPPEDADDRESS      (0001)
    STUN_RESPONSEADDRESS    (0002)
    STUN_CHANGEREQUEST      (0003)
    STUN_SOURCEADDRESS      (0004)
    STUN_CHANGEADDRESS      (0005)
    STUN_USERNAME           (0006)
    STUN_PASSWORD           (0007)
    STUN_MESSAGEINTEGRITY   (0008)
    STUN_ERRORCODE          (0009)
    STUN_UNKNOWNATTRIBUTE   (000A)
    STUN_REFLECTEDFROM      (000B)
    STUN_XORONLY            (0021)
    STUN_XORMAPPEDADDRESS   (8020)
    STUN_SERVERNAME         (8022)
    STUN_SECONDARYADDRESS   (8050)

FUNCTIONS

attr_message( $code )

The attr_message() function will translate status codes to human readable strings. The string is the same as found in the constant names above. If the $code is unknown, then undef is returned.

AUTHOR

Thiago Rondon, thiago@aware.com.br

http://www.aware.com.br/

LICENSE

Perl license.