import "zapIStunMessage.idl";
STUN message header | |
| void | initTransactionID () |
| Fill transactionID with a new random 16 byte value. | |
| attribute unsigned short | messageType |
| Fill transactionID with a new random 16 byte value. | |
| attribute ACString | transactionID |
| Transaction ID (16 octets). | |
MESSAGE-INTEGRITY attribute (0x0008) | |
| void | generateMessageIntegrityAttrib (in ACString key) |
| Generate a message integrity attribute for the current STUN message. | |
| boolean | checkMessageIntegrity (in ACString key) |
| Check the integrity of this STUN message. | |
| attribute boolean | hasMessageIntegrityAttrib |
| Generate a message integrity attribute for the current STUN message. | |
| attribute ACString | messageIntegrity |
| HMAC-SHA1 (20 byte octet string). | |
UNKNOWN-ATTRIBUTES attribute (0x000a) | |
| void | getUnknownAttributes (out unsigned long count,[array, size_is(count), retval] out unsigned short attribs) |
| void | setUnknownAttributes ([array, size_is(count)] in unsigned short attribs, in unsigned long count) |
| attribute boolean | hasUnknownAttributesAttrib |
Public Member Functions | |
| ACString | serialize () |
| Serialize this message to a STUN package. | |
| void | deserialize (in ACString packet,[array, size_is(count)] out unsigned short unknownAttribs, out unsigned long count) |
| (Re-)Initialize this STUN message object with the given packet data. | |
Public Attributes | |
Constants for messageType attribute | |
| const unsigned short | BINDING_REQUEST_MESSAGE = 0x0001 |
| const unsigned short | BINDING_RESPONSE_MESSAGE = 0x0101 |
| const unsigned short | BINDING_ERROR_RESPONSE_MESSAGE = 0x0111 |
| const unsigned short | SHARED_SECRET_REQUEST_MESSAGE = 0x0002 |
| const unsigned short | SHARED_SECRET_RESPONSE_MESSAGE = 0x0102 |
| const unsigned short | SHARED_SECRET_ERROR_RESPONSE_MESSAGE = 0x0112 |
MAPPED-ADDRESS attribute (0x0001) | |
| attribute boolean | hasMappedAddressAttrib |
| attribute unsigned short | mappedAddressPort |
| attribute ACString | mappedAddress |
| IPv4 or IPv6 IP address string. | |
RESPONSE-ADDRESS attribute (0x0002) | |
| attribute boolean | hasResponseAddressAttrib |
| attribute unsigned short | responseAddressPort |
| attribute ACString | responseAddress |
| IPv4 or IPv6 IP address string. | |
CHANGE-REQUEST attribute (0x0003) | |
| attribute boolean | hasChangeRequestAttrib |
| attribute boolean | changeRequestChangeIP |
| attribute boolean | changeRequestChangePort |
SOURCE-ADDRESS attribute (0x0004) | |
| attribute boolean | hasSourceAddressAttrib |
| attribute unsigned short | sourceAddressPort |
| attribute ACString | sourceAddress |
| IPv4 or IPv6 IP address string. | |
CHANGED-ADDRESS attribute (0x0005) | |
| attribute boolean | hasChangedAddressAttrib |
| attribute unsigned short | changedAddressPort |
| attribute ACString | changedAddress |
| IPv4 or IPv6 IP address string. | |
USERNAME attribute (0x0006) | |
| attribute boolean | hasUsernameAttrib |
| attribute ACString | username |
| Username length (in bytes) must be a multiple of 4. | |
PASSWORD attribute (0x0007) | |
| attribute boolean | hasPasswordAttrib |
| attribute ACString | password |
| Password length (in bytes) must be a multiple of 4. | |
ERROR-CODE attribute (0x0009) | |
| attribute boolean | hasErrorCodeAttrib |
| attribute ACString | errorCode |
| 3 ASCII character error code (100-699) | |
| attribute ACString | errorCodeReasonPhrase |
| Reason phrase. | |
REFLECTED-FROM attribute (0x000b) | |
| attribute boolean | hasReflectedFromAttrib |
| attribute unsigned short | reflectedFromPort |
| attribute ACString | reflectedFrom |
| IPv4 or IPv6 IP address string. | |
XOR-MAPPED-ADDRESS attribute (0x8020) | |
| attribute boolean | hasXORMappedAddressAttrib |
| attribute unsigned short | XORMappedAddressPort |
| attribute ACString | XORMappedAddress |
| IPv4 or IPv6 IP address string. | |
XOR-ONLY attribute (0x0021) | |
| attribute boolean | hasXOROnlyAttrib |
SERVER attribute (0x8022) | |
| attribute boolean | hasServerAttrib |
| attribute ACString | server |
| Server information. | |
|
|
Check the integrity of this STUN message. Returns true if the message passes the integrity check, or false otherwise. An exception is thrown if the message doesn't contain a message integrity attribute. |
|
||||||||||||||||
|
(Re-)Initialize this STUN message object with the given packet data. If parsing of the packet succeeds, unknownAttribs will contain any attributes with values less than or equal to 0x7fff which were not understood. |
|
|
Generate a message integrity attribute for the current STUN message. This also sets 'hasMessageIntegrityAttrib' to 'true'. |
|
||||||||||||
|
|
|
|
Fill transactionID with a new random 16 byte value.
|
|
|
Serialize this message to a STUN package.
|
|
||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
IPv4 or IPv6 IP address string.
|
|
|
|
|
|
|
|
|
|
|
|
3 ASCII character error code (100-699)
|
|
|
Reason phrase. Setter automatically pads with spaces so that length (in bytes) is a multiple of 4. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Generate a message integrity attribute for the current STUN message. This also sets 'hasMessageIntegrityAttrib' to 'true'. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
IPv4 or IPv6 IP address string.
|
|
|
|
|
|
HMAC-SHA1 (20 byte octet string).
|
|
|
Fill transactionID with a new random 16 byte value.
|
|
|
Password length (in bytes) must be a multiple of 4.
|
|
|
IPv4 or IPv6 IP address string.
|
|
|
|
|
|
IPv4 or IPv6 IP address string.
|
|
|
|
|
|
Server information. Setter automatically pads with spaces so that length (in bytes) is a multiple of 4. |
|
|
|
|
|
|
|
|
|
|
|
IPv4 or IPv6 IP address string.
|
|
|
|
|
|
Transaction ID (16 octets).
|
|
|
Username length (in bytes) must be a multiple of 4.
|
|
|
IPv4 or IPv6 IP address string. The underlying setter/getter implementation takes care of XORing.
|
|
|
|
1.4.4