Commit 71dc0022 authored by Jakub Adam's avatar Jakub Adam Committed by Olivier Crête

stun: add STUN_USAGE_ICE_COMPATIBILITY_MSICE2

Windows Live Messenger is a discontinued service. The only users of WLM
mode seem to be Lync clients, so STUN_USAGE_ICE_COMPATIBILITY_WLM2009
can be repurposed as [MS-ICE2] compatibility.

We keep the WLM enumerator for the sake of API compatibility.

Differential Revision: https://phabricator.freedesktop.org/D1135
parent 58fdd9b5
......@@ -257,11 +257,11 @@ agent_to_ice_compatibility (NiceAgent *agent)
agent->compatibility == NICE_COMPATIBILITY_MSN ?
STUN_USAGE_ICE_COMPATIBILITY_MSN :
agent->compatibility == NICE_COMPATIBILITY_WLM2009 ?
STUN_USAGE_ICE_COMPATIBILITY_WLM2009 :
STUN_USAGE_ICE_COMPATIBILITY_MSICE2 :
agent->compatibility == NICE_COMPATIBILITY_OC2007 ?
STUN_USAGE_ICE_COMPATIBILITY_MSN :
agent->compatibility == NICE_COMPATIBILITY_OC2007R2 ?
STUN_USAGE_ICE_COMPATIBILITY_WLM2009 :
STUN_USAGE_ICE_COMPATIBILITY_MSICE2 :
STUN_USAGE_ICE_COMPATIBILITY_RFC5245;
}
......
......@@ -73,7 +73,7 @@ stun_usage_ice_conncheck_create (StunAgent *agent, StunMessage *msg,
stun_agent_init_request (agent, msg, buffer, buffer_len, STUN_BINDING);
if (compatibility == STUN_USAGE_ICE_COMPATIBILITY_RFC5245 ||
compatibility == STUN_USAGE_ICE_COMPATIBILITY_WLM2009) {
compatibility == STUN_USAGE_ICE_COMPATIBILITY_MSICE2) {
if (cand_use)
{
val = stun_message_append_flag (msg, STUN_ATTRIBUTE_USE_CANDIDATE);
......@@ -100,7 +100,7 @@ stun_usage_ice_conncheck_create (StunAgent *agent, StunMessage *msg,
return 0;
}
if (compatibility == STUN_USAGE_ICE_COMPATIBILITY_WLM2009) {
if (compatibility == STUN_USAGE_ICE_COMPATIBILITY_MSICE2) {
size_t identifier_len = strlen(candidate_identifier);
size_t attribute_len = identifier_len;
int modulo4 = identifier_len % 4;
......@@ -297,7 +297,7 @@ stun_usage_ice_conncheck_create_reply (StunAgent *agent, StunMessage *req,
* attribute
*/
if (compatibility == STUN_USAGE_ICE_COMPATIBILITY_RFC5245 ||
compatibility == STUN_USAGE_ICE_COMPATIBILITY_WLM2009)
compatibility == STUN_USAGE_ICE_COMPATIBILITY_MSICE2)
{
stun_debug ("STUN Role not specified by peer!");
}
......
......@@ -65,23 +65,27 @@ extern "C" {
* implementation of ICE
* @STUN_USAGE_ICE_COMPATIBILITY_MSN: The ICE compatibility with MSN's
* implementation of ICE
* @STUN_USAGE_ICE_COMPATIBILITY_WLM2009: The ICE compatibility with Windows
* Live Messenger and Microsoft Office Communicator 2007 R2 implementation of ICE
* @STUN_USAGE_ICE_COMPATIBILITY_MSICE2: The ICE compatibility with [MS-ICE2]
* specification
* @STUN_USAGE_ICE_COMPATIBILITY_DRAFT19: The ICE compatibility with draft 19
* @STUN_USAGE_ICE_COMPATIBILITY_WLM2009: An alias
* for @STUN_USAGE_ICE_COMPATIBILITY_MSICE2
*
* This enum defines which compatibility modes this ICE usage can use
*
* <warning>@STUN_USAGE_ICE_COMPATIBILITY_DRAFT19 is deprecated and should not
* be used in newly-written code. It is kept for compatibility reasons and
* represents the same compatibility as @STUN_USAGE_ICE_COMPATIBILITY_RFC5245
* </warning>
* <warning>@STUN_USAGE_ICE_COMPATIBILITY_DRAFT19 and
* @STUN_USAGE_ICE_COMPATIBILITY_WLM2009 are deprecated and should not be used
* in newly-written code. They are kept for compatibility reasons and represent
* the same compatibilities as @STUN_USAGE_ICE_COMPATIBILITY_RFC5245 and
* @STUN_USAGE_ICE_COMPATIBILITY_MSICE2 respectively.</warning>
*/
typedef enum {
STUN_USAGE_ICE_COMPATIBILITY_RFC5245,
STUN_USAGE_ICE_COMPATIBILITY_GOOGLE,
STUN_USAGE_ICE_COMPATIBILITY_MSN,
STUN_USAGE_ICE_COMPATIBILITY_WLM2009,
STUN_USAGE_ICE_COMPATIBILITY_MSICE2,
STUN_USAGE_ICE_COMPATIBILITY_DRAFT19 = STUN_USAGE_ICE_COMPATIBILITY_RFC5245,
STUN_USAGE_ICE_COMPATIBILITY_WLM2009 = STUN_USAGE_ICE_COMPATIBILITY_MSICE2,
} StunUsageIceCompatibility;
......@@ -141,7 +145,7 @@ typedef enum {
* Builds an ICE connectivity check STUN message.
* If the compatibility is not #STUN_USAGE_ICE_COMPATIBILITY_RFC5245, the
* @cand_use, @controlling, @priority and @tie arguments are not used.
* If the compatibility is not #STUN_USAGE_ICE_COMPATIBILITY_WLM2009, the
* If the compatibility is not #STUN_USAGE_ICE_COMPATIBILITY_MSICE2, the
* @candidate_identifier argument is not used.
* Returns: The length of the message built.
*/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment