*
******************************************************************/
-#include <netdb.h>
-#include <ifaddrs.h>
-#include <netinet/tcp.h>
-#include <net/if.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
+
+#if defined(__TIZEN__)
+#include <netdb.h>
+#include <ifaddrs.h>
+#include <netinet/tcp.h>
+#include <net/if.h>
#include <errno.h>
#include <arpa/inet.h>
#include <sys/socket.h>
+#endif
#ifndef __STDC_FORMAT_MACROS
#define __STDC_FORMAT_MACROS
#define CA_TCP_SELECT_TIMEOUT 10
+#if defined(__TIZEN__)
#define CA_IPV4_VERSION 4
#define CA_IPV6_VERSION 6
+#endif
+
/**
* Mutex to synchronize TCP adapter access.
*/
CAFreeTCPData(TCPData);
}
+#if defined(__TIZEN__)
void CAGetTCPLocalIP(CATransportFlags_t flag, char* localIP)
{
//int targetPort;
OIC_LOG_V(DEBUG, TAG, "src_addr = %s", localIP);
}
-int CAGetSocketInformation(u_int8_t* destIP, u_int32_t *destPort){
-
+int CAGetSocketInformation(u_int8_t* destIP, u_int32_t *destPort)
+{
oc_mutex_lock(g_mutexAdapter);
uint32_t length = u_arraylist_length(caglobals.tcp.svrlist);
for (size_t i = 0; i < length; i++)
return res;
}
+#endif
#ifdef SINGLE_THREAD
size_t CAGetTotalLengthFromPacketHeader(const unsigned char *recvBuffer, size_t size)