import "zapINetUtils.idl";
Public Member Functions | |
| zapIStunMessage | createStunMessage () |
| Create an empty STUN message. | |
| zapIStunMessage | deserializeStunPacket (in ACString packet,[array, size_is(count)] out unsigned short unknownAttribs, out unsigned long count) |
| Deserialize a STUN packet to a zapIStunMessage structure. | |
| PRInt32 | snoopStunPacket (in ACString buffer) |
| Checks if the buffer contains a (possibly partial) STUN packet. | |
| void | resolveMappedAddress (in zapIStunAddressResolveListener listener, in ACString stunServer) |
| Asynchronously resolve our mapped NAT address using the given stun server. | |
| ACString | getPrimaryHostAddress () |
| Returns the 'primary' ip address of the local host. | |
|
|
Create an empty STUN message.
|
|
||||||||||||||||
|
Deserialize a STUN packet to a zapIStunMessage structure. If parsing of the packet succeeds, unknownAttribs will contain any attributes with values less than or equal to 0x7fff which were not understood. |
|
|
Returns the 'primary' ip address of the local host. This will be the first ip address returned by the dns resolver for the current hostname, or if this fails on Linux, the address of interface 'eth0'. If no ip address can be inferred, 127.0.0.1 will be returned. Note: This is a temporary method that will be replaced by a mechanism for querying all local ip addresses at some point. |
|
||||||||||||
|
Asynchronously resolve our mapped NAT address using the given stun server. 'stunServer' can be a domain name or IP address, optionally postfixed with ':' and port number. |
|
|
Checks if the buffer contains a (possibly partial) STUN packet. retval will be -2 if the buffer definitely isn't a STUN packet, -1 if the buffer might be a STUN message but the buffer doesn't contain enough bytes to be sure yet, 0 if the buffer appears to be a STUN message but the length can't be determined yet (because it only contains the first 2 bytes of the header), or n>20 (== the length of the STUN message including header) if the buffer appears to be a (possibly partial) STUN message and the length can be determined. |
1.4.4