+
+void CreateMulticastSocket()
+{
+ OIC_LOG_V(INFO, TAG, "In %s", __func__);
+
+ if (caglobals.ip.ipv6enabled)
+ {
+ NEWSOCKET(AF_INET6, u6, false)
+ NEWSOCKET(AF_INET6, u6s, false)
+ NEWSOCKET(AF_INET6, m6, true)
+ NEWSOCKET(AF_INET6, m6s, true)
+ OIC_LOG_V(INFO, TAG, "IPv6 unicast port: %u", caglobals.ip.u6.port);
+ }
+ if (caglobals.ip.ipv4enabled)
+ {
+ NEWSOCKET(AF_INET, u4, false)
+ NEWSOCKET(AF_INET, u4s, false)
+ NEWSOCKET(AF_INET, m4, true)
+ NEWSOCKET(AF_INET, m4s, true)
+ OIC_LOG_V(INFO, TAG, "IPv4 unicast port: %u", caglobals.ip.u4.port);
+ }
+
+ OIC_LOG_V(INFO, TAG, "Out %s", __func__);
+}
+
+void CloseMulticastSocket()
+{
+ OIC_LOG_V(INFO, TAG, "In %s", __func__);
+
+ CLOSE_SOCKET(u6);
+ CLOSE_SOCKET(u6s);
+ CLOSE_SOCKET(u4);
+ CLOSE_SOCKET(u4s);
+ CLOSE_SOCKET(m6);
+ CLOSE_SOCKET(m6s);
+ CLOSE_SOCKET(m4);
+ CLOSE_SOCKET(m4s);
+
+ OIC_LOG_V(INFO, TAG, "Out %s", __func__);
+}