Main Page | Modules | Class Hierarchy | Class List | Directories | File List | Class Members | File Members

zapIStunMessage Interface Reference
[ZAP NetUtils module]

import "zapIStunMessage.idl";

List of all members.

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.


Member Function Documentation

boolean zapIStunMessage::checkMessageIntegrity in ACString  key  ) 
 

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.

void zapIStunMessage::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.

If parsing of the packet succeeds, unknownAttribs will contain any attributes with values less than or equal to 0x7fff which were not understood.

void zapIStunMessage::generateMessageIntegrityAttrib in ACString  key  ) 
 

Generate a message integrity attribute for the current STUN message.

This also sets 'hasMessageIntegrityAttrib' to 'true'.

void zapIStunMessage::getUnknownAttributes out unsigned long  count,
[array, size_is(count), retval] out unsigned short  attribs
 

void zapIStunMessage::initTransactionID  ) 
 

Fill transactionID with a new random 16 byte value.

ACString zapIStunMessage::serialize  ) 
 

Serialize this message to a STUN package.

void zapIStunMessage::setUnknownAttributes [array, size_is(count)] in unsigned short  attribs,
in unsigned long  count
 


Member Data Documentation

const unsigned short zapIStunMessage::BINDING_ERROR_RESPONSE_MESSAGE = 0x0111
 

const unsigned short zapIStunMessage::BINDING_REQUEST_MESSAGE = 0x0001
 

const unsigned short zapIStunMessage::BINDING_RESPONSE_MESSAGE = 0x0101
 

attribute ACString zapIStunMessage::changedAddress
 

IPv4 or IPv6 IP address string.

  • IPv4: 1*3DIGIT "." 1*3DIGIT "." 1*3DIGIT "." 1*3DIGIT
  • IPv6: IPv6address (see e.g. RFC3261 for BNF)

attribute unsigned short zapIStunMessage::changedAddressPort
 

attribute boolean zapIStunMessage::changeRequestChangeIP
 

attribute boolean zapIStunMessage::changeRequestChangePort
 

attribute ACString zapIStunMessage::errorCode
 

3 ASCII character error code (100-699)

attribute ACString zapIStunMessage::errorCodeReasonPhrase
 

Reason phrase.

Setter automatically pads with spaces so that length (in bytes) is a multiple of 4.

attribute boolean zapIStunMessage::hasChangedAddressAttrib
 

attribute boolean zapIStunMessage::hasChangeRequestAttrib
 

attribute boolean zapIStunMessage::hasErrorCodeAttrib
 

attribute boolean zapIStunMessage::hasMappedAddressAttrib
 

attribute boolean zapIStunMessage::hasMessageIntegrityAttrib
 

Generate a message integrity attribute for the current STUN message.

This also sets 'hasMessageIntegrityAttrib' to 'true'.

attribute boolean zapIStunMessage::hasPasswordAttrib
 

attribute boolean zapIStunMessage::hasReflectedFromAttrib
 

attribute boolean zapIStunMessage::hasResponseAddressAttrib
 

attribute boolean zapIStunMessage::hasServerAttrib
 

attribute boolean zapIStunMessage::hasSourceAddressAttrib
 

attribute boolean zapIStunMessage::hasUnknownAttributesAttrib
 

attribute boolean zapIStunMessage::hasUsernameAttrib
 

attribute boolean zapIStunMessage::hasXORMappedAddressAttrib
 

attribute boolean zapIStunMessage::hasXOROnlyAttrib
 

attribute ACString zapIStunMessage::mappedAddress
 

IPv4 or IPv6 IP address string.

  • IPv4: 1*3DIGIT "." 1*3DIGIT "." 1*3DIGIT "." 1*3DIGIT
  • IPv6: IPv6address (see e.g. RFC3261 for BNF)

attribute unsigned short zapIStunMessage::mappedAddressPort
 

attribute ACString zapIStunMessage::messageIntegrity
 

HMAC-SHA1 (20 byte octet string).

attribute unsigned short zapIStunMessage::messageType
 

Fill transactionID with a new random 16 byte value.

attribute ACString zapIStunMessage::password
 

Password length (in bytes) must be a multiple of 4.

attribute ACString zapIStunMessage::reflectedFrom
 

IPv4 or IPv6 IP address string.

  • IPv4: 1*3DIGIT "." 1*3DIGIT "." 1*3DIGIT "." 1*3DIGIT
  • IPv6: IPv6address (see e.g. RFC3261 for BNF)

attribute unsigned short zapIStunMessage::reflectedFromPort
 

attribute ACString zapIStunMessage::responseAddress
 

IPv4 or IPv6 IP address string.

  • IPv4: 1*3DIGIT "." 1*3DIGIT "." 1*3DIGIT "." 1*3DIGIT
  • IPv6: IPv6address (see e.g. RFC3261 for BNF)

attribute unsigned short zapIStunMessage::responseAddressPort
 

attribute ACString zapIStunMessage::server
 

Server information.

Setter automatically pads with spaces so that length (in bytes) is a multiple of 4.

const unsigned short zapIStunMessage::SHARED_SECRET_ERROR_RESPONSE_MESSAGE = 0x0112
 

const unsigned short zapIStunMessage::SHARED_SECRET_REQUEST_MESSAGE = 0x0002
 

const unsigned short zapIStunMessage::SHARED_SECRET_RESPONSE_MESSAGE = 0x0102
 

attribute ACString zapIStunMessage::sourceAddress
 

IPv4 or IPv6 IP address string.

  • IPv4: 1*3DIGIT "." 1*3DIGIT "." 1*3DIGIT "." 1*3DIGIT
  • IPv6: IPv6address (see e.g. RFC3261 for BNF)

attribute unsigned short zapIStunMessage::sourceAddressPort
 

attribute ACString zapIStunMessage::transactionID
 

Transaction ID (16 octets).

attribute ACString zapIStunMessage::username
 

Username length (in bytes) must be a multiple of 4.

attribute ACString zapIStunMessage::XORMappedAddress
 

IPv4 or IPv6 IP address string.

The underlying setter/getter implementation takes care of XORing.

  • IPv4: 1*3DIGIT "." 1*3DIGIT "." 1*3DIGIT "." 1*3DIGIT
  • IPv6: IPv6address (see e.g. RFC3261 for BNF)

attribute unsigned short zapIStunMessage::XORMappedAddressPort
 


The documentation for this interface was generated from the following file:
Generated on Sat Sep 6 00:00:03 2008 for Mozilla ZAP by  doxygen 1.4.4