[Feature]add MT2731_MP2_MR2_SVN388 baseline version

Change-Id: Ief04314834b31e27effab435d3ca8ba33b499059
diff --git a/meta/meta-mediatek-ivt/recipes-platform/platform-libs-header/files/netd-client.patch b/meta/meta-mediatek-ivt/recipes-platform/platform-libs-header/files/netd-client.patch
new file mode 100644
index 0000000..d1938e2
--- /dev/null
+++ b/meta/meta-mediatek-ivt/recipes-platform/platform-libs-header/files/netd-client.patch
@@ -0,0 +1,52 @@
+diff --git a/system/netd/client/NetdClient.cpp b/system/netd/client/NetdClient.cpp
+index 392b0af..36be012 100644
+--- a/system/netd/client/NetdClient.cpp
++++ b/system/netd/client/NetdClient.cpp
+@@ -19,9 +19,15 @@
+ #include <errno.h>
+ #include <sys/socket.h>
+ #include <unistd.h>
++#include <string.h>
+ 
+ #include <atomic>
+ 
++#define LOG_TAG "NetdClient"
++#include "log/log.h"
++
++
++
+ #include "Fwmark.h"
+ #include "FwmarkClient.h"
+ #include "FwmarkCommand.h"
+@@ -181,11 +187,31 @@ extern "C" unsigned getNetworkForProcess() {
+ }
+ 
+ extern "C" int setNetworkForSocket(unsigned netId, int socketFd) {
++	int ret = 0;
++	unsigned int get_mark = 0;
++	
++	
+     if (socketFd < 0) {
+         return -EBADF;
+     }
++	#if 0
+     FwmarkCommand command = {FwmarkCommand::SELECT_NETWORK, netId, 0};
+     return FwmarkClient().send(&command, socketFd);
++	#endif
++
++	socklen_t fwmarkLen = sizeof(get_mark);
++	printf("[setNetworkForSocket] netId[%d] socketFd[%d]", netId, socketFd);
++
++	if (setsockopt(socketFd, SOL_SOCKET, SO_MARK, &netId,
++                   sizeof(netId)) == -1) {
++        ALOGE("setNetworkForSocket  SO_MARK(%s)", strerror(errno));		
++        return -errno;
++    }
++
++	ret = getsockopt(socketFd, SOL_SOCKET, SO_MARK, &get_mark, &fwmarkLen);	
++    ALOGE("setNetworkForSocket  get_mark(%d)", get_mark);
++
++	return ret;
+ }
+ 
+ extern "C" int setNetworkForProcess(unsigned netId) {