From 71dc0022f1df09713316356fe057f0c1cf9ecd45 Mon Sep 17 00:00:00 2001 From: Jakub Adam Date: Wed, 29 Jun 2016 06:39:02 +0000 Subject: 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 --- agent/agent.c | 4 ++-- stun/usages/ice.c | 6 +++--- stun/usages/ice.h | 20 ++++++++++++-------- 3 files changed, 17 insertions(+), 13 deletions(-) diff --git a/agent/agent.c b/agent/agent.c index d819d27..8915cbb 100644 --- a/agent/agent.c +++ b/agent/agent.c @@ -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; } diff --git a/stun/usages/ice.c b/stun/usages/ice.c index a7d0d19..e6c7aa0 100644 --- a/stun/usages/ice.c +++ b/stun/usages/ice.c @@ -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!"); } diff --git a/stun/usages/ice.h b/stun/usages/ice.h index c95370b..f74caa7 100644 --- a/stun/usages/ice.h +++ b/stun/usages/ice.h @@ -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 * - * @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 - * + * @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. */ 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. */ -- cgit v1.2.1