OVERVIEW   INDEX   DEPRECATED   HELP   CORRESPONDENCES  


Module Parameters   Data Types   Component Types   Port Types   Constants   Templates   Signatures   Functions   Altsteps   Test Cases  

Module STUN_TypesAndValues


This module contains TTCN-3 type definitions for the STUN protocol.

Version: 1.0

See also: RFC 5389

Groups:

Data Types Summary
MagicCookie
utf8string
STUNMessageType
STUNMessageAttributeType
Family
STUNMessage
STUNMessageHeader
MappedAddress
XORMappedAddress
Username
MessageIntegrity
Fingerprint
ErrorCode
Realm
Nonce
UnknownAttributes
Software
AlternateServer
STUNMessageAttributGroup
UnknownAttributesGroup
STUNMessageAttribute
Constants Summary
MAGIC_COOKIE

Details

MagicCookie
type hexstring MagicCookie;

utf8string
type universal charstring utf8string  length(0 .. 127)
with {
variant "UTF-8"
}

Declared in group AttributeFields

URL: RFC5389, used within selected attributes

STUNMessageType
type enumerated STUNMessageType {
request, success_response, failure_response, indication
}

STUNMessageAttributeType
type enumerated STUNMessageAttributeType {
    MAPPED_ADDRESS,
    XOR_MAPPED_ADDRESS,
    USERNAME,
    MESSAGE_INTEGRITY,
    ERROR_CODE,
    REALM,
    NONCE,
    UNKNOWN_ATTRIBUTES,
    SOFTWARE,
    ALTERNATE_SERVER,
    FINGERPRINT
}

Declared in group AttributeFields

URL: RFC5389 section 18.2

Family
type enumerated Family {
    IPv4, IPv6
}

Declared in group AttributeFields

URL: RFC5389, used for MAPPED-ADDRESS (section 15.1) and XOR-MAPPED-ADDESS (section 15.2)

STUNMessage
type record STUNMessage {
    STUNMessageHeader header, 
    STUNMessageAttributGroup messageAttributes optional
}

STUNMessageHeader
type record STUNMessageHeader {
    STUNMessageType messageType,
    integer messageLength,
    MagicCookie magicCookie, 
    integer transactionID 
}

URL: RFC5389 section 6

MappedAddress
type record MappedAddress {
    STUNMessageAttributeType stunType (MAPPED_ADDRESS) ,
    integer stunLength,
    Family family,
    integer mappedAddressPort,
    octetstring mappedAdressAddress
}

Declared in group Attributes

URLs: RFC5389, section 15, RFC5389, section 15.1

XORMappedAddress
type record XORMappedAddress {
    STUNMessageAttributeType stunType (XOR_MAPPED_ADDRESS) ,
    integer stunLength,
    Family family,
    integer xPort,
    octetstring xAddress
}

Declared in group Attributes

URL: RFC5389, section 15.2

Username
type record Username {
    STUNMessageAttributeType stunType (USERNAME) ,
    integer stunLength,
    utf8string username
}

Declared in group Attributes

URL: RFC5389, section 15.3

MessageIntegrity
type record MessageIntegrity {
    STUNMessageAttributeType stunType (MESSAGE_INTEGRITY) ,
    integer stunLength,
    octetstring integrity
}

Declared in group Attributes

URL: RFC5389, section 15.4

Fingerprint
type record Fingerprint {
    STUNMessageAttributeType stunType (FINGERPRINT) ,
    integer stunLength,
    octetstring
    fingerprint 
}

Declared in group Attributes

URL: RFC5389, section 15.5

ErrorCode
type record ErrorCode {
    STUNMessageAttributeType stunType (ERROR_CODE) ,
    integer stunLength,
    integer classnumber (300 .. 699) ,
    charstring reasonPhrase
}

Declared in group Attributes

URL: RFC5389, section 15.6

Realm
type record Realm {
    STUNMessageAttributeType stunType (REALM) ,
    integer stunLength,
    utf8string realm
}

Declared in group Attributes

URL: RFC5389, section 15.7

Nonce
type record Nonce {
    STUNMessageAttributeType stunType (NONCE) ,
    integer stunLength,
    utf8string nonce
}

Declared in group Attributes

URL: RFC5389, section 15.8

UnknownAttributes
type record UnknownAttributes {
    STUNMessageAttributeType stunType (UNKNOWN_ATTRIBUTES) ,
    integer stunLength,
    UnknownAttributesGroup unknownAttributeGroup
}

Declared in group Attributes

URL: RFC5389, section 15.9

Software
type record Software {
    STUNMessageAttributeType stunType (SOFTWARE) ,
    integer stunLength,
    utf8string software
}

Declared in group Attributes

URL: RFC5389, section 15.10

AlternateServer
type record AlternateServer {
    STUNMessageAttributeType stunType (ALTERNATE_SERVER) ,
    integer stunLength,
    Family family,
    integer alternateServerPort,
    octetstring alternateServerAddress
}

Declared in group Attributes

URL: RFC5389, section 15.11

STUNMessageAttributGroup
type
record of STUNMessageAttribute STUNMessageAttributGroup

UnknownAttributesGroup
type record of bitstring UnknownAttributesGroup

Declared in group Attributes

STUNMessageAttribute
type union STUNMessageAttribute {
MappedAddress mappedAdress,
XORMappedAddress xorMappedAddress,
Username username,
MessageIntegrity messageIntegrity,
Fingerprint fingerprint,
ErrorCode errorCode,
Realm realm,
Nonce nonce,
UnknownAttributes unknownAttributes,
Software software,
AlternateServer alternateServer
}

MAGIC_COOKIE
const MagicCookie MAGIC_COOKIE := '2112A442'H