[PROTO] add message size to msg_probe_network
authorVitaliy Cherepanov <v.cherepanov@samsung.com>
Thu, 7 Nov 2013 13:41:13 +0000 (17:41 +0400)
committerVitaliy Cherepanov <v.cherepanov@samsung.com>
Thu, 7 Nov 2013 15:47:18 +0000 (19:47 +0400)
Change-Id: I928e266abe3c8d21826072d44e304c9db93ef13f
Signed-off-by: Vitaliy Cherepanov <v.cherepanov@samsung.com>
include/binproto.h
include/daprobe.h
include/tizen_probe.h
probe_socket/da_socket.h
probe_socket/libdasocket.c
probe_tizenapi/tizen_http.cpp
probe_tizenapi/tizen_socket.cpp

index ef18915c5243282d33269d84298f9fef8901c0ca..c5e318e4f743b164d59ea71ac28f75c5c1eccce3 100644 (file)
@@ -92,6 +92,13 @@ static char __attribute__((used)) *pack_string(char *to, const char *str)
        return to + len;
 }
 
+static char __attribute__((used)) *pack_bin(char *to, const char *from,
+                                           uint32_t len)
+{
+       memcpy(to, from, len);
+       return to + len;
+}
+
 static inline char *pack_double(char *to, double val)
 {
        *(double *)to = val;
@@ -353,7 +360,7 @@ static char __attribute__((used)) *pack_args(char *to, const char *fmt, ...)
 #define MSG_HDR_LEN 20
 #define FLUSH_LOCAL_BUF()                                              \
                *(uint32_t *)(msg_buf + MSG_LEN_OFFSET) = (p - msg_buf) - MSG_HDR_LEN; \
-               send(gTraceInfo.socket.daemonSock, msg_buf, (p - msg_buf), 0);
+               send(gTraceInfo.socket.daemonSock, msg_buf, (p - msg_buf), 0)
 
 // =========================== post block macro ===========================
 
index 047e8f25fe9cfa168b3c391541d29c3b981c85b7..2e785d2fd4b0340559331a1b0b3b49d14b2bfe29 100644 (file)
@@ -139,6 +139,25 @@ int getBacktraceString(log_t* log, int bufsize);
 // ========================= print log =====================================
 #define PRINTMSG(msg)  printLogStr(msg, MSG_MSG)
 
+#define INIT_INFO                                              \
+               info.host_ip = 0;                               \
+               info.host_port = 0;                             \
+               info.msg_total_size = 0;                        \
+               info.msg_pack_size = 0;                         \
+               info.sock = NULL;                               \
+               info.msg_buf = (char *)""
+
+typedef struct {
+       uint32_t host_port;
+       uint32_t host_ip;
+       struct sockaddr *sock;
+
+       uint64_t msg_total_size;
+       uint32_t msg_pack_size;
+       char *msg_buf;
+
+} info_t;
+
 // =========================== declare variables ===========================
 // local variable is faster than heap allocated variable
 // array variable initialization with declare is expensive than memset
@@ -226,10 +245,10 @@ int getBacktraceString(log_t* log, int bufsize);
        if((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {     \
                setProbePoint(&probeInfo)
 
-#define PRE_PROBEBLOCK_END()   \
-               preBlockEnd();                  \
-       }                                                       \
-       olderrno = errno;                       \
+#define PRE_PROBEBLOCK_END()                                                   \
+               preBlockEnd();                                                  \
+       }                                                                       \
+       olderrno = errno;                                                       \
        errno = 0
 
 #define PRE_PROBEBLOCK() \
index aaa74cda788a0ac77cb4cc379372117dd4d6eb57..64f08024ba7db279239c8256b9cb0078ec40293b 100755 (executable)
 extern "C" {
 #endif
 
-typedef struct {
-       uint32_t port;
-       uint32_t ip;
-} hostinfo_t;
 
 #define GET_REAL_FUNC_TIZEN(FUNCNAME, LIBNAME, FUNCTIONPOINTER)                                                \
        do {                                                                                            \
index be497f71c0e70c3edcf4b1efb517f5253678adcd..8985d8d5cad55febec42525e4fa8ccdc26f4ab08 100644 (file)
 
 #include "daprobe.h"
 
-#define SOCKET_SEND_SIZE 256;
-#define NO_DESTINATIONINFO (NULL)
-#define POST_PROBEBLOCK_MIDDLE_LIBC_SOCK(OBJECTPTR, FDVALUE, APITYPE, MESSAGE, BYTESIZE, DESTINATIONINFO )                             \
+
+#define SOCKET_SEND_SIZE 1024
+#define NO_TOTAL_INFO (NULL)
+#define POST_PROBEBLOCK_MIDDLE_LIBC_SOCK(OBJECTPTR, FDVALUE, APITYPE, TOTAL_INFO)                              \
        do {                                                    \
                BUF_PTR = pack_int64(BUF_PTR, (uintptr_t)OBJECTPTR);            \
                BUF_PTR = pack_int64(BUF_PTR, FDVALUE);         \
                BUF_PTR = pack_int32(BUF_PTR, APITYPE);         \
-               struct sockaddr *tmp_dest = ((struct sockaddr *)DESTINATIONINFO); \
-               if ( tmp_dest != NO_DESTINATIONINFO) { \
+               struct sockaddr *tmp_dest = ((struct sockaddr *)TOTAL_INFO.sock); \
+               if ( tmp_dest != NO_TOTAL_INFO) { \
                        switch (tmp_dest->sa_family) { \
                                case AF_INET:\
                                        BUF_PTR = pack_int32(BUF_PTR, ((struct sockaddr_in *)tmp_dest)->sin_addr.s_addr ); \
                        BUF_PTR = pack_int32(BUF_PTR, (uint32_t) 0);    \
                        BUF_PTR = pack_int32(BUF_PTR, (uint32_t) 0);    \
                }; \
-               BUF_PTR = pack_string(BUF_PTR, MESSAGE);                \
+               BUF_PTR = pack_int64(BUF_PTR, TOTAL_INFO.msg_total_size);               \
+               BUF_PTR = pack_bin(BUF_PTR, TOTAL_INFO.msg_buf, TOTAL_INFO.msg_pack_size);              \
        } while (0)
 
 
 //lib Common Function
-#define AFTER_ORIGINAL_LIBC_SOCK(RVAL,OBJECTPTR, FDVALUE, APITYPE, MESSAGE, BYTESIZE, DESTINATIONINFO, INPUTFORMAT, ...)       \
+#define AFTER_ORIGINAL_LIBC_SOCK(RVAL,OBJECTPTR, FDVALUE, APITYPE, TOTAL_INFO, INPUTFORMAT, ...)       \
                POST_PROBEBLOCK_BEGIN(LC_SOCKET, RTYPE, RVAL, INPUTFORMAT, __VA_ARGS__);                \
-               POST_PROBEBLOCK_MIDDLE_LIBC_SOCK(OBJECTPTR, FDVALUE, APITYPE, MESSAGE, BYTESIZE, DESTINATIONINFO );                                                             \
+               POST_PROBEBLOCK_MIDDLE_LIBC_SOCK(OBJECTPTR, FDVALUE, APITYPE, TOTAL_INFO );                                                             \
                POST_PROBEBLOCK_END();
 
 //lib START Function
-#define AFTER_ORIGINAL_LIBC_SOCK_WAIT_FUNC_START(RVAL,OBJECTPTR, FDVALUE, APITYPE, MESSAGE, BYTESIZE, DESTINATIONINFO, INPUTFORMAT, ...)       \
+#define AFTER_ORIGINAL_LIBC_SOCK_WAIT_FUNC_START(RVAL,OBJECTPTR, FDVALUE, APITYPE, TOTAL_INFO, INPUTFORMAT, ...)       \
        POST_PROBEBLOCK_FUNC_START_BEGIN(LC_SOCKET, RTYPE, RVAL,        INPUTFORMAT, __VA_ARGS__);              \
-       POST_PROBEBLOCK_MIDDLE_LIBC_SOCK(OBJECTPTR, FDVALUE, APITYPE, MESSAGE, BYTESIZE, DESTINATIONINFO );                                                             \
+       POST_PROBEBLOCK_MIDDLE_LIBC_SOCK(OBJECTPTR, FDVALUE, APITYPE, TOTAL_INFO );                                                             \
        FLUSH_LOCAL_BUF();                                                                                                                                                                                      \
        PRE_PROBEBLOCK_END()
 
@@ -87,9 +89,9 @@
 
 
 //lib END Function
-#define AFTER_ORIGINAL_LIBC_SOCK_WAIT_FUNC_END(RVAL, OBJECTPTR, FDVALUE, APITYPE, MESSAGE, BYTESIZE, DESTINATIONINFO, INPUTFORMAT, ...)        \
+#define AFTER_ORIGINAL_LIBC_SOCK_WAIT_FUNC_END(RVAL, OBJECTPTR, FDVALUE, APITYPE, TOTAL_INFO, INPUTFORMAT, ...)        \
        POST_PROBEBLOCK_FUNC_END_BEGIN(LC_SOCKET, RTYPE, RVAL,  INPUTFORMAT, __VA_ARGS__);              \
-       POST_PROBEBLOCK_MIDDLE_LIBC_SOCK(OBJECTPTR, FDVALUE, APITYPE, MESSAGE, BYTESIZE, DESTINATIONINFO );                                                             \
+       POST_PROBEBLOCK_MIDDLE_LIBC_SOCK(OBJECTPTR, FDVALUE, APITYPE, TOTAL_INFO );                                                             \
        POST_PROBEBLOCK_END()
 
 #define POST_PROBEBLOCK_FUNC_END_BEGIN(LCTYPE, RETTYPE, RETVALUE, INPUTFORMAT, ...)    \
 
 #define DECLARE_VARIABLE_STANDARD_OSP_NET(FUNCNAME)            \
                probeInfo_t probeInfo;                          \
-               hostinfo_t hostinfo;                            \
+               info_t info;                                    \
                int blockresult;                                \
                bool bfiltering = true;                         \
                int olderrno = 0, newerrno = 0;                 \
                int32_t __attribute__((unused)) vAPI_ID = API_ID_ ## FUNCNAME /* FUNCID FIXME bad way*/; \
-               hostinfo.ip = 0;                                \
-               hostinfo.port = 0
+               INIT_INFO
 
-#define POST_PROBEBLOCK_MIDDLE_TIZEN_SOCK(OBJECTPTR, FDVALUE, APITYPE, MESSAGE, BYTESIZE, DESTINATIONINFO )                            \
+#define POST_PROBEBLOCK_MIDDLE_TIZEN_SOCK(OBJECTPTR, FDVALUE, APITYPE, TOTAL_INFO )                            \
        do {                                                                    \
                BUF_PTR = pack_int64(BUF_PTR, (uintptr_t)OBJECTPTR);            \
                BUF_PTR = pack_int64(BUF_PTR, FDVALUE);                         \
                BUF_PTR = pack_int32(BUF_PTR, APITYPE);                         \
-               BUF_PTR = pack_int32(BUF_PTR, DESTINATIONINFO.ip);              \
-               BUF_PTR = pack_int32(BUF_PTR, DESTINATIONINFO.port);            \
-               BUF_PTR = pack_string(BUF_PTR, MESSAGE);                        \
+               BUF_PTR = pack_int32(BUF_PTR, TOTAL_INFO.host_ip);              \
+               BUF_PTR = pack_int32(BUF_PTR, TOTAL_INFO.host_port);            \
+               BUF_PTR = pack_int64(BUF_PTR, TOTAL_INFO.msg_total_size);       \
+               BUF_PTR = pack_bin(BUF_PTR, TOTAL_INFO.msg_buf, TOTAL_INFO.msg_pack_size);                      \
        } while (0)
 
 
 
 
 //Tizen Common Function
-#define AFTER_ORIGINAL_TIZEN_SOCK(APINAME, RTYPE, RVAL,OBJECTPTR, FDVALUE, APITYPE, MESSAGE, BYTESIZE, DESTINATIONINFO, INPUTFORMAT, ...)      \
-       POST_PROBEBLOCK_TIZEN_BEGIN(APINAME, LC_SOCKET, RTYPE, RVAL,    INPUTFORMAT, __VA_ARGS__);              \
-       POST_PROBEBLOCK_MIDDLE_TIZEN_SOCK(OBJECTPTR, FDVALUE, APITYPE, MESSAGE, BYTESIZE, DESTINATIONINFO );                                                            \
+#define AFTER_ORIGINAL_TIZEN_SOCK(APINAME, RTYPE, RVAL, OBJECTPTR, FDVALUE, APITYPE, TOTAL_INFO, INPUTFORMAT, ...)     \
+       POST_PROBEBLOCK_TIZEN_BEGIN(APINAME, LC_SOCKET, RTYPE, RVAL, INPUTFORMAT, __VA_ARGS__);         \
+       POST_PROBEBLOCK_MIDDLE_TIZEN_SOCK(OBJECTPTR, FDVALUE, APITYPE, TOTAL_INFO );                                                            \
        POST_PROBEBLOCK_END()
 
 // Tizen Start Function
-#define AFTER_ORIGINAL_TIZEN_SOCK_WAIT_FUNC_START(APINAME,RTYPE, RVAL,OBJECTPTR, FDVALUE, APITYPE, MESSAGE, BYTESIZE, DESTINATIONINFO, INPUTFORMAT, ...)       \
-       POST_PROBEBLOCK_TIZEN_FUNC_START_BEGIN(APINAME,LC_SOCKET, RTYPE, RVAL,  INPUTFORMAT, __VA_ARGS__);              \
-       POST_PROBEBLOCK_MIDDLE_TIZEN_SOCK(OBJECTPTR, FDVALUE, APITYPE, MESSAGE, BYTESIZE,DESTINATIONINFO );                                                             \
+#define AFTER_ORIGINAL_TIZEN_SOCK_WAIT_FUNC_START(APINAME, RTYPE, RVAL,OBJECTPTR, FDVALUE, APITYPE, TOTAL_INFO, INPUTFORMAT, ...)      \
+       POST_PROBEBLOCK_TIZEN_FUNC_START_BEGIN(APINAME,LC_SOCKET, RTYPE, RVAL, INPUTFORMAT, __VA_ARGS__);               \
+       POST_PROBEBLOCK_MIDDLE_TIZEN_SOCK(OBJECTPTR, FDVALUE, APITYPE, TOTAL_INFO );                                                            \
+       FLUSH_LOCAL_BUF();                                              \
        PRE_PROBEBLOCK_END();
 
 //Tizen END Function
-#define AFTER_ORIGINAL_TIZEN_SOCK_WAIT_FUNC_END(APINAME,RTYPE, RVAL,OBJECTPTR, FDVALUE, APITYPE, MESSAGE, BYTESIZE, DESTINATIONINFO, INPUTFORMAT, ...) \
-       POST_PROBEBLOCK_TIZEN_FUNC_END_BEGIN(APINAME,LC_SOCKET, RTYPE, RVAL,    INPUTFORMAT, __VA_ARGS__);              \
-       POST_PROBEBLOCK_MIDDLE_TIZEN_SOCK(OBJECTPTR, FDVALUE, APITYPE, MESSAGE, BYTESIZE,DESTINATIONINFO );                                                             \
+#define AFTER_ORIGINAL_TIZEN_SOCK_WAIT_FUNC_END(APINAME,RTYPE, RVAL,OBJECTPTR, FDVALUE, APITYPE, TOTAL_INFO, INPUTFORMAT, ...) \
+       POST_PROBEBLOCK_TIZEN_FUNC_END_BEGIN(APINAME,LC_SOCKET, RTYPE, RVAL, INPUTFORMAT, __VA_ARGS__);         \
+       POST_PROBEBLOCK_MIDDLE_TIZEN_SOCK(OBJECTPTR, FDVALUE, APITYPE, TOTAL_INFO );                                                            \
        POST_PROBEBLOCK_END()
 
 #define POST_PROBEBLOCK_TIZEN_BEGIN(APINAME, LCTYPE, RETTYPE, RETVALUE, INPUTFORMAT, ...)      \
        __appendTypeLog(&log, 4, NULL, RETTYPE, RETVALUE, VT_INT, 0,            \
                        VT_INT, newerrno, VT_INT, blockresult)
 
-#define BEFORE_ORIGINAL_SOCK(FUNCNAME, LIBNAME)        \
-       DECLARE_VARIABLE_STANDARD;      \
-       int32_t __attribute__((unused)) vAPI_ID = API_ID_ ## FUNCNAME; \
-       GET_REAL_FUNC(FUNCNAME, LIBNAME);               \
+#define BEFORE_ORIGINAL_SOCK(FUNCNAME, LIBNAME)                                \
+       DECLARE_VARIABLE_STANDARD;                                      \
+       info_t info;                                                    \
+       INIT_INFO;                                                      \
+       int32_t __attribute__((unused)) vAPI_ID = API_ID_ ## FUNCNAME;  \
+       GET_REAL_FUNC(FUNCNAME, LIBNAME);                               \
        PRE_PROBEBLOCK()
 
 #endif // __DA_SOCKET_H__
index 47ffd85ca27be1aeb53a38e5119dfa5dcccc5d33..a3fb2f527a5340e3426218be24266f03312e6433 100644 (file)
@@ -80,8 +80,8 @@ int socket(int domain, int type, int protocol) {
        BEFORE_ORIGINAL_SOCK(socket, LIBC);
        ret = socketp(domain, type, protocol);
 
-       AFTER_ORIGINAL_LIBC_SOCK(ret, OBJ_DUMMY, ret, SOCKET_API_FD_OPEN, "",
-                       0, NO_DESTINATIONINFO, "ddd", domain, type, protocol);
+       AFTER_ORIGINAL_LIBC_SOCK(ret, OBJ_DUMMY, ret, SOCKET_API_FD_OPEN, info,
+                                "ddd", domain, type, protocol);
 
        return ret;
 }
@@ -95,13 +95,14 @@ int accept(int socket, struct sockaddr *address, socklen_t *address_len) {
 
        char* callAddress = getAddress(address);
        AFTER_ORIGINAL_LIBC_SOCK_WAIT_FUNC_START(NULL, OBJ_DUMMY, socket,
-                       SOCKET_API_ACCEPT_START, "", 0, address, "dsp",
+                       SOCKET_API_ACCEPT_START, info, "dsp",
                        socket, callAddress, address_len);
 
        ret = acceptp(socket, address, address_len);
+       info.sock = (struct sockaddr *)address;
 
        AFTER_ORIGINAL_LIBC_SOCK_WAIT_FUNC_END(ret, OBJ_DUMMY, socket,
-                       SOCKET_API_ACCEPT_END, "", 0, address, "dsp",
+                       SOCKET_API_ACCEPT_END, info, "dsp",
                        socket, callAddress, address_len);
 
        return ret;
@@ -115,13 +116,14 @@ int accept4(int sockfd, struct sockaddr *addr, socklen_t *addrlen, int flags) {
        char* callAddress = getAddress(addr);
 
        AFTER_ORIGINAL_LIBC_SOCK_WAIT_FUNC_START(NULL, OBJ_DUMMY, sockfd,
-                       SOCKET_API_ACCEPT_START, "", 0, addr, "dspd",
+                       SOCKET_API_ACCEPT_START, info, "dspd",
                        sockfd, callAddress, addrlen, flags);
 
        ret = accept4p(sockfd, addr, addrlen, flags);
+       info.sock = (struct sockaddr *)addr;
 
        AFTER_ORIGINAL_LIBC_SOCK_WAIT_FUNC_END(ret, OBJ_DUMMY, sockfd,
-                       SOCKET_API_ACCEPT_END, "", 0, addr, "dspd",
+                       SOCKET_API_ACCEPT_END, info,  "dspd",
                        sockfd, callAddress, addrlen, flags);
 
        return ret;
@@ -134,9 +136,10 @@ int connect(int socket, const struct sockaddr *address, socklen_t address_len) {
        BEFORE_ORIGINAL_SOCK(connect, LIBC);
 
        ret = connectp(socket, address, address_len);
+       info.sock = (struct sockaddr *)address;
 
        AFTER_ORIGINAL_LIBC_SOCK(ret, OBJ_DUMMY, socket, SOCKET_API_CONNECT,
-                       "", 0, address, "dsd",
+                       info, "dsd",
                        socket, getAddress(address), address_len);
 
        return ret;
@@ -150,7 +153,7 @@ int shutdown(int socket, int how) {
        ret = shutdownp(socket, how);
 
        AFTER_ORIGINAL_LIBC_SOCK(ret, OBJ_DUMMY, socket, SOCKET_API_FD_CLOSE,
-                       "", 0, NO_DESTINATIONINFO, "dd", socket, how);
+                       info, "dd", socket, how);
 
        return ret;
 }
@@ -162,10 +165,10 @@ int bind(int socket, const struct sockaddr *address, socklen_t address_len) {
        BEFORE_ORIGINAL_SOCK(bind, LIBC);
 
        ret = bindp(socket, address, address_len);
+       info.sock = (struct sockaddr *)address;
 
-       AFTER_ORIGINAL_LIBC_SOCK(ret, OBJ_DUMMY, socket, SOCKET_API_BIND, "",
-                       0, address, "dsd",
-                       socket, getAddress(address), address_len);
+       AFTER_ORIGINAL_LIBC_SOCK(ret, OBJ_DUMMY, socket, SOCKET_API_BIND,
+                       info, "dsd", socket, getAddress(address), address_len);
 
        return ret;
 }
@@ -175,8 +178,8 @@ int listen(int socket, int backlog) {
        BEFORE_ORIGINAL_SOCK(listen, LIBC);
        ret = listenp(socket, backlog);
 
-       AFTER_ORIGINAL_LIBC_SOCK(ret, OBJ_DUMMY, socket, SOCKET_API_LISTEN, "",
-                       0, NO_DESTINATIONINFO, "dd", socket, backlog);
+       AFTER_ORIGINAL_LIBC_SOCK(ret, OBJ_DUMMY, socket, SOCKET_API_LISTEN,
+                                info, "dd", socket, backlog);
 
        return ret;
 }
@@ -184,74 +187,52 @@ int listen(int socket, int backlog) {
 ssize_t send(int socket, const void *message, size_t length, int flags) {
        static ssize_t (*sendp)(int socket, const void *message, size_t length,
                        int flags);
-       ssize_t sret;
+       ssize_t sret, result;
        BEFORE_ORIGINAL_SOCK(send, LIBC);
 
-       int* messagP = (int*) message;
+       char *messagP = (char *)message;
 
        AFTER_ORIGINAL_LIBC_SOCK_WAIT_FUNC_START(NULL, OBJ_DUMMY, socket,
-                       SOCKET_API_SEND_START, "", 0, NO_DESTINATIONINFO, "dpdd",
+                       SOCKET_API_SEND_START, info, "dpdd",
                        socket, messagP, length, flags);
 
        sret = sendp(socket, message, length, flags);
-
-       int sendMaxSize = SOCKET_SEND_SIZE;
-       char* out = (char*) malloc(sendMaxSize + 5);
-       if (sret <= 0) {
-               out[0] = '\0';
-       } else {
-               memcpy(out, message, sendMaxSize + 5);
-               if (sret > sendMaxSize + 5) {
-                       out[sendMaxSize] = '.';
-                       out[sendMaxSize + 1] = '.';
-                       out[sendMaxSize + 2] = '.';
-                       out[sendMaxSize + 3] = '\0';
-               } else {
-                       out[sret] = '\0';
-               }
-       }
+       result = sret;
+       if (result < 0)
+               result = 0;
+       info.msg_total_size = result;
+       info.msg_pack_size = result>SOCKET_SEND_SIZE?SOCKET_SEND_SIZE:result;
+       info.msg_buf = messagP;
 
        AFTER_ORIGINAL_LIBC_SOCK_WAIT_FUNC_END(sret, OBJ_DUMMY, socket,
-                       SOCKET_API_SEND_END, out, sret, NO_DESTINATIONINFO, "dpdd",
+                       SOCKET_API_SEND_END, info, "dpdd",
                        socket, messagP, length, flags);
-       free(out);
        return sret;
 }
 
 ssize_t recv(int socket, void *buffer, size_t length, int flags) {
        static ssize_t (*recvp)(int socket, void *buffer, size_t length, int flags);
-       ssize_t sret;
+       ssize_t sret, result;
 
        BEFORE_ORIGINAL_SOCK(recv, LIBC);
 
-       int* bufferP = (int*) buffer;
+       char *bufferP = (char *)buffer;
 
        AFTER_ORIGINAL_LIBC_SOCK_WAIT_FUNC_START(NULL, OBJ_DUMMY, socket,
-                       SOCKET_API_RECV_START, "", 0, NO_DESTINATIONINFO, "dpdd",
+                       SOCKET_API_RECV_START, info, "dpdd",
                        socket, bufferP, length, flags);
 
        sret = recvp(socket, buffer, length, flags);
-
-       int sendMaxSize = SOCKET_SEND_SIZE;
-       char* out = (char*) malloc(sendMaxSize + 5);
-       if (sret <= 0) {
-               out[0] = '\0';
-       } else {
-               memcpy(out, buffer, sendMaxSize + 5);
-               if (sret > sendMaxSize + 5) {
-                       out[sendMaxSize] = '.';
-                       out[sendMaxSize + 1] = '.';
-                       out[sendMaxSize + 2] = '.';
-                       out[sendMaxSize + 3] = '\0';
-               } else {
-                       out[sret] = '\0';
-               }
-       }
+       result = sret;
+       if (result < 0)
+               result = 0;
+       info.msg_total_size = result;
+       info.msg_pack_size = result>SOCKET_SEND_SIZE?SOCKET_SEND_SIZE:result;
+       info.msg_buf = bufferP;
 
        AFTER_ORIGINAL_LIBC_SOCK_WAIT_FUNC_END(sret, OBJ_DUMMY, socket,
-                       SOCKET_API_RECV_END, out, sret, NO_DESTINATIONINFO, "dpdd",
+                       SOCKET_API_RECV_END, info, "dpdd",
                        socket, bufferP, length, flags);
-       free(out);
        return sret;
 }
 
@@ -259,38 +240,28 @@ ssize_t sendto(int socket, const void *message, size_t length, int flags,
                const struct sockaddr *dest_addr, socklen_t dest_len) {
        static ssize_t (*sendtop)(int socket, const void *message, size_t length,
                        int flags, const struct sockaddr *dest_addr, socklen_t dest_len);
-       ssize_t sret;
+       ssize_t sret, result;
 
        BEFORE_ORIGINAL_SOCK(sendto, LIBC);
 
-       int* bufferP = (int*) message;
+       char *bufferP = (char *)message;
+       info.sock = (struct sockaddr *) dest_addr;
 
        AFTER_ORIGINAL_LIBC_SOCK_WAIT_FUNC_START(NULL, OBJ_DUMMY, socket,
-                       SOCKET_API_SEND_START, "", 0, dest_addr, "dpddpd",
+                       SOCKET_API_SEND_START, info, "dpddpd",
                        socket, bufferP, length, flags, dest_addr, dest_len);
 
        sret = sendtop(socket, message, length, flags, dest_addr, dest_len);
-
-       int sendMaxSize = SOCKET_SEND_SIZE;
-       char* out = (char*) malloc(sendMaxSize + 5);
-       if (sret <= 0) {
-               out[0] = '\0';
-       } else {
-               memcpy(out, message, sendMaxSize + 5);
-               if (sret > sendMaxSize + 5) {
-                       out[sendMaxSize] = '.';
-                       out[sendMaxSize + 1] = '.';
-                       out[sendMaxSize + 2] = '.';
-                       out[sendMaxSize + 3] = '\0';
-               } else {
-                       out[sret] = '\0';
-               }
-       }
+       result = sret;
+       if (result < 0)
+               result = 0;
+       info.msg_total_size = result;
+       info.msg_pack_size = result>SOCKET_SEND_SIZE?SOCKET_SEND_SIZE:result;
+       info.msg_buf = bufferP;
 
        AFTER_ORIGINAL_LIBC_SOCK_WAIT_FUNC_END(sret, OBJ_DUMMY, socket,
-                       SOCKET_API_SEND_END, out, sret, NO_DESTINATIONINFO, "dpddpd",
+                       SOCKET_API_SEND_END, info, "dpddpd",
                        socket, bufferP, length, flags, dest_addr, dest_len);
-       free(out);
        return sret;
 }
 
@@ -298,38 +269,29 @@ ssize_t recvfrom(int socket, void *buffer, size_t length, int flags,
                struct sockaddr *address, socklen_t *address_len) {
        static ssize_t (*recvfromp)(int socket, void *buffer, size_t length,
                        int flags, struct sockaddr *address, socklen_t *address_len);
-       ssize_t sret;
+       ssize_t sret, result;
 
        BEFORE_ORIGINAL_SOCK(recvfrom, LIBC);
 
-       int* bufferP = (int*) buffer;
+       char *bufferP = (char *)buffer;
 
        AFTER_ORIGINAL_LIBC_SOCK_WAIT_FUNC_START(NULL, OBJ_DUMMY, socket,
-                       SOCKET_API_RECV_START, "", 0, NO_DESTINATIONINFO, "dpddpp",
+                       SOCKET_API_RECV_START, info, "dpddpp",
                        socket, bufferP, length, flags, address, address_len);
 
        sret = recvfromp(socket, buffer, length, flags, address, address_len);
+       info.sock = (struct sockaddr *)address;
 
-       int sendMaxSize = SOCKET_SEND_SIZE;
-       char* out = (char*) malloc(sendMaxSize + 5);
-       if (sret <= 0) {
-               out[0] = '\0';
-       } else {
-               memcpy(out, buffer, sendMaxSize + 5);
-               if (sret > sendMaxSize + 5) {
-                       out[sendMaxSize] = '.';
-                       out[sendMaxSize + 1] = '.';
-                       out[sendMaxSize + 2] = '.';
-                       out[sendMaxSize + 3] = '\0';
-               } else {
-                       out[sret] = '\0';
-               }
-       }
+       result = sret;
+       if (result < 0)
+               result = 0;
+       info.msg_total_size = result;
+       info.msg_pack_size = result>SOCKET_SEND_SIZE?SOCKET_SEND_SIZE:result;
+       info.msg_buf = bufferP;
 
        AFTER_ORIGINAL_LIBC_SOCK_WAIT_FUNC_END(sret, OBJ_DUMMY, socket,
-                       SOCKET_API_RECV_END, out, sret, NO_DESTINATIONINFO, "dpddpp",
+                       SOCKET_API_RECV_END, info, "dpddpp",
                        socket, bufferP, length, flags, address, address_len);
-       free(out);
        return sret;
 }
 
@@ -342,7 +304,7 @@ ssize_t recvmsg(int socket, struct msghdr *message, int flags) {
        int* bufferP = (int*) message->msg_name;
 
        AFTER_ORIGINAL_LIBC_SOCK_WAIT_FUNC_START(NULL, OBJ_DUMMY, socket,
-                       SOCKET_API_RECV_START, "", 0, NO_DESTINATIONINFO, "dpd",
+                       SOCKET_API_RECV_START, info, "dpd",
                        socket, message, flags);
 
        sret = recvmsgp(socket, message, flags);
@@ -367,7 +329,7 @@ ssize_t recvmsg(int socket, struct msghdr *message, int flags) {
        }
 
        AFTER_ORIGINAL_LIBC_SOCK_WAIT_FUNC_END(sret, OBJ_DUMMY, socket,
-                       SOCKET_API_RECV_END, out, sret, NO_DESTINATIONINFO, "dpd",
+                       SOCKET_API_RECV_END, info, "dpd",
                        socket, bufferP, flags);
        free(out);
        return sret;
@@ -383,7 +345,7 @@ ssize_t sendmsg(int socket, const struct msghdr *message, int flags) {
        int* bufferP = (int*) message->msg_name;
 
        AFTER_ORIGINAL_LIBC_SOCK_WAIT_FUNC_START(NULL, OBJ_DUMMY, socket,
-                       SOCKET_API_SEND_START, "", 0, NO_DESTINATIONINFO, "dpd",
+                       SOCKET_API_SEND_START, info, "dpd",
                        socket, message, flags);
 
        sret = sendmsgp(socket, message, flags);
@@ -407,7 +369,7 @@ ssize_t sendmsg(int socket, const struct msghdr *message, int flags) {
        }
 
        AFTER_ORIGINAL_LIBC_SOCK_WAIT_FUNC_END(sret, OBJ_DUMMY, socket,
-                       SOCKET_API_SEND_END, out, sret, NO_DESTINATIONINFO, "dpd",
+                       SOCKET_API_SEND_END, info, "dpd",
                        socket, bufferP, flags);
        free(out);
        return sret;
@@ -422,9 +384,9 @@ int getsockopt(int socket, int level, int option_name, void *option_value,
 
        ret = getsockoptp(socket, level, option_name, option_value, option_len);
 
-       AFTER_ORIGINAL_LIBC_SOCK(ret, OBJ_DUMMY, socket, SOCKET_API_OTHER, "",
-                       0, NO_DESTINATIONINFO, "dddpp",
-                       socket, level, option_name, option_value, option_len);
+       AFTER_ORIGINAL_LIBC_SOCK(ret, OBJ_DUMMY, socket, SOCKET_API_OTHER, info,
+                                "dddpp", socket, level, option_name,
+                                option_value, option_len);
 
        return ret;
 }
@@ -438,9 +400,9 @@ int setsockopt(int socket, int level, int option_name, const void *option_value,
 
        ret = setsockoptp(socket, level, option_name, option_value, option_len);
 
-       AFTER_ORIGINAL_LIBC_SOCK(ret, OBJ_DUMMY, socket, SOCKET_API_OTHER, "",
-                       0, NO_DESTINATIONINFO, "dddpd",
-                       socket, level, option_name, option_value, option_len);
+       AFTER_ORIGINAL_LIBC_SOCK(ret, OBJ_DUMMY, socket, SOCKET_API_OTHER, info,
+                                "dddpd", socket, level, option_name,
+                                option_value, option_len);
 
        return ret;
 }
@@ -451,9 +413,10 @@ int getpeername(int fd, struct sockaddr *addr, socklen_t *len) {
        BEFORE_ORIGINAL_SOCK(getpeername, LIBC);
 
        ret = getpeernamep(fd, addr, len);
+       info.sock = (struct sockaddr *)addr;
 
-       AFTER_ORIGINAL_LIBC_SOCK(ret, OBJ_DUMMY, fd, SOCKET_API_OTHER, "", 0,
-                       getAddress(addr), "dsp", fd, getAddress(addr), len);
+       AFTER_ORIGINAL_LIBC_SOCK(ret, OBJ_DUMMY, fd, SOCKET_API_OTHER, info,
+                                "dsp", fd, getAddress(addr), len);
        return ret;
 }
 
@@ -464,10 +427,10 @@ int getsockname(int sockfd, struct sockaddr *addr, socklen_t *addrlen) {
        BEFORE_ORIGINAL_SOCK(getsockname, LIBC);
 
        ret = getsocknamep(sockfd, addr, addrlen);
+       info.sock = (struct sockaddr *)addr;
 
-       AFTER_ORIGINAL_LIBC_SOCK(ret, OBJ_DUMMY, sockfd, SOCKET_API_OTHER, "",
-                       0, getAddress(addr), "dsp",
-                       sockfd, getAddress(addr), addrlen);
+       AFTER_ORIGINAL_LIBC_SOCK(ret, OBJ_DUMMY, sockfd, SOCKET_API_OTHER, info,
+                                "dsp", sockfd, getAddress(addr), addrlen);
 
        return ret;
 }
@@ -481,7 +444,7 @@ int socketpair(int domain, int type, int protocol, int socket_vector[2]) {
        ret = socketpairp(domain, type, protocol, socket_vector);
 
        AFTER_ORIGINAL_LIBC_SOCK(ret, OBJ_DUMMY, socket_vector[0],
-                       SOCKET_API_FD_OPEN, "", 0, NO_DESTINATIONINFO, "ddddd",
+                       SOCKET_API_FD_OPEN, info, "ddddd",
                        domain, type, protocol, socket_vector[0], socket_vector[1]);
 
        return ret;
@@ -495,7 +458,7 @@ int sockatmark(int __fd) {
        ret = sockatmarkp(__fd);
 
        AFTER_ORIGINAL_LIBC_SOCK(ret, OBJ_DUMMY, __fd,
-                       SOCKET_API_OTHER, "", 0, NO_DESTINATIONINFO, "d", __fd);
+                       SOCKET_API_OTHER, info, "d", __fd);
        return ret;
 }
 
@@ -506,8 +469,8 @@ int isfdtype(int __fd, int __fdtype) {
 
        ret = isfdtypep(__fd, __fdtype);
 
-       AFTER_ORIGINAL_LIBC_SOCK(ret, OBJ_DUMMY, __fd, SOCKET_API_OTHER, "", 0,
-                       NO_DESTINATIONINFO, "dd", __fd, __fdtype);
+       AFTER_ORIGINAL_LIBC_SOCK(ret, OBJ_DUMMY, __fd, SOCKET_API_OTHER, info,
+                                "dd", __fd, __fdtype);
        return ret;
 }
 
@@ -519,13 +482,13 @@ int select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
        BEFORE_ORIGINAL_SOCK(select, LIBC);
 
        AFTER_ORIGINAL_LIBC_SOCK_WAIT_FUNC_START(NULL, OBJ_DUMMY, 0,
-                       SOCKET_API_EVENT_START, "", 0, NO_DESTINATIONINFO, "dpppp",
+                       SOCKET_API_EVENT_START, info, "dpppp",
                        nfds, readfds, writefds, exceptfds, timeout);
 
        ret = selectp(nfds, readfds, writefds, exceptfds, timeout);
 
        AFTER_ORIGINAL_LIBC_SOCK_WAIT_FUNC_END(ret, OBJ_DUMMY, 0,
-                       SOCKET_API_EVENT_END, "", 0, NO_DESTINATIONINFO, "dpppp",
+                       SOCKET_API_EVENT_END, info, "dpppp",
                        nfds, readfds, writefds, exceptfds, timeout);
 
        return ret;
@@ -540,13 +503,13 @@ int pselect(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
        BEFORE_ORIGINAL_SOCK(pselect, LIBC);
 
        AFTER_ORIGINAL_LIBC_SOCK_WAIT_FUNC_START(NULL, OBJ_DUMMY, 0,
-                       SOCKET_API_EVENT_START, "", 0, NO_DESTINATIONINFO, "dppppp",
+                       SOCKET_API_EVENT_START, info, "dppppp",
                        nfds, readfds, writefds, exceptfds, ntimeout, sigmask);
 
        ret = pselectp(nfds, readfds, writefds, exceptfds, ntimeout, sigmask);
 
        AFTER_ORIGINAL_LIBC_SOCK_WAIT_FUNC_END(ret, OBJ_DUMMY, 0,
-                       SOCKET_API_EVENT_END, "", 0, NO_DESTINATIONINFO, "dppppp",
+                       SOCKET_API_EVENT_END, info, "dppppp",
                        nfds, readfds, writefds, exceptfds, ntimeout, sigmask);
 
        return ret;
@@ -558,13 +521,13 @@ int poll(struct pollfd *fds, nfds_t nfds, int timeout) {
        BEFORE_ORIGINAL_SOCK(poll, LIBC);
 
        AFTER_ORIGINAL_LIBC_SOCK_WAIT_FUNC_START(NULL, OBJ_DUMMY, fds->fd,
-                       SOCKET_API_EVENT_START, "", 0, NO_DESTINATIONINFO, "pxd",
+                       SOCKET_API_EVENT_START, info, "pxd",
                        fds, nfds, timeout);
 
        ret = pollp(fds, nfds, timeout);
 
        AFTER_ORIGINAL_LIBC_SOCK_WAIT_FUNC_END(ret, OBJ_DUMMY, fds->fd,
-                       SOCKET_API_EVENT_END, "", 0, NO_DESTINATIONINFO, "pxd", fds, nfds, timeout);
+                       SOCKET_API_EVENT_END, info, "pxd", fds, nfds, timeout);
 
        return ret;
 }
@@ -577,13 +540,13 @@ int ppoll(struct pollfd *fds, nfds_t nfds, const struct timespec *timeout_ts,
        BEFORE_ORIGINAL_SOCK(ppoll, LIBC);
 
        AFTER_ORIGINAL_LIBC_SOCK_WAIT_FUNC_START(NULL, OBJ_DUMMY, fds->fd,
-                       SOCKET_API_EVENT_START, "", 0, NO_DESTINATIONINFO, "pxpp",
+                       SOCKET_API_EVENT_START, info, "pxpp",
                        fds, nfds, timeout_ts, sigmask);
 
        ret = ppollp(fds, nfds, timeout_ts, sigmask);
 
        AFTER_ORIGINAL_LIBC_SOCK_WAIT_FUNC_END(ret, OBJ_DUMMY, fds->fd,
-                       SOCKET_API_EVENT_END, "", 0, NO_DESTINATIONINFO, "pxpp",
+                       SOCKET_API_EVENT_END, info, "pxpp",
                        fds, nfds, timeout_ts, sigmask);
 
        return ret;
@@ -595,8 +558,8 @@ int epoll_create(int __size) {
 
        ret = epoll_createp(__size);
 
-       AFTER_ORIGINAL_LIBC_SOCK(ret, OBJ_DUMMY, ret, SOCKET_API_FD_OPEN, "",
-                       0, NO_DESTINATIONINFO, "d", __size);
+       AFTER_ORIGINAL_LIBC_SOCK(ret, OBJ_DUMMY, ret, SOCKET_API_FD_OPEN, info,
+                                "d", __size);
        return ret;
 }
 
@@ -606,8 +569,8 @@ int epoll_create1(int __flags) {
 
        ret = epoll_create1p(__flags);
 
-       AFTER_ORIGINAL_LIBC_SOCK(ret, OBJ_DUMMY, ret, SOCKET_API_FD_OPEN, "",
-                       0, NO_DESTINATIONINFO, "d", __flags);
+       AFTER_ORIGINAL_LIBC_SOCK(ret, OBJ_DUMMY, ret, SOCKET_API_FD_OPEN, info,
+                                "d", __flags);
        return ret;
 }
 
@@ -618,13 +581,13 @@ int epoll_wait(int __epfd, struct epoll_event *__events, int __maxevents,
        BEFORE_ORIGINAL_SOCK(epoll_wait, LIBC);
 
        AFTER_ORIGINAL_LIBC_SOCK_WAIT_FUNC_START(NULL, OBJ_DUMMY, __epfd,
-                       SOCKET_API_EVENT_START, "", 0, NO_DESTINATIONINFO, "dpdd",
+                       SOCKET_API_EVENT_START, info, "dpdd",
                        __epfd, __events, __maxevents, __timeout);
 
        ret = epoll_waitp(__epfd, __events, __maxevents, __timeout);
 
        AFTER_ORIGINAL_LIBC_SOCK_WAIT_FUNC_END(ret, OBJ_DUMMY, __epfd,
-                       SOCKET_API_EVENT_END, "", 0, NO_DESTINATIONINFO, "dpdd",
+                       SOCKET_API_EVENT_END, info, "dpdd",
                        __epfd, __events, __maxevents, __timeout);
 
        return ret;
@@ -637,13 +600,13 @@ int epoll_pwait(int __epfd, struct epoll_event *__events, int __maxevents,
        BEFORE_ORIGINAL_SOCK(epoll_pwait, LIBC);
 
        AFTER_ORIGINAL_LIBC_SOCK_WAIT_FUNC_START(NULL, OBJ_DUMMY, __epfd,
-                       SOCKET_API_EVENT_START, "", 0, NO_DESTINATIONINFO, "dpdd %p",
+                       SOCKET_API_EVENT_START, info, "dpdd %p",
                        __epfd, __events, __maxevents, __timeout, __ss);
 
        ret = epoll_pwaitp(__epfd, __events, __maxevents, __timeout, __ss);
 
        AFTER_ORIGINAL_LIBC_SOCK_WAIT_FUNC_END(ret, OBJ_DUMMY, __epfd,
-                       SOCKET_API_EVENT_END, "", 0, NO_DESTINATIONINFO, "dpdd %p",
+                       SOCKET_API_EVENT_END, info, "dpdd %p",
                        __epfd, __events, __maxevents, __timeout, __ss);
 
        return ret;
@@ -657,8 +620,8 @@ int epoll_ctl(int __epfd, int __op, int __fd, struct epoll_event *__event) {
 
        ret = epoll_ctlp(__epfd, __op, __fd, __event);
 
-       AFTER_ORIGINAL_LIBC_SOCK(ret, OBJ_DUMMY, __fd, SOCKET_API_OTHER, "", 0,
-                       NO_DESTINATIONINFO, "dddp", __epfd, __op, __fd, __event);
+       AFTER_ORIGINAL_LIBC_SOCK(ret, OBJ_DUMMY, __fd, SOCKET_API_OTHER, info,
+                                "dddp", __epfd, __op, __fd, __event);
        return ret;
 }
 
@@ -674,7 +637,7 @@ uint32_t htonl(uint32_t hostlong) {
        uret = htonlp(hostlong);
 
        AFTER_ORIGINAL_LIBC_SOCK(VT_UINT32_T, uret, OBJ_DUMMY, 0, SOCKET_API_OTHER,
-                       NO_DESTINATIONINFO, "", "d", hostlong);
+                       info "d", hostlong);
 
        return uret;
 }
@@ -688,7 +651,7 @@ uint16_t htons(uint16_t hostshort) {
        uret = htonsp(hostshort);
 
        AFTER_ORIGINAL_LIBC_SOCK(VT_UINT16_T, uret, OBJ_DUMMY, 0, SOCKET_API_OTHER,
-                       NO_DESTINATIONINFO, "", "d", hostshort);
+                       info "d", hostshort);
 
        return uret;
 }
@@ -700,8 +663,8 @@ int inet_aton(const char *cp, struct in_addr *inp) {
 
        ret = inet_atonp(cp, inp);
 
-       AFTER_ORIGINAL_LIBC_SOCK(ret, OBJ_DUMMY, 0, SOCKET_API_OTHER, "",
-                       NO_DESTINATIONINFO, "pp", cp, inp);
+       AFTER_ORIGINAL_LIBC_SOCK(ret, OBJ_DUMMY, 0, SOCKET_API_OTHER,
+                       info, "pp", cp, inp);
 
        return ret;
 }
@@ -714,8 +677,8 @@ in_addr_t inet_addr(const char *cp) {
 
        iret = inet_addrp(cp);
 
-       AFTER_ORIGINAL_LIBC_SOCK(iret, OBJ_DUMMY, 0, SOCKET_API_OTHER, "",
-                       NO_DESTINATIONINFO, "p", cp);
+       AFTER_ORIGINAL_LIBC_SOCK(iret, OBJ_DUMMY, 0, SOCKET_API_OTHER,
+                       info, "p", cp);
 
        return iret;
 }
@@ -728,8 +691,8 @@ in_addr_t inet_network(const char *cp) {
 
        iret = inet_networkp(cp);
 
-       AFTER_ORIGINAL_LIBC_SOCK(iret, OBJ_DUMMY, 0, SOCKET_API_OTHER, "",
-                       NO_DESTINATIONINFO, "p", cp);
+       AFTER_ORIGINAL_LIBC_SOCK(iret, OBJ_DUMMY, 0, SOCKET_API_OTHER,
+                       info, "p", cp);
 
        return iret;
 }
@@ -742,8 +705,8 @@ char *inet_ntoa(struct in_addr in) {
 
        sret = inet_ntoap(in);
 
-       AFTER_ORIGINAL_LIBC_SOCK(sret, OBJ_DUMMY, 0, SOCKET_API_OTHER, "",
-                       NO_DESTINATIONINFO, "d", in.s_addr);
+       AFTER_ORIGINAL_LIBC_SOCK(sret, OBJ_DUMMY, 0, SOCKET_API_OTHER,
+                       info, "d", in.s_addr);
 
        return sret;
 }
@@ -757,7 +720,7 @@ uint32_t ntohl(uint32_t netlong) {
        uret = ntohlp(netlong);
 
        AFTER_ORIGINAL_LIBC_SOCK(VT_UINT32_T, uret, OBJ_DUMMY, 0, SOCKET_API_OTHER,
-                       NO_DESTINATIONINFO, "", "d", netlong);
+                       info "d", netlong);
 
        return uret;
 }
@@ -771,7 +734,7 @@ uint16_t ntohs(uint16_t netshort) {
        uret = ntohsp(netshort);
 
        AFTER_ORIGINAL_LIBC_SOCK(VT_UINT16_T, uret, OBJ_DUMMY, 0, SOCKET_API_OTHER,
-                       NO_DESTINATIONINFO, "", "d", netshort);
+                       info "d", netshort);
 
        return uret;
 }
@@ -785,7 +748,7 @@ in_addr_t inet_lnaof(struct in_addr in) {
        iret = inet_lnaofp(in);
 
        AFTER_ORIGINAL_LIBC_SOCK(VT_UINT32_T, iret, OBJ_DUMMY, 0, SOCKET_API_OTHER,
-                       NO_DESTINATIONINFO, "", "d", in.s_addr);
+                       info "d", in.s_addr);
 
        return iret;
 }
@@ -799,7 +762,7 @@ in_addr_t inet_netof(struct in_addr in) {
        iret = inet_netofp(in);
 
        AFTER_ORIGINAL_LIBC_SOCK(VT_UINT32_T, iret, OBJ_DUMMY, 0, SOCKET_API_OTHER,
-                       NO_DESTINATIONINFO, "", "d", in.s_addr);
+                       info "d", in.s_addr);
 
        return iret;
 }
@@ -813,8 +776,8 @@ const char *inet_ntop(int af, const void *src, char *dst, socklen_t size) {
 
        cret = inet_ntopp(af, src, dst, size);
 
-       AFTER_ORIGINAL_LIBC_SOCK(cret, OBJ_DUMMY, 0, SOCKET_API_OTHER, "",
-                       NO_DESTINATIONINFO, "dppd", af, src, dst, size);
+       AFTER_ORIGINAL_LIBC_SOCK(cret, OBJ_DUMMY, 0, SOCKET_API_OTHER,
+                       info, "dppd", af, src, dst, size);
 
        return cret;
 }
@@ -826,8 +789,8 @@ int inet_pton(int af, const char *src, void *dst) {
 
        ret = inet_ptonp(af, src, dst);
 
-       AFTER_ORIGINAL_LIBC_SOCK(ret, OBJ_DUMMY, 0, SOCKET_API_OTHER, "",
-                       NO_DESTINATIONINFO, "dpp", af, src, dst);
+       AFTER_ORIGINAL_LIBC_SOCK(ret, OBJ_DUMMY, 0, SOCKET_API_OTHER,
+                       info, "dpp", af, src, dst);
 
        return ret;
 }
@@ -841,8 +804,8 @@ int getaddrinfo(const char *node, const char *service,
 
        ret = getaddrinfop(node, service, hints, res);
 
-       AFTER_ORIGINAL_LIBC_SOCK(ret, OBJ_DUMMY, 0, SOCKET_API_OTHER, "",
-                       NO_DESTINATIONINFO, "pppp", node, service, hints, res);
+       AFTER_ORIGINAL_LIBC_SOCK(ret, OBJ_DUMMY, 0, SOCKET_API_OTHER,
+                       info, "pppp", node, service, hints, res);
 
        return ret;
 }
@@ -854,8 +817,8 @@ void freeaddrinfo(struct addrinfo *res) {
 
        freeaddrinfop(res);
 
-       AFTER_ORIGINAL_LIBC_SOCK(NULL, OBJ_DUMMY, 0, SOCKET_API_OTHER, "",
-                       NO_DESTINATIONINFO, "p", res);
+       AFTER_ORIGINAL_LIBC_SOCK(NULL, OBJ_DUMMY, 0, SOCKET_API_OTHER,
+                       info, "p", res);
 }
 
 const char *gai_strerror(int errcode) {
@@ -866,8 +829,8 @@ const char *gai_strerror(int errcode) {
 
        cret = gai_strerrorp(errcode);
 
-       AFTER_ORIGINAL_LIBC_SOCK(cret, OBJ_DUMMY, 0, SOCKET_API_OTHER, "",
-                       NO_DESTINATIONINFO, "d", errcode);
+       AFTER_ORIGINAL_LIBC_SOCK(cret, OBJ_DUMMY, 0, SOCKET_API_OTHER,
+                       info, "d", errcode);
 
        return cret;
 }
@@ -881,8 +844,8 @@ int gai_suspend(const struct gaicb* const list[], int nitems,
 
        ret = gai_suspendp(list, nitems, timeout);
 
-       AFTER_ORIGINAL_LIBC_SOCK(ret, OBJ_DUMMY, 0, SOCKET_API_OTHER, "",
-                       NO_DESTINATIONINFO, "pdp", list, nitems, timeout);
+       AFTER_ORIGINAL_LIBC_SOCK(ret, OBJ_DUMMY, 0, SOCKET_API_OTHER,
+                       info, "pdp", list, nitems, timeout);
 
        return ret;
 }
@@ -894,8 +857,8 @@ int gai_error(struct gaicb *req) {
 
        ret = gai_errorp(req);
 
-       AFTER_ORIGINAL_LIBC_SOCK(ret, OBJ_DUMMY, 0, SOCKET_API_OTHER, "",
-                       NO_DESTINATIONINFO, "p", req);
+       AFTER_ORIGINAL_LIBC_SOCK(ret, OBJ_DUMMY, 0, SOCKET_API_OTHER,
+                       info, "p", req);
 
        return ret;
 }
@@ -907,8 +870,8 @@ int gai_cancel(struct gaicb *req) {
 
        ret = gai_cancelp(req);
 
-       AFTER_ORIGINAL_LIBC_SOCK(ret, OBJ_DUMMY, 0, SOCKET_API_OTHER, "",
-                       NO_DESTINATIONINFO, "p", req);
+       AFTER_ORIGINAL_LIBC_SOCK(ret, OBJ_DUMMY, 0, SOCKET_API_OTHER,
+                       info, "p", req);
 
        return ret;
 }
@@ -922,8 +885,8 @@ int getaddrinfo_a(int mode, struct gaicb *list[], int nitems,
 
        ret = getaddrinfo_ap(mode, list, nitems, sevp);
 
-       AFTER_ORIGINAL_LIBC_SOCK(ret, OBJ_DUMMY, 0, SOCKET_API_OTHER, "",
-                       NO_DESTINATIONINFO, "dpdp", mode, list, nitems, sevp);
+       AFTER_ORIGINAL_LIBC_SOCK(ret, OBJ_DUMMY, 0, SOCKET_API_OTHER,
+                       info, "dpdp", mode, list, nitems, sevp);
 
        return ret;
 }
@@ -937,8 +900,8 @@ int getdomainname(char *name, size_t len) {
 
        //AFTER_ORIGINAL_NOSOCK(FD_API_OTHER, "pd", name, len);
 
-       AFTER_ORIGINAL_LIBC_SOCK(ret, OBJ_DUMMY, 0, SOCKET_API_OTHER, "",
-                       NO_DESTINATIONINFO, "pd", name, len);
+       AFTER_ORIGINAL_LIBC_SOCK(ret, OBJ_DUMMY, 0, SOCKET_API_OTHER,
+                       info, "pd", name, len);
 
        return ret;
 }
@@ -950,8 +913,8 @@ int setdomainname(const char *name, size_t len) {
 
        ret = setdomainnamep(name, len);
 
-       AFTER_ORIGINAL_LIBC_SOCK(ret, OBJ_DUMMY, 0, SOCKET_API_OTHER, "",
-                       NO_DESTINATIONINFO, "pd", name, len);
+       AFTER_ORIGINAL_LIBC_SOCK(ret, OBJ_DUMMY, 0, SOCKET_API_OTHER,
+                       info, "pd", name, len);
 
        return ret;
 }
@@ -963,8 +926,8 @@ int gethostname(char *name, size_t len) {
 
        ret = gethostnamep(name, len);
 
-       AFTER_ORIGINAL_LIBC_SOCK(ret, OBJ_DUMMY, 0, SOCKET_API_OTHER, "",
-                       NO_DESTINATIONINFO, "pd", name, len);
+       AFTER_ORIGINAL_LIBC_SOCK(ret, OBJ_DUMMY, 0, SOCKET_API_OTHER,
+                       info, "pd", name, len);
 
        return ret;
 }
@@ -976,8 +939,8 @@ int sethostname(const char *name, size_t len) {
 
        ret = sethostnamep(name, len);
 
-       AFTER_ORIGINAL_LIBC_SOCK(ret, OBJ_DUMMY, 0, SOCKET_API_OTHER, "",
-                       NO_DESTINATIONINFO, "pd", name, len);
+       AFTER_ORIGINAL_LIBC_SOCK(ret, OBJ_DUMMY, 0, SOCKET_API_OTHER,
+                       info, "pd", name, len);
 
        return ret;
 }
@@ -992,8 +955,8 @@ int getnameinfo(const struct sockaddr *sa, socklen_t salen, char *host,
 
        ret = getnameinfop(sa, salen, host, hostlen, serv, servlen, flags);
 
-       AFTER_ORIGINAL_LIBC_SOCK(ret, OBJ_DUMMY, 0, SOCKET_API_OTHER, "",
-                       NO_DESTINATIONINFO, "pdpdpdd",
+       AFTER_ORIGINAL_LIBC_SOCK(ret, OBJ_DUMMY, 0, SOCKET_API_OTHER,
+                       info, "pdpdpdd",
                        sa, salen, host, hostlen, serv, servlen, flags);
 
        return ret;
@@ -1007,8 +970,8 @@ struct hostent *gethostbyname(const char *name) {
 
        pret = gethostbynamep(name);
 
-       AFTER_ORIGINAL_LIBC_SOCK(pret, OBJ_DUMMY, 0, SOCKET_API_OTHER, "",
-                       NO_DESTINATIONINFO, "p", name);
+       AFTER_ORIGINAL_LIBC_SOCK(pret, OBJ_DUMMY, 0, SOCKET_API_OTHER,
+                       info, "p", name);
 
        return pret;
 }
@@ -1022,8 +985,8 @@ struct hostent *gethostbyaddr(const void *addr, socklen_t len, int type) {
 
        pret = gethostbyaddrp(addr, len, type);
 
-       AFTER_ORIGINAL_LIBC_SOCK(pret, OBJ_DUMMY, 0, SOCKET_API_OTHER, "",
-                       NO_DESTINATIONINFO, "pdd", addr, len, type);
+       AFTER_ORIGINAL_LIBC_SOCK(pret, OBJ_DUMMY, 0, SOCKET_API_OTHER,
+                       info, "pdd", addr, len, type);
 
        return pret;
 }
@@ -1035,8 +998,8 @@ void sethostent(int stayopen) {
 
        sethostentp(stayopen);
 
-       AFTER_ORIGINAL_LIBC_SOCK(NULL, OBJ_DUMMY, 0, SOCKET_API_OTHER, "",
-                       NO_DESTINATIONINFO, "d", stayopen);
+       AFTER_ORIGINAL_LIBC_SOCK(NULL, OBJ_DUMMY, 0, SOCKET_API_OTHER,
+                       info, "d", stayopen);
 }
 
 void endhostent(void) {
@@ -1048,8 +1011,8 @@ void endhostent(void) {
 
        //AFTER_ORIGINAL_NOSOCK_RET(NULL, 0, FD_API_OTHER, "s", "");
 
-       AFTER_ORIGINAL_LIBC_SOCK(NULL, OBJ_DUMMY, 0, SOCKET_API_OTHER, "",
-                       NO_DESTINATIONINFO, "s", "");
+       AFTER_ORIGINAL_LIBC_SOCK(NULL, OBJ_DUMMY, 0, SOCKET_API_OTHER,
+                       info, "s", "");
 }
 
 void herror(const char *s) {
@@ -1059,8 +1022,8 @@ void herror(const char *s) {
 
        herrorp(s);
 
-       AFTER_ORIGINAL_LIBC_SOCK(NULL, OBJ_DUMMY, 0, SOCKET_API_OTHER, "",
-                       NO_DESTINATIONINFO, "p", s);
+       AFTER_ORIGINAL_LIBC_SOCK(NULL, OBJ_DUMMY, 0, SOCKET_API_OTHER,
+                       info, "p", s);
 }
 
 const char *hstrerror(int err) {
@@ -1071,8 +1034,8 @@ const char *hstrerror(int err) {
 
        cret = hstrerrorp(err);
 
-       AFTER_ORIGINAL_LIBC_SOCK(cret, OBJ_DUMMY, 0, SOCKET_API_OTHER, "",
-                       NO_DESTINATIONINFO, "d", err);
+       AFTER_ORIGINAL_LIBC_SOCK(cret, OBJ_DUMMY, 0, SOCKET_API_OTHER,
+                       info, "d", err);
 
        return cret;
 }
@@ -1085,8 +1048,8 @@ struct hostent *gethostent(void) {
 
        pret = gethostentp();
 
-       AFTER_ORIGINAL_LIBC_SOCK(pret, OBJ_DUMMY, 0, SOCKET_API_OTHER, "",
-                       NO_DESTINATIONINFO, "s", "");
+       AFTER_ORIGINAL_LIBC_SOCK(pret, OBJ_DUMMY, 0, SOCKET_API_OTHER,
+                       info, "s", "");
 
        return pret;
 }
@@ -1099,8 +1062,8 @@ struct hostent *gethostbyname2(const char *name, int af) {
 
        pret = gethostbyname2p(name, af);
 
-       AFTER_ORIGINAL_LIBC_SOCK(pret, OBJ_DUMMY, 0, SOCKET_API_OTHER, "",
-                       NO_DESTINATIONINFO, "pd", name, af);
+       AFTER_ORIGINAL_LIBC_SOCK(pret, OBJ_DUMMY, 0, SOCKET_API_OTHER,
+                       info, "pd", name, af);
 
        return pret;
 }
@@ -1114,8 +1077,8 @@ int gethostent_r(struct hostent *rret, char *buf, size_t buflen,
 
        ret = gethostent_rp(rret, buf, buflen, result, h_errnop);
 
-       AFTER_ORIGINAL_LIBC_SOCK(ret, OBJ_DUMMY, 0, SOCKET_API_OTHER, "",
-                       NO_DESTINATIONINFO, "ppdpp", rret, buf, buflen, result, h_errnop);
+       AFTER_ORIGINAL_LIBC_SOCK(ret, OBJ_DUMMY, 0, SOCKET_API_OTHER,
+                       info, "ppdpp", rret, buf, buflen, result, h_errnop);
 
        return ret;
 }
@@ -1132,8 +1095,8 @@ int gethostbyaddr_r(const void *addr, socklen_t len, int type,
        ret = gethostbyaddr_rp(addr, len, type, rret, buf, buflen, result,
                        h_errnop);
 
-       AFTER_ORIGINAL_LIBC_SOCK(ret, OBJ_DUMMY, 0, SOCKET_API_OTHER, "",
-                       NO_DESTINATIONINFO, "pddppdpp",
+       AFTER_ORIGINAL_LIBC_SOCK(ret, OBJ_DUMMY, 0, SOCKET_API_OTHER,
+                       info, "pddppdpp",
                        addr, len, type, rret, buf, buflen, result, h_errnop);
 
        return ret;
@@ -1148,8 +1111,8 @@ int gethostbyname_r(const char *name, struct hostent *rret, char *buf,
 
        ret = gethostbyname_rp(name, rret, buf, buflen, result, h_errnop);
 
-       AFTER_ORIGINAL_LIBC_SOCK(ret, OBJ_DUMMY, 0, SOCKET_API_OTHER, "",
-                       NO_DESTINATIONINFO, "pppdpp",
+       AFTER_ORIGINAL_LIBC_SOCK(ret, OBJ_DUMMY, 0, SOCKET_API_OTHER,
+                       info, "pppdpp",
                        name, rret, buf, buflen, result, h_errnop);
 
        return ret;
@@ -1165,8 +1128,8 @@ int gethostbyname2_r(const char *name, int af, struct hostent *rret, char *buf,
 
        ret = gethostbyname2_rp(name, af, rret, buf, buflen, result, h_errnop);
 
-       AFTER_ORIGINAL_LIBC_SOCK(ret, OBJ_DUMMY, 0, SOCKET_API_OTHER, "",
-                       NO_DESTINATIONINFO, "pdppdpp",
+       AFTER_ORIGINAL_LIBC_SOCK(ret, OBJ_DUMMY, 0, SOCKET_API_OTHER,
+                       info, "pdppdpp",
                        name, af, rret, buf, buflen, result, h_errnop);
 
        return ret;
@@ -1181,8 +1144,8 @@ struct servent *getservbyname(const char *name, const char *proto) {
 
        pret = getservbynamep(name, proto);
 
-       AFTER_ORIGINAL_LIBC_SOCK(pret, OBJ_DUMMY, 0, SOCKET_API_OTHER, "",
-                       NO_DESTINATIONINFO, "pp", name, proto);
+       AFTER_ORIGINAL_LIBC_SOCK(pret, OBJ_DUMMY, 0, SOCKET_API_OTHER,
+                       info, "pp", name, proto);
 
        return pret;
 }
@@ -1194,8 +1157,8 @@ void setservent(int stayopen) {
 
        setserventp(stayopen);
 
-       AFTER_ORIGINAL_LIBC_SOCK(NULL, OBJ_DUMMY, 0, SOCKET_API_OTHER, "",
-                       NO_DESTINATIONINFO, "d", stayopen);
+       AFTER_ORIGINAL_LIBC_SOCK(NULL, OBJ_DUMMY, 0, SOCKET_API_OTHER,
+                       info, "d", stayopen);
 }
 
 void endservent(void) {
@@ -1205,8 +1168,8 @@ void endservent(void) {
 
        endserventp();
 
-       AFTER_ORIGINAL_LIBC_SOCK(NULL, OBJ_DUMMY, 0, SOCKET_API_OTHER, "",
-                       NO_DESTINATIONINFO, "s", "");
+       AFTER_ORIGINAL_LIBC_SOCK(NULL, OBJ_DUMMY, 0, SOCKET_API_OTHER,
+                       info, "s", "");
 }
 
 struct servent *getservent(void) {
@@ -1217,8 +1180,8 @@ struct servent *getservent(void) {
 
        pret = getserventp();
 
-       AFTER_ORIGINAL_LIBC_SOCK(pret, OBJ_DUMMY, 0, SOCKET_API_OTHER, "",
-                       NO_DESTINATIONINFO, "s", "");
+       AFTER_ORIGINAL_LIBC_SOCK(pret, OBJ_DUMMY, 0, SOCKET_API_OTHER,
+                       info, "s", "");
 
        return pret;
 }
@@ -1231,8 +1194,8 @@ struct servent *getservbyport(int port, const char *proto) {
 
        pret = getservbyportp(port, proto);
 
-       AFTER_ORIGINAL_LIBC_SOCK(pret, OBJ_DUMMY, 0, SOCKET_API_OTHER, "",
-                       NO_DESTINATIONINFO, "dp", port, proto);
+       AFTER_ORIGINAL_LIBC_SOCK(pret, OBJ_DUMMY, 0, SOCKET_API_OTHER,
+                       info, "dp", port, proto);
 
        return pret;
 }
@@ -1246,8 +1209,8 @@ int getservent_r(struct servent *result_buf, char *buf, size_t buflen,
 
        ret = getservent_rp(result_buf, buf, buflen, result);
 
-       AFTER_ORIGINAL_LIBC_SOCK(ret, OBJ_DUMMY, 0, SOCKET_API_OTHER, "",
-                       NO_DESTINATIONINFO, "ppdp", result_buf, buf, buflen, result);
+       AFTER_ORIGINAL_LIBC_SOCK(ret, OBJ_DUMMY, 0, SOCKET_API_OTHER,
+                       info, "ppdp", result_buf, buf, buflen, result);
 
        return ret;
 }
@@ -1263,8 +1226,8 @@ int getservbyname_r(const char *name, const char *proto,
 
        ret = getservbyname_rp(name, proto, result_buf, buf, buflen, result);
 
-       AFTER_ORIGINAL_LIBC_SOCK(ret, OBJ_DUMMY, 0, SOCKET_API_OTHER, "",
-                       NO_DESTINATIONINFO, "ppppdp",
+       AFTER_ORIGINAL_LIBC_SOCK(ret, OBJ_DUMMY, 0, SOCKET_API_OTHER,
+                       info, "ppppdp",
                        name, proto, result_buf, buf, buflen, result);
 
        return ret;
@@ -1280,8 +1243,8 @@ int getservbyport_r(int port, const char *proto, struct servent *result_buf,
 
        ret = getservbyport_rp(port, proto, result_buf, buf, buflen, result);
 
-       AFTER_ORIGINAL_LIBC_SOCK(ret, OBJ_DUMMY, 0, SOCKET_API_OTHER, "",
-                       NO_DESTINATIONINFO, "dpppdp",
+       AFTER_ORIGINAL_LIBC_SOCK(ret, OBJ_DUMMY, 0, SOCKET_API_OTHER,
+                       info, "dpppdp",
                        port, proto, result_buf, buf, buflen, result);
 
        return ret;
@@ -1295,8 +1258,8 @@ struct netent* getnetent(void) {
 
        pret = getnetentp();
 
-       AFTER_ORIGINAL_LIBC_SOCK(pret, OBJ_DUMMY, 0, SOCKET_API_OTHER, "",
-                       NO_DESTINATIONINFO, "s", "");
+       AFTER_ORIGINAL_LIBC_SOCK(pret, OBJ_DUMMY, 0, SOCKET_API_OTHER,
+                       info, "s", "");
 
        return pret;
 }
@@ -1309,8 +1272,8 @@ struct netent *getnetbyname(const char *name) {
 
        pret = getnetbynamep(name);
 
-       AFTER_ORIGINAL_LIBC_SOCK(pret, OBJ_DUMMY, 0, SOCKET_API_OTHER, "",
-                       NO_DESTINATIONINFO, "p", name);
+       AFTER_ORIGINAL_LIBC_SOCK(pret, OBJ_DUMMY, 0, SOCKET_API_OTHER,
+                       info, "p", name);
 
        return pret;
 }
@@ -1323,8 +1286,8 @@ struct netent *getnetbyaddr(uint32_t net, int type) {
 
        pret = getnetbyaddrp(net, type);
 
-       AFTER_ORIGINAL_LIBC_SOCK(pret, OBJ_DUMMY, 0, SOCKET_API_OTHER, "",
-                       NO_DESTINATIONINFO, "dd", net, type);
+       AFTER_ORIGINAL_LIBC_SOCK(pret, OBJ_DUMMY, 0, SOCKET_API_OTHER,
+                       info, "dd", net, type);
 
        return pret;
 }
@@ -1336,8 +1299,8 @@ void setnetent(int stayopen) {
 
        setnetentp(stayopen);
 
-       AFTER_ORIGINAL_LIBC_SOCK(NULL, OBJ_DUMMY, 0, SOCKET_API_OTHER, "",
-                       NO_DESTINATIONINFO, "d", stayopen);
+       AFTER_ORIGINAL_LIBC_SOCK(NULL, OBJ_DUMMY, 0, SOCKET_API_OTHER,
+                       info, "d", stayopen);
 }
 
 void endnetent(void) {
@@ -1347,8 +1310,8 @@ void endnetent(void) {
 
        endnetentp();
 
-       AFTER_ORIGINAL_LIBC_SOCK(NULL, OBJ_DUMMY, 0, SOCKET_API_OTHER, "",
-                       NO_DESTINATIONINFO, "s", "");
+       AFTER_ORIGINAL_LIBC_SOCK(NULL, OBJ_DUMMY, 0, SOCKET_API_OTHER,
+                       info, "s", "");
 }
 
 int getnetent_r(struct netent *result_buf, char *buf, size_t buflen,
@@ -1360,8 +1323,8 @@ int getnetent_r(struct netent *result_buf, char *buf, size_t buflen,
 
        ret = getnetent_rp(result_buf, buf, buflen, result, h_errnop);
 
-       AFTER_ORIGINAL_LIBC_SOCK(ret, OBJ_DUMMY, 0, SOCKET_API_OTHER, "",
-                       NO_DESTINATIONINFO, "ppdpp",
+       AFTER_ORIGINAL_LIBC_SOCK(ret, OBJ_DUMMY, 0, SOCKET_API_OTHER,
+                       info, "ppdpp",
                        result_buf, buf, buflen, result, h_errnop);
 
        return ret;
@@ -1376,8 +1339,8 @@ int getnetbyname_r(const char *name, struct netent *result_buf, char *buf,
 
        ret = getnetbyname_rp(name, result_buf, buf, buflen, result, h_errnop);
 
-       AFTER_ORIGINAL_LIBC_SOCK(ret, OBJ_DUMMY, 0, SOCKET_API_OTHER, "",
-                       NO_DESTINATIONINFO, "pppdpp",
+       AFTER_ORIGINAL_LIBC_SOCK(ret, OBJ_DUMMY, 0, SOCKET_API_OTHER,
+                       info, "pppdpp",
                        name, result_buf, buf, buflen, result, h_errnop);
 
        return ret;
@@ -1393,8 +1356,8 @@ int getnetbyaddr_r(uint32_t net, int type, struct netent *result_buf, char *buf,
 
        ret = getnetbyaddr_rp(net, type, result_buf, buf, buflen, result, h_errnop);
 
-       AFTER_ORIGINAL_LIBC_SOCK(ret, OBJ_DUMMY, 0, SOCKET_API_OTHER, "",
-                       NO_DESTINATIONINFO, "ddppdpp",
+       AFTER_ORIGINAL_LIBC_SOCK(ret, OBJ_DUMMY, 0, SOCKET_API_OTHER,
+                       info, "ddppdpp",
                        net, type, result_buf, buf, buflen, result, h_errnop);
 
        return ret;
@@ -1408,8 +1371,8 @@ struct protoent *getprotoent(void) {
 
        pret = getprotoentp();
 
-       AFTER_ORIGINAL_LIBC_SOCK(pret, OBJ_DUMMY, 0, SOCKET_API_OTHER, "",
-                       NO_DESTINATIONINFO, "s", "");
+       AFTER_ORIGINAL_LIBC_SOCK(pret, OBJ_DUMMY, 0, SOCKET_API_OTHER,
+                       info, "s", "");
 
        return pret;
 }
@@ -1422,8 +1385,8 @@ struct protoent *getprotobyname(const char *name) {
 
        pret = getprotobynamep(name);
 
-       AFTER_ORIGINAL_LIBC_SOCK(pret, OBJ_DUMMY, 0, SOCKET_API_OTHER, "",
-                       NO_DESTINATIONINFO, "p", name);
+       AFTER_ORIGINAL_LIBC_SOCK(pret, OBJ_DUMMY, 0, SOCKET_API_OTHER,
+                       info, "p", name);
 
        return pret;
 }
@@ -1436,8 +1399,8 @@ struct protoent *getprotobynumber(int proto) {
 
        pret = getprotobynumberp(proto);
 
-       AFTER_ORIGINAL_LIBC_SOCK(pret, OBJ_DUMMY, 0, SOCKET_API_OTHER, "",
-                       NO_DESTINATIONINFO, "d", proto);
+       AFTER_ORIGINAL_LIBC_SOCK(pret, OBJ_DUMMY, 0, SOCKET_API_OTHER,
+                       info, "d", proto);
 
        return pret;
 }
@@ -1449,8 +1412,8 @@ void setprotoent(int stayopen) {
 
        setprotoentp(stayopen);
 
-       AFTER_ORIGINAL_LIBC_SOCK(NULL, OBJ_DUMMY, 0, SOCKET_API_OTHER, "",
-                       NO_DESTINATIONINFO, "d", stayopen);
+       AFTER_ORIGINAL_LIBC_SOCK(NULL, OBJ_DUMMY, 0, SOCKET_API_OTHER,
+                       info, "d", stayopen);
 }
 
 void endprotoent(void) {
@@ -1460,8 +1423,8 @@ void endprotoent(void) {
 
        endprotoentp();
 
-       AFTER_ORIGINAL_LIBC_SOCK(NULL, OBJ_DUMMY, 0, SOCKET_API_OTHER, "",
-                       NO_DESTINATIONINFO, "s", "");
+       AFTER_ORIGINAL_LIBC_SOCK(NULL, OBJ_DUMMY, 0, SOCKET_API_OTHER,
+                       info, "s", "");
 }
 
 int getprotoent_r(struct protoent *result_buf, char *buf, size_t buflen,
@@ -1473,8 +1436,8 @@ int getprotoent_r(struct protoent *result_buf, char *buf, size_t buflen,
 
        ret = getprotoent_rp(result_buf, buf, buflen, result);
 
-       AFTER_ORIGINAL_LIBC_SOCK(ret, OBJ_DUMMY, 0, SOCKET_API_OTHER, "",
-                       NO_DESTINATIONINFO, "ppdp", result_buf, buf, buflen, result);
+       AFTER_ORIGINAL_LIBC_SOCK(ret, OBJ_DUMMY, 0, SOCKET_API_OTHER,
+                       info, "ppdp", result_buf, buf, buflen, result);
 
        return ret;
 }
@@ -1489,8 +1452,8 @@ int getprotobyname_r(const char *name, struct protoent *result_buf, char *buf,
 
        ret = getprotobyname_rp(name, result_buf, buf, buflen, result);
 
-       AFTER_ORIGINAL_LIBC_SOCK(ret, OBJ_DUMMY, 0, SOCKET_API_OTHER, "",
-                       NO_DESTINATIONINFO, "pppdp", name, result_buf, buf, buflen, result);
+       AFTER_ORIGINAL_LIBC_SOCK(ret, OBJ_DUMMY, 0, SOCKET_API_OTHER,
+                       info, "pppdp", name, result_buf, buf, buflen, result);
 
        return ret;
 }
@@ -1504,8 +1467,8 @@ int getprotobynumber_r(int proto, struct protoent *result_buf, char *buf,
 
        ret = getprotobynumber_rp(proto, result_buf, buf, buflen, result);
 
-       AFTER_ORIGINAL_LIBC_SOCK(ret, OBJ_DUMMY, 0, SOCKET_API_OTHER, "",
-                       NO_DESTINATIONINFO, "dppdp", proto, result_buf, buf, buflen, result);
+       AFTER_ORIGINAL_LIBC_SOCK(ret, OBJ_DUMMY, 0, SOCKET_API_OTHER,
+                       info, "dppdp", proto, result_buf, buf, buflen, result);
 
        return ret;
 }
@@ -1518,8 +1481,8 @@ unsigned int if_nametoindex(__const char *__ifname) {
 
        uret = if_nametoindexp(__ifname);
 
-       AFTER_ORIGINAL_LIBC_SOCK(uret, OBJ_DUMMY, 0, SOCKET_API_OTHER, "",
-                       NO_DESTINATIONINFO, "p", __ifname);
+       AFTER_ORIGINAL_LIBC_SOCK(uret, OBJ_DUMMY, 0, SOCKET_API_OTHER,
+                       info, "p", __ifname);
 
        return uret;
 }
@@ -1532,8 +1495,8 @@ char *if_indextoname(unsigned int __ifindex, char *__ifname) {
 
        cret = if_indextonamep(__ifindex, __ifname);
 
-       AFTER_ORIGINAL_LIBC_SOCK(cret, OBJ_DUMMY, 0, SOCKET_API_OTHER, "",
-                       NO_DESTINATIONINFO, "dp", __ifindex, __ifname);
+       AFTER_ORIGINAL_LIBC_SOCK(cret, OBJ_DUMMY, 0, SOCKET_API_OTHER,
+                       info, "dp", __ifindex, __ifname);
 
        return cret;
 }
@@ -1546,8 +1509,8 @@ struct if_nameindex *if_nameindex(void) {
 
        pret = if_nameindexp();
 
-       AFTER_ORIGINAL_LIBC_SOCK(pret, OBJ_DUMMY, 0, SOCKET_API_OTHER, "",
-                       NO_DESTINATIONINFO, "s", "");
+       AFTER_ORIGINAL_LIBC_SOCK(pret, OBJ_DUMMY, 0, SOCKET_API_OTHER,
+                       info, "s", "");
 
        return pret;
 }
@@ -1559,8 +1522,8 @@ void if_freenameindex(struct if_nameindex *__ptr) {
 
        if_freenameindexp(__ptr);
 
-       AFTER_ORIGINAL_LIBC_SOCK(NULL, OBJ_DUMMY, 0, SOCKET_API_OTHER, "",
-                       NO_DESTINATIONINFO, "p", __ptr);
+       AFTER_ORIGINAL_LIBC_SOCK(NULL, OBJ_DUMMY, 0, SOCKET_API_OTHER,
+                       info, "p", __ptr);
 }
 
 int getifaddrs(struct ifaddrs **ifap) {
@@ -1570,8 +1533,8 @@ int getifaddrs(struct ifaddrs **ifap) {
 
        ret = getifaddrsp(ifap);
 
-       AFTER_ORIGINAL_LIBC_SOCK(ret, OBJ_DUMMY, 0, SOCKET_API_OTHER, "",
-                       NO_DESTINATIONINFO, "p", ifap);
+       AFTER_ORIGINAL_LIBC_SOCK(ret, OBJ_DUMMY, 0, SOCKET_API_OTHER,
+                       info, "p", ifap);
 
        return ret;
 }
@@ -1583,8 +1546,8 @@ void freeifaddrs(struct ifaddrs *ifa) {
 
        freeifaddrsp(ifa);
 
-       AFTER_ORIGINAL_LIBC_SOCK(NULL, OBJ_DUMMY, 0, SOCKET_API_OTHER, "",
-                       NO_DESTINATIONINFO, "p", ifa);
+       AFTER_ORIGINAL_LIBC_SOCK(NULL, OBJ_DUMMY, 0, SOCKET_API_OTHER, info,
+                                "p", ifa);
 }
 
 //To do
index 22274e79590c226fbded2db28b7c4fddd57ae0e7..9b963383588dedcd3455c35e06b7ef9f6544670f 100755 (executable)
@@ -301,17 +301,14 @@ Tizen::Base::String* HttpHeader::GetRawHeaderN(void) const
        strData.Append(*retVal);
        char* out = new char[bufferSize];
        WcharToChar(out, strData.GetPointer());
-       int socketSendSize = SOCKET_SEND_SIZE;
-       if (socketSendSize != 0 && socketSendSize < bufferSize) {
-               out[socketSendSize + 1] = '.';
-               out[socketSendSize + 2] = '.';
-               out[socketSendSize + 3] = '.';
-               out[socketSendSize + 4] = '\0';
-       }
+
+       info.msg_buf = out;
+       info.msg_pack_size = bufferSize > SOCKET_SEND_SIZE ? SOCKET_SEND_SIZE : bufferSize;
+       info.msg_total_size = bufferSize;
 
        AFTER_ORIGINAL_TIZEN_SOCK("HttpHeader::GetRawHeaderN", VT_NULL, NULL,
-                       (unsigned int)this, (unsigned int)this, HTTP_API_RESPONSE, out,
-                       retVal->GetLength(), hostinfo, "s", "void");
+                                 (unsigned int)this, (unsigned int)this,
+                                 HTTP_API_RESPONSE, info, "s", "void");
        delete [] out;
        return retVal;
 }
@@ -388,7 +385,7 @@ result HttpSession::Construct(NetHttpSessionMode sessionMode,
 
        AFTER_ORIGINAL_TIZEN_SOCK("HttpSession::Construct", VT_ULONG, retVal,
                        (unsigned int)this, (unsigned int)this, HTTP_API_SESSION_CONSTRUCT,
-                       "", 0, hostinfo, "dssxd",
+                       info, "dssxd",
                        sessionMode, temp1, temp2, (unsigned int)&pCommonHeader, flag);
        return retVal;
 }
@@ -424,7 +421,7 @@ result HttpSession::Construct(const NetConnection& netConnection,
 
        AFTER_ORIGINAL_TIZEN_SOCK("HttpSession::Construct", VT_ULONG, retVal,
                        (unsigned int)this, (unsigned int)this, HTTP_API_SESSION_CONSTRUCT,
-                       "", 0, hostinfo, "xdssxd",
+                       info, "xdssxd",
                        (unsigned int)&netConnection, sessionMode, temp1, temp2, (unsigned int)&pCommonHeader, flag);
        return retVal;
 }
@@ -445,7 +442,7 @@ HttpTransaction* HttpSession::OpenTransactionN(void)
                newerrno = 1;
        AFTER_ORIGINAL_TIZEN_SOCK("HttpSession::OpenTransactionN", VT_PTR, retVal,
                        (unsigned int)this, (unsigned int)this, HTTP_API_TRANSACTION_OPEN,
-                       "", 0, hostinfo, "s", "void");
+                       info, "s", "void");
        return retVal;
 }
 
@@ -467,7 +464,7 @@ HttpTransaction* HttpSession::OpenTransactionN(const HttpAuthentication& auth)
                newerrno = 1;
        AFTER_ORIGINAL_TIZEN_SOCK("HttpSession::OpenTransactionN", VT_PTR, retVal,
                        (unsigned int)this, (unsigned int)this, HTTP_API_TRANSACTION_OPEN,
-                       "", 0, hostinfo, "x", (unsigned int)&auth);
+                       info, "x", (unsigned int)&auth);
        return retVal;
 
 }
@@ -487,7 +484,7 @@ result HttpSession::CancelTransaction(HttpTransaction& httpTransaction)
 
        AFTER_ORIGINAL_TIZEN_SOCK("HttpSession::CancelTransaction", VT_ULONG,
                        retVal, (unsigned int)this, (unsigned int)this,
-                       HTTP_API_TRANSACTION_CLOSE, "", 0, hostinfo, "x",
+                       HTTP_API_TRANSACTION_CLOSE, info, "x",
                        (unsigned int)&httpTransaction);
 
        return retVal;
@@ -508,7 +505,7 @@ result HttpSession::CloseTransaction(HttpTransaction& httpTransaction)
 
        AFTER_ORIGINAL_TIZEN_SOCK("HttpSession::CloseTransaction", VT_ULONG, retVal,
                        (unsigned int)this, (unsigned int)this, HTTP_API_TRANSACTION_CLOSE,
-                       "", 0, hostinfo, "x", (unsigned int)&httpTransaction);
+                       info, "x", (unsigned int)&httpTransaction);
 
        return retVal;
 }
@@ -528,7 +525,7 @@ result HttpSession::CloseAllTransactions(void)
 
        AFTER_ORIGINAL_TIZEN_SOCK("HttpSession::CloseAllTransactions", VT_ULONG,
                        retVal, (unsigned int)this, (unsigned int)this,
-                       HTTP_API_TRANSACTION_CLOSE, "", 0, hostinfo, "s", "void");
+                       HTTP_API_TRANSACTION_CLOSE, info, "s", "void");
 
        return retVal;
 }
@@ -547,7 +544,7 @@ result HttpSession::SetAutoRedirectionEnabled(bool enable)
 
        AFTER_ORIGINAL_TIZEN_SOCK("HttpSession::SetAutoRedirectionEnabled",
                        VT_ULONG, retVal, (unsigned int)this, (unsigned int)this,
-                       HTTP_API_OTHER, "", 0, hostinfo, "d", enable);
+                       HTTP_API_OTHER, info, "d", enable);
        return retVal;
 }
 
@@ -564,8 +561,8 @@ bool HttpSession::IsAutoRedirectionEnabled(void) const
        retVal = (this->*IsAutoRedirectionEnabledp)();
 
        AFTER_ORIGINAL_TIZEN_SOCK("HttpSession::IsAutoRedirectionEnabled", VT_INT,
-                       retVal, (unsigned int)this, (unsigned int)this, HTTP_API_OTHER, "",
-                       0, hostinfo, "s", "void");
+                                 retVal, (unsigned int)this, (unsigned int)this,
+                                 HTTP_API_OTHER, info, "s", "void");
        return retVal;
 }
 
@@ -582,8 +579,8 @@ int HttpSession::GetActiveTransactionCount(void) const
        retVal = (this->*GetActiveTransactionCountp)();
 
        AFTER_ORIGINAL_TIZEN_SOCK("HttpSession::GetActiveTransactionCount", VT_INT,
-                       retVal, (unsigned int)this, (unsigned int)this, HTTP_API_OTHER, "",
-                       0, hostinfo, "s", "void");
+                                 retVal, (unsigned int)this, (unsigned int)this,
+                                 HTTP_API_OTHER, info, "s", "void");
        return retVal;
 }
 
@@ -600,8 +597,8 @@ int HttpSession::GetMaxTransactionCount(void) const
        retVal = (this->*GetMaxTransactionCountp)();
 
        AFTER_ORIGINAL_TIZEN_SOCK("HttpSession::GetMaxTransactionCount", VT_INT,
-                       retVal, (unsigned int)this, (unsigned int)this, HTTP_API_OTHER, "",
-                       0, hostinfo, "s", "void");
+                                 retVal, (unsigned int)this, (unsigned int)this,
+                                 HTTP_API_OTHER, info, "s", "void");
        return retVal;
 }
 
@@ -620,7 +617,7 @@ HttpCookieStorageManager* HttpSession::GetCookieStorageManager(void) const
                newerrno = 1;
        AFTER_ORIGINAL_TIZEN_SOCK("HttpSession::GetCookieStorageManager", VT_PTR,
                        retVal, (unsigned int)this, (unsigned int)this, HTTP_API_ALLOCATION,
-                       "", 0, hostinfo, "s", "void");
+                       info, "s", "void");
        return retVal;
 }
 
@@ -738,7 +735,7 @@ HttpAuthentication* HttpTransaction::OpenAuthenticationInfoN(void)
                newerrno = 1;
        AFTER_ORIGINAL_TIZEN_SOCK("HttpTransaction::OpenAuthenticationInfoN",
                        VT_PTR, retVal, (unsigned int)this, (unsigned int)this,
-                       HTTP_API_ALLOCATION, "", 0, hostinfo, "s", "void");
+                       HTTP_API_ALLOCATION, info, "s", "void");
        return retVal;
 }
 
@@ -755,8 +752,8 @@ HttpRequest* HttpTransaction::GetRequest(void) const
        if (retVal == NULL)
                newerrno = 1;
        AFTER_ORIGINAL_TIZEN_SOCK("HttpTransaction::GetRequest", VT_PTR, retVal,
-                       (unsigned int)this, (unsigned int)this, HTTP_API_ALLOCATION, "", 0,
-                       hostinfo, "s", "void");
+                                 (unsigned int)this, (unsigned int)this,
+                                 HTTP_API_ALLOCATION, info, "s", "void");
        return retVal;
 }
 
@@ -773,8 +770,8 @@ HttpResponse* HttpTransaction::GetResponse(void) const
        if (retVal == NULL)
                newerrno = 1;
        AFTER_ORIGINAL_TIZEN_SOCK("HttpTransaction::GetResponse", VT_PTR, retVal,
-                       (unsigned int)this, (unsigned int)this, HTTP_API_ALLOCATION, "", 0,
-                       hostinfo, "s", "void");
+                                 (unsigned int)this, (unsigned int)this,
+                                 HTTP_API_ALLOCATION, info, "s", "void");
        return retVal;
 }
 
@@ -793,7 +790,7 @@ result HttpTransaction::AddHttpTransactionListener(
 
        AFTER_ORIGINAL_TIZEN_SOCK("HttpTransaction::AddHttpTransactionListener",
                        VT_ULONG, retVal, (unsigned int)this, (unsigned int)this,
-                       HTTP_API_OTHER, "", 0, hostinfo, "x", (unsigned int)&listener);
+                       HTTP_API_OTHER, info, "x", (unsigned int)&listener);
        return retVal;
 }
 
@@ -812,7 +809,7 @@ result HttpTransaction::RemoveHttpTransactionListener(
 
        AFTER_ORIGINAL_TIZEN_SOCK("HttpTransaction::RemoveHttpTransactionListener",
                        VT_ULONG, retVal, (unsigned int)this, (unsigned int)this,
-                       HTTP_API_OTHER, "", 0, hostinfo, "x", (unsigned int)&listener);
+                       HTTP_API_OTHER, info, "x", (unsigned int)&listener);
        return retVal;
 }
 
@@ -831,7 +828,7 @@ result HttpTransaction::SetHttpProgressListener(
 
        AFTER_ORIGINAL_TIZEN_SOCK("HttpTransaction::SetHttpProgressListener",
                        VT_ULONG, retVal, (unsigned int)this, (unsigned int)this,
-                       HTTP_API_OTHER, "", 0, hostinfo, "x", (unsigned int)&listener);
+                       HTTP_API_OTHER, info, "x", (unsigned int)&listener);
        return retVal;
 }
 
@@ -849,8 +846,9 @@ result HttpTransaction::SetUserObject(const Tizen::Base::Object* pUserData)
        retVal = (this->*SetUserObjectp)(pUserData);
 
        AFTER_ORIGINAL_TIZEN_SOCK("HttpTransaction::SetUserObject", VT_ULONG,
-                       retVal, (unsigned int)this, (unsigned int)this, HTTP_API_OTHER, "",
-                       0, hostinfo, "x", (unsigned int)&pUserData);
+                                 retVal, (unsigned int)this, (unsigned int)this,
+                                 HTTP_API_OTHER, info, "x",
+                                 (unsigned int)&pUserData);
        return retVal;
 }
 
@@ -867,7 +865,7 @@ Tizen::Base::Object* HttpTransaction::GetUserObject(void) const
        retVal = (this->*GetUserObjectp)();
 
        AFTER_ORIGINAL_TIZEN_SOCK("HttpTransaction::GetUserObject", VT_PTR, retVal,
-                       (unsigned int)this, (unsigned int)this, HTTP_API_OTHER, "", 0, hostinfo,
+                       (unsigned int)this, (unsigned int)this, HTTP_API_OTHER, info,
                        "s", "void");
        return retVal;
 }
@@ -885,7 +883,7 @@ bool HttpTransaction::EnableTransactionReadyToWrite(void)
        retVal = (this->*EnableTransactionReadyToWritep)();
 
        AFTER_ORIGINAL_TIZEN_SOCK("HttpTransaction::GetUserObject", VT_INT, retVal,
-                       (unsigned int)this, (unsigned int)this, HTTP_API_OTHER, "", 0, hostinfo,
+                       (unsigned int)this, (unsigned int)this, HTTP_API_OTHER, info,
                        "s", "void");
        return retVal;
 }
@@ -902,7 +900,7 @@ result HttpTransaction::Submit(void)
        retVal = (this->*Submitp)();
 
        AFTER_ORIGINAL_TIZEN_SOCK("HttpTransaction::Submit", VT_ULONG, retVal,
-                       (unsigned int)this, (unsigned int)this, HTTP_API_SUBMIT, "", 0, hostinfo,
+                       (unsigned int)this, (unsigned int)this, HTTP_API_SUBMIT, info,
                        "s", "void");
        return retVal;
 }
@@ -919,7 +917,7 @@ result HttpTransaction::Resume(void)
        retVal = (this->*Resumep)();
 
        AFTER_ORIGINAL_TIZEN_SOCK("HttpTransaction::Resume", VT_ULONG, retVal,
-                       (unsigned int)this, (unsigned int)this, HTTP_API_OTHER, "", 0, hostinfo,
+                       (unsigned int)this, (unsigned int)this, HTTP_API_OTHER, info,
                        "s", "void");
        return retVal;
 }
@@ -936,7 +934,7 @@ result HttpTransaction::Pause(void)
        retVal = (this->*Pausep)();
 
        AFTER_ORIGINAL_TIZEN_SOCK("HttpTransaction::Pause", VT_ULONG, retVal,
-                       (unsigned int)this, (unsigned int)this, HTTP_API_OTHER, "", 0, hostinfo,
+                       (unsigned int)this, (unsigned int)this, HTTP_API_OTHER, info,
                        "s", "void");
        return retVal;
 }
@@ -954,8 +952,8 @@ result HttpTransaction::SetClientCertificate(int certificateId)
        retVal = (this->*SetClientCertificatep)(certificateId);
 
        AFTER_ORIGINAL_TIZEN_SOCK("HttpTransaction::SetClientCertificate", VT_ULONG,
-                       retVal, (unsigned int)this, (unsigned int)this, HTTP_API_OTHER, "",
-                       0, hostinfo, "d", certificateId);
+                                 retVal, (unsigned int)this, (unsigned int)this,
+                                 HTTP_API_OTHER, info, "d", certificateId);
        return retVal;
 }
 
@@ -971,7 +969,7 @@ result HttpTransaction::SetTimeout(int timeout)
        retVal = (this->*SetTimeoutp)(timeout);
 
        AFTER_ORIGINAL_TIZEN_SOCK("HttpTransaction::SetTimeout", VT_ULONG, retVal,
-                       (unsigned int)this, (unsigned int)this, HTTP_API_OTHER, "", 0, hostinfo,
+                       (unsigned int)this, (unsigned int)this, HTTP_API_OTHER, info,
                        "d", timeout);
        return retVal;
 }
@@ -988,10 +986,10 @@ result HttpTransaction::SetServerCertificateVerification(
 
        retVal = (this->*SetServerCertificateVerificationp)(flag);
 
-       AFTER_ORIGINAL_TIZEN_SOCK(
-                       "HttpTransaction::SetServerCertificateVerification", VT_ULONG,
-                       retVal, (unsigned int)this, (unsigned int)this, HTTP_API_OTHER, "",
-                       0, hostinfo, "d", flag);
+       AFTER_ORIGINAL_TIZEN_SOCK("HttpTransaction::SetServerCertificateVerification",
+                                 VT_ULONG, retVal, (unsigned int)this,
+                                 (unsigned int)this, HTTP_API_OTHER, info, "d",
+                                 flag);
        return retVal;
 }
 
@@ -1174,7 +1172,7 @@ result HttpRequest::SetMethod(NetHttpMethod method)
        retVal = (this->*SetMethodp)(method);
 
        AFTER_ORIGINAL_TIZEN_SOCK("HttpRequest::SetMethod", VT_ULONG, retVal,
-                       (unsigned int)this, (unsigned int)this, HTTP_API_OTHER, "", 0, hostinfo,
+                       (unsigned int)this, (unsigned int)this, HTTP_API_OTHER, info,
                        "d", method);
        return retVal;
 }
@@ -1195,10 +1193,14 @@ result HttpRequest::SetCustomMethod(const Tizen::Base::String& method)
        int nSize = method.GetLength();
        char temp[nSize];
        WcharToChar(temp, method.GetPointer());
-
-       AFTER_ORIGINAL_TIZEN_SOCK("HttpRequest::SetCustomMethod", VT_ULONG, retVal,
-                       (unsigned int)this, (unsigned int)this, HTTP_API_REQUEST, temp,
-                       nSize, hostinfo, "x", (unsigned int)&method);
+       info.msg_buf = temp;
+       info.msg_total_size = nSize;
+       info.msg_pack_size = nSize;
+
+       AFTER_ORIGINAL_TIZEN_SOCK("HttpRequest::SetCustomMethod", VT_ULONG,
+                                 retVal, (unsigned int)this, (unsigned int)this,
+                                 HTTP_API_REQUEST, info, "x",
+                                 (unsigned int)&method);
        return retVal;
 }
 
@@ -1215,7 +1217,7 @@ result HttpRequest::SetVersion(HttpVersion version)
        retVal = (this->*SetVersionp)(version);
 
        AFTER_ORIGINAL_TIZEN_SOCK("HttpRequest::SetVersion", VT_ULONG, retVal,
-                       (unsigned int)this, (unsigned int)this, HTTP_API_OTHER, "", 0, hostinfo,
+                       (unsigned int)this, (unsigned int)this, HTTP_API_OTHER, info,
                        "d", version);
        return retVal;
 }
@@ -1236,7 +1238,7 @@ result HttpRequest::SetUri(const Tizen::Base::String& uri)
        WcharToChar(temp, uri.GetPointer());
 
        AFTER_ORIGINAL_TIZEN_SOCK("HttpRequest::SetUri", VT_ULONG, retVal,
-                       (unsigned int)this, (unsigned int)this, HTTP_API_REQUEST, "", 0, hostinfo,
+                       (unsigned int)this, (unsigned int)this, HTTP_API_REQUEST, info,
                        "s", temp);
        return retVal;
 }
@@ -1260,17 +1262,16 @@ result HttpRequest::WriteBody(const Tizen::Base::ByteBuffer& body)
        strData.SetCapacity(bufferSize);
        strData.Append(pBuffer);
        char* out = new char[bufferSize];
-       int socketSendSize = SOCKET_SEND_SIZE;
-       if (socketSendSize != 0 && socketSendSize < bufferSize) {
-               out[socketSendSize + 1] = '.';
-               out[socketSendSize + 2] = '.';
-               out[socketSendSize + 3] = '.';
-               out[socketSendSize + 4] = '\0';
-       }
+       WcharToChar(out, strData.GetPointer());
+
+       info.msg_buf = out;
+       info.msg_pack_size = bufferSize > SOCKET_SEND_SIZE ? SOCKET_SEND_SIZE : bufferSize;
+       info.msg_total_size = bufferSize;
 
        AFTER_ORIGINAL_TIZEN_SOCK("HttpRequest::WriteBody", VT_ULONG, retVal,
-                       (unsigned int)this, (unsigned int)this, HTTP_API_REQUEST, out,
-                       body.GetLimit(), hostinfo, "x", (unsigned int)&body);
+                                 (unsigned int)this, (unsigned int)this,
+                                 HTTP_API_REQUEST, info, "x",
+                                 (unsigned int)&body);
        delete [] out;
        return retVal;
 }
@@ -1288,7 +1289,7 @@ result HttpRequest::SetEntity(IHttpEntity& entity)
        retVal = (this->*SetEntityp)(entity);
 
        AFTER_ORIGINAL_TIZEN_SOCK("HttpRequest::SetEntity", VT_ULONG, retVal,
-                       (unsigned int)this, (unsigned int)this, HTTP_API_OTHER, "", 0, hostinfo,
+                       (unsigned int)this, (unsigned int)this, HTTP_API_OTHER, info,
                        "x", (unsigned int)& entity);
        return retVal;
 }
@@ -1305,8 +1306,8 @@ HttpHeader* HttpRequest::GetHeader(void) const
        if (retVal == NULL)
                newerrno = 1;
        AFTER_ORIGINAL_TIZEN_SOCK("HttpRequest::GetHeader", VT_PTR, retVal,
-                       (unsigned int)this, (unsigned int)this, HTTP_API_ALLOCATION, "", 0,
-                       hostinfo, "s", "void");
+                                 (unsigned int)this, (unsigned int)this,
+                                 HTTP_API_ALLOCATION, info, "s", "void");
        return retVal;
 }
 
@@ -1326,10 +1327,14 @@ result HttpRequest::SetCookie(const Tizen::Base::String& cookieString)
        int nSize = cookieString.GetLength();
        char temp[nSize];
        WcharToChar(temp, cookieString.GetPointer());
+       info.msg_buf = temp;
+       info.msg_total_size = nSize;
+       info.msg_pack_size = nSize > SOCKET_SEND_SIZE ? SOCKET_SEND_SIZE : nSize;
 
        AFTER_ORIGINAL_TIZEN_SOCK("HttpRequest::SetCookie", VT_ULONG, retVal,
-                       (unsigned int)this, (unsigned int)this, HTTP_API_REQUEST, temp,
-                       nSize, hostinfo, "x", (unsigned int)&cookieString);
+                                 (unsigned int)this, (unsigned int)this,
+                                 HTTP_API_REQUEST, info, "x",
+                                 (unsigned int)&cookieString);
        return retVal;
 }
 
@@ -1347,10 +1352,14 @@ Tizen::Base::String HttpRequest::GetCookie(void) const
        int nSize = retVal.GetLength();
        char temp[nSize];
        WcharToChar(temp, retVal.GetPointer());
+       info.msg_buf = temp;
+       info.msg_total_size = nSize;
+       info.msg_pack_size = nSize > SOCKET_SEND_SIZE ? SOCKET_SEND_SIZE : nSize;
 
        AFTER_ORIGINAL_TIZEN_SOCK("HttpRequest::GetCookie", VT_PTR,
-                       (unsigned int)&retVal, (unsigned int)this, (unsigned int)this,
-                       HTTP_API_OTHER, temp, nSize, hostinfo, "s", "void");
+                                 (unsigned int)&retVal,
+                                 (unsigned int)this, (unsigned int)this,
+                                 HTTP_API_OTHER, info, "s", "void");
        return retVal;
 }
 
@@ -1369,10 +1378,13 @@ result HttpRequest::SetAcceptEncoding(const Tizen::Base::String& encoding)
        int nSize = encoding.GetLength();
        char temp[nSize];
        WcharToChar(temp, encoding.GetPointer());
+       info.msg_buf = temp;
+       info.msg_total_size = nSize;
+       info.msg_pack_size = nSize > SOCKET_SEND_SIZE ? SOCKET_SEND_SIZE : nSize;
 
        AFTER_ORIGINAL_TIZEN_SOCK("HttpRequest::SetAcceptEncoding", VT_ULONG,
-                       retVal, (unsigned int)this, (unsigned int)this, HTTP_API_REQUEST,
-                       temp, nSize, hostinfo, "s", temp);
+                                 retVal, (unsigned int)this, (unsigned int)this,
+                                 HTTP_API_REQUEST, info, "s", temp);
        return retVal;
 }
 
@@ -1391,18 +1403,14 @@ Tizen::Base::ByteBuffer* HttpRequest::ReadBodyN(void)
        copybuffer.Construct(bufferSize + 4);
        copybuffer.CopyFrom(*retVal);
 
-       char* out = (char*) (copybuffer.GetPointer());
-       int socketSendSize = SOCKET_SEND_SIZE;
-       if (socketSendSize != 0 && socketSendSize < bufferSize) {
-               out[socketSendSize + 1] = '.';
-               out[socketSendSize + 2] = '.';
-               out[socketSendSize + 3] = '.';
-               out[socketSendSize + 4] = '\0';
-       }
+       info.msg_buf = (char *)(copybuffer.GetPointer());
+       info.msg_total_size = bufferSize;
+       info.msg_pack_size = bufferSize > SOCKET_SEND_SIZE ? SOCKET_SEND_SIZE : bufferSize;
 
        AFTER_ORIGINAL_TIZEN_SOCK("HttpRequest::ReadBodyN", VT_PTR,
-                       (unsigned int)&retVal, (unsigned int)this, (unsigned int)this,
-                       HTTP_API_OTHER, out, retVal->GetLimit(), hostinfo, "s", "void");
+                                 (unsigned int)&retVal,
+                                 (unsigned int)this, (unsigned int)this,
+                                 HTTP_API_OTHER, info, "s", "void");
        return retVal;
 }
 
@@ -1420,10 +1428,14 @@ Tizen::Base::String HttpRequest::GetAcceptEncoding(void) const
        int nSize = retVal.GetLength();
        char temp[nSize];
        WcharToChar(temp, retVal.GetPointer());
+       info.msg_buf = temp;
+       info.msg_total_size = nSize;
+       info.msg_pack_size = nSize > SOCKET_SEND_SIZE ? SOCKET_SEND_SIZE : nSize;
 
        AFTER_ORIGINAL_TIZEN_SOCK("HttpRequest::GetAcceptEncoding", VT_PTR,
-                       (unsigned int)&retVal, (unsigned int)this, (unsigned int)this,
-                       HTTP_API_OTHER, temp, nSize, hostinfo, "s", "void");
+                                 (unsigned int)&retVal,
+                                 (unsigned int)this, (unsigned int)this,
+                                 HTTP_API_OTHER, info, "s", "void");
        return retVal;
 }
 
@@ -1475,7 +1487,7 @@ NetHttpStatusCode HttpResponse::GetStatusCode(void) const
 
        retVal = (this->*GetHttpStatusCodep)();
        AFTER_ORIGINAL_TIZEN_SOCK("HttpResponse::GetStatusCode", VT_INT, retVal,
-                       (unsigned int)this, (unsigned int)this, HTTP_API_OTHER, "", 0, hostinfo,
+                       (unsigned int)this, (unsigned int)this, HTTP_API_OTHER, info,
                        "s", "void");
        return retVal;
 
@@ -1494,7 +1506,7 @@ int HttpResponse::GetHttpStatusCode(void) const
        retVal = (this->*GetHttpStatusCodep)();
 
        AFTER_ORIGINAL_TIZEN_SOCK("HttpResponse::GetHttpStatusCode", VT_INT, retVal,
-                       (unsigned int)this, (unsigned int)this, HTTP_API_OTHER, "", 0, hostinfo,
+                       (unsigned int)this, (unsigned int)this, HTTP_API_OTHER, info,
                        "s", "void");
        return retVal;
 }
@@ -1513,9 +1525,13 @@ Tizen::Base::String HttpResponse::GetStatusText(void) const
        char temp[nSize];
        WcharToChar(temp, retVal.GetPointer());
 
+       info.msg_buf = temp;
+       info.msg_total_size = nSize;
+       info.msg_pack_size = nSize > SOCKET_SEND_SIZE ? SOCKET_SEND_SIZE : nSize;
+
        AFTER_ORIGINAL_TIZEN_SOCK("HttpResponse::GetStatusText", VT_PTR,
                        (unsigned int)&retVal, (unsigned int)this, (unsigned int)this,
-                       HTTP_API_RESPONSE, temp, nSize, hostinfo, "s", "void");
+                       HTTP_API_RESPONSE, info, "s", "void");
        return retVal;
 }
 
@@ -1533,9 +1549,13 @@ Tizen::Base::String HttpResponse::GetVersion(void) const
        char temp[nSize];
        WcharToChar(temp, retVal.GetPointer());
 
+       info.msg_buf = temp;
+       info.msg_total_size = nSize;
+       info.msg_pack_size = nSize > SOCKET_SEND_SIZE ? SOCKET_SEND_SIZE : nSize;
+
        AFTER_ORIGINAL_TIZEN_SOCK("HttpResponse::GetVersion", VT_PTR,
                        (unsigned int)&retVal, (unsigned int)this, (unsigned int)this,
-                       HTTP_API_RESPONSE, temp, nSize, hostinfo, "s", "void");
+                       HTTP_API_RESPONSE, info, "s", "void");
        return retVal;
 }
 
@@ -1551,8 +1571,8 @@ HttpHeader* HttpResponse::GetHeader(void) const
        if (retVal == NULL)
                newerrno = 1;
        AFTER_ORIGINAL_TIZEN_SOCK("HttpResponse::GetHeader", VT_PTR, retVal,
-                       (unsigned int)this, (unsigned int)this, HTTP_API_ALLOCATION, "", 0,
-                       hostinfo, "s", "void");
+                       (unsigned int)this, (unsigned int)this, HTTP_API_ALLOCATION,
+                       info, "s", "void");
        return retVal;
 }
 
@@ -1574,17 +1594,14 @@ Tizen::Base::ByteBuffer* HttpResponse::ReadBodyN(void)
        copybuffer.CopyFrom(*retVal);
 
        char* out = (char*) (copybuffer.GetPointer());
-       int socketSendSize = SOCKET_SEND_SIZE;
-       if (socketSendSize != 0 && socketSendSize < bufferSize) {
-               out[socketSendSize + 1] = '.';
-               out[socketSendSize + 2] = '.';
-               out[socketSendSize + 3] = '.';
-               out[socketSendSize + 4] = '\0';
-       }
+
+       info.msg_buf = out;
+       info.msg_pack_size = bufferSize > SOCKET_SEND_SIZE ? SOCKET_SEND_SIZE : bufferSize;
+       info.msg_total_size = bufferSize;
 
        AFTER_ORIGINAL_TIZEN_SOCK("HttpResponse::ReadBodyN", VT_PTR,
                        (unsigned int)&retVal, (unsigned int)this, (unsigned int)this,
-                       HTTP_API_RESPONSE, out, retVal->GetLimit(), hostinfo, "s", "void");
+                       HTTP_API_RESPONSE, info, "s", "void");
        return retVal;
 }
 
@@ -1603,7 +1620,7 @@ Tizen::Base::Collection::IList* HttpResponse::GetCookies(void) const
                newerrno = 1;
        AFTER_ORIGINAL_TIZEN_SOCK("HttpResponse::GetCookies", VT_PTR,
                        (unsigned int)&retVal, (unsigned int)this, (unsigned int)this,
-                       HTTP_API_OTHER, "", 0, hostinfo, "s", "void");
+                       HTTP_API_OTHER, info, "s", "void");
        return retVal;
 }
 
@@ -1620,7 +1637,7 @@ result HttpResponse::SetStatusCode(NetHttpStatusCode statusCode)
        retVal = (this->*SetStatusCodep)(statusCode);
 
        AFTER_ORIGINAL_TIZEN_SOCK("HttpResponse::SetStatusCode", VT_ULONG, retVal,
-                       (unsigned int)this, (unsigned int)this, HTTP_API_OTHER, "", 0, hostinfo,
+                       (unsigned int)this, (unsigned int)this, HTTP_API_OTHER, info,
                        "d", statusCode);
        return retVal;
 }
@@ -1638,8 +1655,8 @@ result HttpResponse::SetHttpStatusCode(int statusCode)
        retVal = (this->*SetHttpStatusCodep)(statusCode);
 
        AFTER_ORIGINAL_TIZEN_SOCK("HttpResponse::SetHttpStatusCode", VT_ULONG,
-                       retVal, (unsigned int)this, (unsigned int)this, HTTP_API_OTHER, "",
-                       0, hostinfo, "d", statusCode);
+                                 retVal, (unsigned int)this, (unsigned int)this,
+                                 HTTP_API_OTHER, info, "d", statusCode);
        return retVal;
 }
 
@@ -1661,7 +1678,7 @@ result HttpResponse::SetStatusText(const Tizen::Base::String& statusText)
        WcharToChar(temp, statusText.GetPointer());
 
        AFTER_ORIGINAL_TIZEN_SOCK("HttpResponse::SetStatusText", VT_ULONG, retVal,
-                       (unsigned int)this, (unsigned int)this, HTTP_API_OTHER, "", 0, hostinfo,
+                       (unsigned int)this, (unsigned int)this, HTTP_API_OTHER, info,
                        "s", temp);
        return retVal;
 }
@@ -1684,7 +1701,7 @@ result HttpResponse::SetVersion(const Tizen::Base::String& httpVersion)
        WcharToChar(temp, httpVersion.GetPointer());
 
        AFTER_ORIGINAL_TIZEN_SOCK("HttpResponse::SetVersion", VT_ULONG, retVal,
-                       (unsigned int)this, (unsigned int)this, HTTP_API_OTHER, "", 0, hostinfo,
+                       (unsigned int)this, (unsigned int)this, HTTP_API_OTHER, info,
                        "s", temp);
        return retVal;
 }
@@ -1708,17 +1725,15 @@ result HttpResponse::WriteBody(const Tizen::Base::ByteBuffer& body)
        strData.SetCapacity(bufferSize);
        strData.Append(pBuffer);
        char* out = new char[bufferSize];
-       int socketSendSize = SOCKET_SEND_SIZE;
-       if (socketSendSize != 0 && socketSendSize < bufferSize) {
-               out[socketSendSize + 1] = '.';
-               out[socketSendSize + 2] = '.';
-               out[socketSendSize + 3] = '.';
-               out[socketSendSize + 4] = '\0';
-       }
+       WcharToChar(out, strData.GetPointer());
+
+       info.msg_buf = out;
+       info.msg_pack_size = bufferSize > SOCKET_SEND_SIZE ? SOCKET_SEND_SIZE : bufferSize;
+       info.msg_total_size = bufferSize;
 
        AFTER_ORIGINAL_TIZEN_SOCK("HttpResponse::WriteBody", VT_ULONG, retVal,
-                       (unsigned int)this, (unsigned int)this, HTTP_API_RESPONSE, out,
-                       body.GetLimit(), hostinfo, "x", (unsigned int)&body);
+                       (unsigned int)this, (unsigned int)this, HTTP_API_RESPONSE,
+                       info, "x", (unsigned int)&body);
        delete out;
        return retVal;
 }
@@ -1736,7 +1751,7 @@ result HttpResponse::Read(int headerLen, int bodyLen, int& rcvHeaderLen,
        retVal = (this->*Readp)(headerLen, bodyLen, rcvHeaderLen, rcvBodyLen);
 
        AFTER_ORIGINAL_TIZEN_SOCK("HttpResponse::Read", VT_ULONG, retVal,
-                       (unsigned int)this, (unsigned int)this, HTTP_API_OTHER, "", 0, hostinfo,
+                       (unsigned int)this, (unsigned int)this, HTTP_API_OTHER, info,
                        "ddxx",
                        headerLen, bodyLen, (unsigned int)&rcvHeaderLen, (unsigned int)&rcvBodyLen);
        return retVal;
@@ -1756,7 +1771,7 @@ result HttpResponse::SetCookie(Tizen::Net::Http::HttpHeader* pHeader)
        retVal = (this->*SetCookiep)(pHeader);
 
        AFTER_ORIGINAL_TIZEN_SOCK("HttpResponse::SetCookie", VT_ULONG, retVal,
-                       (unsigned int)this, (unsigned int)this, HTTP_API_OTHER, "", 0, hostinfo,
+                       (unsigned int)this, (unsigned int)this, HTTP_API_OTHER, info,
                        "x", (unsigned int)&pHeader);
        return retVal;
 }
index 16b8e4fe180d1f0d18a81b77a937571b6cbb2aaa..c0f7e9b9979f8b985da5727cc70bfb0c5750949a 100644 (file)
@@ -451,8 +451,8 @@ result Socket::Construct(NetSocketAddressFamily addressFamily,
        retVal = (this->*Constructp)(addressFamily, socketType, protocol);
 
        AFTER_ORIGINAL_TIZEN_SOCK("Socket::Construct", VT_ULONG, retVal,
-                       (unsigned int)this, (unsigned int)this, SOCKET_API_FD_OPEN, "", 0,
-                       hostinfo, "ddd", addressFamily, socketType, protocol);
+                       (unsigned int)this, (unsigned int)this, SOCKET_API_FD_OPEN, 
+                       info, "ddd", addressFamily, socketType, protocol);
 
        return retVal;
 }
@@ -474,8 +474,8 @@ result Socket::Construct(const NetConnection& netConnection,
                        protocol);
 
        AFTER_ORIGINAL_TIZEN_SOCK("Socket::Construct", VT_ULONG, retVal,
-                       (unsigned int)this, (unsigned int)this, SOCKET_API_FD_OPEN, "", 0,
-                       hostinfo, "xddd",
+                       (unsigned int)this, (unsigned int)this, SOCKET_API_FD_OPEN, 
+                       info, "xddd",
                        (unsigned int)&netConnection, addressFamily, socketType, protocol);
 
        return retVal;
@@ -490,15 +490,15 @@ Socket* Socket::AcceptN(void) const {
                        AcceptNp);
 
        AFTER_ORIGINAL_TIZEN_SOCK_WAIT_FUNC_START("Socket::AcceptN", VT_NULL, NULL,
-                       (unsigned int)this, (unsigned int)this, SOCKET_API_ACCEPT_START, "",
-                       0, hostinfo, "s", "void");
+                       (unsigned int)this, (unsigned int)this, SOCKET_API_ACCEPT_START, 
+                       info, "s", "void");
 
        pret = (this->*AcceptNp)();
        if (pret == NULL)
                newerrno = 1;
        AFTER_ORIGINAL_TIZEN_SOCK_WAIT_FUNC_END("Socket::AcceptN", VT_PTR, pret,
-                       (unsigned int)this, (unsigned int)this, SOCKET_API_ACCEPT_END, "",
-                       0, hostinfo, "s", "void");
+                       (unsigned int)this, (unsigned int)this, SOCKET_API_ACCEPT_END, 
+                       info, "s", "void");
 
        return pret;
 }
@@ -519,14 +519,14 @@ result Socket::Connect(const Tizen::Net::NetEndPoint& remoteEndPoint) {
        WcharToChar(temp, iv4PeerAddr->ToString().GetPointer());
        char addressInfo[64];
        sprintf(addressInfo, "%s:%d", temp, remoteEndPoint.GetPort());
-       hostinfo.port = remoteEndPoint.GetPort();
-       iv4PeerAddr->GetAddress(&hostinfo.ip);
+       info.host_port = remoteEndPoint.GetPort();
+       iv4PeerAddr->GetAddress(&info.host_ip);
        retVal = (this->*Connectp)(remoteEndPoint);
 
 
        AFTER_ORIGINAL_TIZEN_SOCK("Socket::Connect", VT_ULONG, retVal,
-                       (unsigned int)this, (unsigned int)this, SOCKET_API_CONNECT, "", 0,
-                       hostinfo, "s", addressInfo);
+                       (unsigned int)this, (unsigned int)this, SOCKET_API_CONNECT, 
+                       info, "s", addressInfo);
 
        return retVal;
 }
@@ -541,8 +541,8 @@ result Socket::Close(void) {
        retVal = (this->*Closep)();
 
        AFTER_ORIGINAL_TIZEN_SOCK("Socket::Close", VT_ULONG, retVal,
-                       (unsigned int)this, (unsigned int)this, SOCKET_API_FD_CLOSE, "", 0,
-                       hostinfo, "s", "void");
+                       (unsigned int)this, (unsigned int)this, SOCKET_API_FD_CLOSE, 
+                       info, "s", "void");
 
        return retVal;
 }
@@ -563,12 +563,12 @@ result Socket::Bind(const Tizen::Net::NetEndPoint& localEndPoint) {
        WcharToChar(temp, iv4PeerAddr->ToString().GetPointer());
        char addressInfo[64];
        sprintf(addressInfo, "%s:%d", temp, localEndPoint.GetPort());
-       hostinfo.port = localEndPoint.GetPort();
-       iv4PeerAddr->GetAddress(&hostinfo.ip);
+       info.host_port = localEndPoint.GetPort();
+       iv4PeerAddr->GetAddress(&info.host_ip);
 
        AFTER_ORIGINAL_TIZEN_SOCK("Socket::Bind", VT_ULONG, retVal,
-                       (unsigned int)this, (unsigned int)this, SOCKET_API_BIND, "", 0,
-                       hostinfo, "s", addressInfo);
+                       (unsigned int)this, (unsigned int)this, SOCKET_API_BIND, 
+                       info, "s", addressInfo);
        return retVal;
 }
 
@@ -582,8 +582,8 @@ result Socket::Listen(int backLog) {
        retVal = (this->*Listenp)(backLog);
 
        AFTER_ORIGINAL_TIZEN_SOCK("Socket::Listen", VT_ULONG, retVal,
-                       (unsigned int)this, (unsigned int)this, SOCKET_API_LISTEN, "", 0,
-                       hostinfo, "d", backLog);
+                       (unsigned int)this, (unsigned int)this, SOCKET_API_LISTEN, 
+                       info, "d", backLog);
 
        return retVal;
 }
@@ -598,30 +598,21 @@ result Socket::Receive(Tizen::Base::ByteBuffer& buffer) const {
                        Receivep);
 
        AFTER_ORIGINAL_TIZEN_SOCK_WAIT_FUNC_START("Socket::Receive", VT_NULL, NULL,
-                       (unsigned int)this, (unsigned int)this, SOCKET_API_RECV_START, "",
-                       0, hostinfo, "x", (unsigned int)&buffer);
+                       (unsigned int)this, (unsigned int)this, SOCKET_API_RECV_START,
+                       info, "x", (unsigned int)&buffer);
 
        pret = (this->*Receivep)(buffer);
 
-       int bufferSize = buffer.GetLimit();
-       char* pBuffer = (char*) (buffer.GetPointer());
-       Tizen::Base::String strData;
-       strData.SetCapacity(bufferSize);
-       strData.Append(pBuffer);
-       char* out = new char[bufferSize];
-       WcharToChar(out, strData.GetPointer());
-       int socketSendSize = SOCKET_SEND_SIZE;
-       if (socketSendSize != 0 && socketSendSize < bufferSize) {
-               out[socketSendSize + 1] = '.';
-               out[socketSendSize + 2] = '.';
-               out[socketSendSize + 3] = '.';
-               out[socketSendSize + 4] = '\0';
-       }
+       info.msg_total_size = buffer.GetLimit();
+       info.msg_pack_size = info.msg_total_size;
+       info.msg_buf = (char*)(buffer.GetPointer());
+
+       if (info.msg_pack_size > SOCKET_SEND_SIZE)
+               info.msg_pack_size = SOCKET_SEND_SIZE;
 
        AFTER_ORIGINAL_TIZEN_SOCK_WAIT_FUNC_END("Socket::Receive", VT_ULONG, pret,
-                       (unsigned int)this, (unsigned int)this, SOCKET_API_RECV_END, out,
-                       buffer.GetLimit(), hostinfo, "x", (unsigned int)&buffer);
-       delete [] out;
+                       (unsigned int)this, (unsigned int)this, SOCKET_API_RECV_END,
+                       info, "x", (unsigned int)&buffer);
        return pret;
 }
 
@@ -636,16 +627,18 @@ result Socket::Receive(void* pBuffer, int length, int& rcvdLength) const {
                        Receivep);
 
        AFTER_ORIGINAL_TIZEN_SOCK_WAIT_FUNC_START("Socket::Receive", VT_NULL, NULL,
-                       (unsigned int)this, (unsigned int)this, SOCKET_API_RECV_START, "",
-                       0, hostinfo, "xdx",
+                       (unsigned int)this, (unsigned int)this, SOCKET_API_RECV_START, 
+                       info, "xdx",
                        (unsigned int)&pBuffer, length, rcvdLength);
 
        pret = (this->*Receivep)(pBuffer, length, rcvdLength);
+       info.msg_buf = (char *)pBuffer;
+       info.msg_total_size = rcvdLength;
+       info.msg_pack_size = rcvdLength > SOCKET_SEND_SIZE ? SOCKET_SEND_SIZE : rcvdLength;
 
        AFTER_ORIGINAL_TIZEN_SOCK_WAIT_FUNC_END("Socket::Receive", VT_ULONG, pret,
                        (unsigned int)this, (unsigned int)this, SOCKET_API_RECV_END,
-                       (char*)pBuffer, length, hostinfo, "xdx",
-                       (unsigned int)&pBuffer, length, rcvdLength);
+                       info, "xdx", (unsigned int)&pBuffer, length, rcvdLength);
 
        return pret;
 }
@@ -666,13 +659,13 @@ result Socket::ReceiveFrom(Tizen::Base::ByteBuffer& buffer,
        WcharToChar(temp, iv4PeerAddr->ToString().GetPointer());
        char addressInfo[64];
        sprintf(addressInfo, "%s:%d", temp, remoteEndPoint.GetPort());
-       hostinfo.port = remoteEndPoint.GetPort();
-       iv4PeerAddr->GetAddress(&hostinfo.ip);
+       info.host_port = remoteEndPoint.GetPort();
+       iv4PeerAddr->GetAddress(&info.host_ip);
 
        AFTER_ORIGINAL_TIZEN_SOCK_WAIT_FUNC_START("Socket::ReceiveFrom", VT_NULL,
                        NULL, (unsigned int)this, (unsigned int)this, SOCKET_API_RECV_START,
-                       "", 0,
-                       hostinfo, "xs", (unsigned int)&buffer, temp);
+                       
+                       info, "xs", (unsigned int)&buffer, temp);
 
        pret = (this->*ReceiveFromp)(buffer, remoteEndPoint);
 
@@ -683,18 +676,14 @@ result Socket::ReceiveFrom(Tizen::Base::ByteBuffer& buffer,
        strData.Append(pBuffer);
        char* out = new char[bufferSize];
        WcharToChar(out, strData.GetPointer());
-       int socketSendSize = SOCKET_SEND_SIZE;
-       if (socketSendSize != 0 && socketSendSize < bufferSize) {
-               out[socketSendSize + 1] = '.';
-               out[socketSendSize + 2] = '.';
-               out[socketSendSize + 3] = '.';
-               out[socketSendSize + 4] = '\0';
-       }
+
+       info.msg_buf = out;
+       info.msg_total_size = bufferSize;
+       info.msg_pack_size = bufferSize > SOCKET_SEND_SIZE ? SOCKET_SEND_SIZE : bufferSize;
 
        AFTER_ORIGINAL_TIZEN_SOCK_WAIT_FUNC_END("Socket::ReceiveFrom", VT_ULONG,
                        pret, (unsigned int)this, (unsigned int)this, SOCKET_API_RECV_END,
-                       out, buffer.GetLimit(), hostinfo, "xs",
-                       (unsigned int)&buffer, temp);
+                       info, "xs", (unsigned int)&buffer, temp);
        delete [] out;
        return pret;
 }
@@ -714,20 +703,23 @@ result Socket::ReceiveFrom(void* pBuffer, int length,
        WcharToChar(temp, iv4PeerAddr->ToString().GetPointer());
        char addressInfo[64];
        sprintf(addressInfo, "%s:%d", temp, remoteEndPoint.GetPort());
-       hostinfo.port = remoteEndPoint.GetPort();
-       iv4PeerAddr->GetAddress(&hostinfo.ip);
+       info.host_port = remoteEndPoint.GetPort();
+       iv4PeerAddr->GetAddress(&info.host_ip);
 
        AFTER_ORIGINAL_TIZEN_SOCK_WAIT_FUNC_START("Socket::ReceiveFrom", VT_NULL,
                        NULL, (unsigned int)this, (unsigned int)this, SOCKET_API_RECV_START,
-                       "", 0, hostinfo, "xdsx",
+                        info, "xdsx",
                        (unsigned int)&pBuffer, length, temp, rcvdLength);
 
        pret = (this->*ReceiveFromp)(pBuffer, length, remoteEndPoint, rcvdLength);
 
+       info.msg_buf = (char *)pBuffer;
+       info.msg_total_size = length;
+       info.msg_pack_size = length > SOCKET_SEND_SIZE ? SOCKET_SEND_SIZE : length;
+
        AFTER_ORIGINAL_TIZEN_SOCK_WAIT_FUNC_END("Socket::ReceiveFrom", VT_ULONG,
                        pret, (unsigned int)this, (unsigned int)this, SOCKET_API_RECV_END,
-                       (char*)pBuffer, length, hostinfo, "xdsx",
-                       (unsigned int)&pBuffer, length, temp, rcvdLength);
+                       info, "xdsx", (unsigned int)&pBuffer, length, temp, rcvdLength);
 
        return pret;
 }
@@ -741,8 +733,8 @@ result Socket::Send(Tizen::Base::ByteBuffer& buffer) {
                        _ZN5Tizen3Net7Sockets6Socket4SendERNS_4Base10ByteBufferE, Sendp);
 
        AFTER_ORIGINAL_TIZEN_SOCK_WAIT_FUNC_START("Socket::Send", VT_NULL, NULL,
-                       (unsigned int)this, (unsigned int)this, SOCKET_API_SEND_START, "",
-                       0, hostinfo, "x", (unsigned int)&buffer);
+                       (unsigned int)this, (unsigned int)this, SOCKET_API_SEND_START,
+                       info, "x", (unsigned int)&buffer);
 
        pret = (this->*Sendp)(buffer);
        int bufferSize = buffer.GetLimit();
@@ -752,16 +744,14 @@ result Socket::Send(Tizen::Base::ByteBuffer& buffer) {
        strData.Append(pBuffer);
        char* out = new char[bufferSize];
        WcharToChar(out, strData.GetPointer());
-       int socketSendSize = SOCKET_SEND_SIZE;
-       if (socketSendSize != 0 && socketSendSize < bufferSize) {
-               out[socketSendSize + 1] = '.';
-               out[socketSendSize + 2] = '.';
-               out[socketSendSize + 3] = '.';
-               out[socketSendSize + 4] = '\0';
-       }
+
+       info.msg_buf = out;
+       info.msg_total_size = bufferSize;
+       info.msg_pack_size = bufferSize > SOCKET_SEND_SIZE ? SOCKET_SEND_SIZE : bufferSize;
+
        AFTER_ORIGINAL_TIZEN_SOCK_WAIT_FUNC_END("Socket::Send", VT_ULONG, pret,
-                       (unsigned int)this, (unsigned int)this, SOCKET_API_SEND_END, out,
-                       buffer.GetLimit(), hostinfo, "x", (unsigned int)&buffer);
+                       (unsigned int)this, (unsigned int)this, SOCKET_API_SEND_END,
+                       info, "x", (unsigned int)&buffer);
        delete [] out;
        return pret;
 }
@@ -777,16 +767,19 @@ result Socket::Send(void* pBuffer, int length, int& sentLength) {
                        Sendp);
 
        AFTER_ORIGINAL_TIZEN_SOCK_WAIT_FUNC_START("Socket::Send", VT_NULL, NULL,
-                       (unsigned int)this, (unsigned int)this, SOCKET_API_SEND_START, "",
-                       0, hostinfo, "xdx",
+                       (unsigned int)this, (unsigned int)this, SOCKET_API_SEND_START, 
+                       info, "xdx",
                        (unsigned int)&pBuffer, length, (unsigned int)&sentLength);
 
        pret = (this->*Sendp)(pBuffer, length, sentLength);
 
+       info.msg_buf = (char *)pBuffer;
+       info.msg_total_size = length;
+       info.msg_pack_size = length > SOCKET_SEND_SIZE ? SOCKET_SEND_SIZE : length;
+
        AFTER_ORIGINAL_TIZEN_SOCK_WAIT_FUNC_END("Socket::Send", VT_ULONG, pret,
                        (unsigned int)this, (unsigned int)this, SOCKET_API_SEND_END,
-                       (char*)pBuffer, length, hostinfo, "xdx",
-                       (unsigned int)&pBuffer, length, (unsigned int)&sentLength);
+                       info, "xdx", (unsigned int)&pBuffer, length, (unsigned int)&sentLength);
 
        return pret;
 
@@ -808,12 +801,12 @@ result Socket::SendTo(Tizen::Base::ByteBuffer& buffer,
        WcharToChar(temp, iv4PeerAddr->ToString().GetPointer());
        char addressInfo[64];
        sprintf(addressInfo, "%s:%d", temp, remoteEndPoint.GetPort());
-       hostinfo.port = remoteEndPoint.GetPort();
-       iv4PeerAddr->GetAddress(&hostinfo.ip);
+       info.host_port = remoteEndPoint.GetPort();
+       iv4PeerAddr->GetAddress(&info.host_ip);
 
        AFTER_ORIGINAL_TIZEN_SOCK_WAIT_FUNC_START("Socket::SendTo", VT_NULL, NULL,
-                       (unsigned int)this, (unsigned int)this, SOCKET_API_SEND_START, "",
-                       0, hostinfo, "xs", (unsigned int)&buffer, temp);
+                       (unsigned int)this, (unsigned int)this, SOCKET_API_SEND_START, 
+                       info, "xs", (unsigned int)&buffer, temp);
 
        pret = (this->*SendTop)(buffer, remoteEndPoint);
 
@@ -824,17 +817,14 @@ result Socket::SendTo(Tizen::Base::ByteBuffer& buffer,
        strData.Append(pBuffer);
        char* out = new char[bufferSize];
        WcharToChar(out, strData.GetPointer());
-       int socketSendSize = SOCKET_SEND_SIZE;
-       if (socketSendSize != 0 && socketSendSize < bufferSize) {
-               out[socketSendSize + 1] = '.';
-               out[socketSendSize + 2] = '.';
-               out[socketSendSize + 3] = '.';
-               out[socketSendSize + 4] = '\0';
-       }
+
+       info.msg_buf = out;
+       info.msg_total_size = bufferSize;
+       info.msg_pack_size = bufferSize > SOCKET_SEND_SIZE ? SOCKET_SEND_SIZE : bufferSize;
 
        AFTER_ORIGINAL_TIZEN_SOCK_WAIT_FUNC_END("Socket::SendTo", VT_ULONG, pret,
-                       (unsigned int)this, (unsigned int)this, SOCKET_API_SEND_END, out,
-                       buffer.GetLimit(), hostinfo, "xs", (unsigned int)&buffer, temp);
+                       (unsigned int)this, (unsigned int)this, SOCKET_API_SEND_END,
+                       info, "xs", (unsigned int)&buffer, temp);
        delete [] out;
        return pret;
 }
@@ -855,20 +845,24 @@ result Socket::SendTo(void* pBuffer, int length,
        WcharToChar(temp, iv4PeerAddr->ToString().GetPointer());
        char addressInfo[64];
        sprintf(addressInfo, "%s:%d", temp, remoteEndPoint.GetPort());
-       hostinfo.port = remoteEndPoint.GetPort();
-       iv4PeerAddr->GetAddress(&hostinfo.ip);
+       info.host_port = remoteEndPoint.GetPort();
+       iv4PeerAddr->GetAddress(&info.host_ip);
 
        AFTER_ORIGINAL_TIZEN_SOCK_WAIT_FUNC_START("Socket::SendTo", VT_NULL, NULL,
-                       (unsigned int)this, (unsigned int)this, SOCKET_API_SEND_START, "",
-                       0, hostinfo, "xdsx,",
+                       (unsigned int)this, (unsigned int)this, SOCKET_API_SEND_START, 
+                       info, "xdsx,",
                        (unsigned int)&pBuffer, length, temp, (unsigned int)&sentLength);
 
        pret = (this->*SendTop)(pBuffer, length, remoteEndPoint, sentLength);
 
+       info.msg_buf = (char *)pBuffer;
+       info.msg_total_size = length;
+       info.msg_pack_size = length > SOCKET_SEND_SIZE ? SOCKET_SEND_SIZE : length;
+
        AFTER_ORIGINAL_TIZEN_SOCK_WAIT_FUNC_END("Socket::SendTo", VT_ULONG, pret,
                        (unsigned int)this, (unsigned int)this, SOCKET_API_SEND_END,
-                       (char*)pBuffer, length, hostinfo, "xdsx,",
-                       (unsigned int)&pBuffer, length, temp, (unsigned int)&sentLength);
+                       info, "xdsx,", (unsigned int)&pBuffer, length, temp,
+                       (unsigned int)&sentLength);
 
        return pret;
 
@@ -887,7 +881,7 @@ result Socket::AddSocketListener(ISocketEventListener& listener) {
        retVal = (this->*AddSocketListenerp)(listener);
 
        AFTER_ORIGINAL_TIZEN_SOCK("Socket::AddSocketListener", VT_ULONG, retVal,
-                       (unsigned int)this, (unsigned int)this, SOCKET_API_OTHER, "", 0, hostinfo,
+                       (unsigned int)this, (unsigned int)this, SOCKET_API_OTHER, info,
                        "x", (unsigned int) &listener);
 
        return retVal;
@@ -905,7 +899,7 @@ result Socket::AsyncSelectByListener(unsigned long socketEventType) {
        retVal = (this->*AsyncSelectByListenerp)(socketEventType);
 
        AFTER_ORIGINAL_TIZEN_SOCK("Socket::AsyncSelectByListener", VT_ULONG, retVal,
-                       (unsigned int)this, (unsigned int)this, SOCKET_API_OTHER, "", 0, hostinfo,
+                       (unsigned int)this, (unsigned int)this, SOCKET_API_OTHER, info,
                        "x", socketEventType);
 
        return retVal;
@@ -924,7 +918,7 @@ result Socket::Ioctl(NetSocketIoctlCmd cmd, unsigned long& value) const {
        retVal = (this->*Ioctlp)(cmd, value);
 
        AFTER_ORIGINAL_TIZEN_SOCK("Socket::Ioctl", VT_ULONG, retVal,
-                       (unsigned int)this, (unsigned int)this, SOCKET_API_OTHER, "", 0, hostinfo,
+                       (unsigned int)this, (unsigned int)this, SOCKET_API_OTHER, info,
                        "dx", cmd, (unsigned int) &value);
 
        return retVal;
@@ -944,7 +938,7 @@ result Socket::SetSockOpt(NetSocketOptLevel optionLevel,
        retVal = (this->*SetSockOptp)(optionLevel, optionName, optionValue);
 
        AFTER_ORIGINAL_TIZEN_SOCK("Socket::SetSockOpt", VT_ULONG, retVal,
-                       (unsigned int)this, (unsigned int)this, SOCKET_API_OTHER, "", 0, hostinfo,
+                       (unsigned int)this, (unsigned int)this, SOCKET_API_OTHER, info,
                        "ddd", optionLevel, optionName, optionValue);
 
        return retVal;
@@ -963,7 +957,7 @@ result Socket::SetSockOpt(NetSocketOptLevel optionLevel,
        retVal = (this->*SetSockOptp)(optionLevel, optionName, optionValue);
 
        AFTER_ORIGINAL_TIZEN_SOCK("Socket::SetSockOpt", VT_ULONG, retVal,
-                       (unsigned int)this, (unsigned int)this, SOCKET_API_OTHER, "", 0, hostinfo,
+                       (unsigned int)this, (unsigned int)this, SOCKET_API_OTHER, info,
                        "ddx",
                        optionLevel, optionName, (unsigned int) &optionValue);
 
@@ -985,7 +979,7 @@ result Socket::SetSockOpt(NetSocketOptLevel optionLevel,
        retVal = (this->*SetSockOptp)(optionLevel, optionName, optionValue);
 
        AFTER_ORIGINAL_TIZEN_SOCK("Socket::SetSockOpt", VT_ULONG, retVal,
-                       (unsigned int)this, (unsigned int)this, SOCKET_API_OTHER, "", 0, hostinfo,
+                       (unsigned int)this, (unsigned int)this, SOCKET_API_OTHER, info,
                        "ddx",
                        optionLevel, optionName, (unsigned int) &optionValue);
 
@@ -1006,7 +1000,7 @@ result Socket::GetSockOpt(NetSocketOptLevel optionLevel,
        retVal = (this->*GetSockOptp)(optionLevel, optionName, optionValue);
 
        AFTER_ORIGINAL_TIZEN_SOCK("Socket::GetSockOpt", VT_ULONG, retVal,
-                       (unsigned int)this, (unsigned int)this, SOCKET_API_OTHER, "", 0, hostinfo,
+                       (unsigned int)this, (unsigned int)this, SOCKET_API_OTHER, info,
                        "ddx",
                        optionLevel, optionName, (unsigned int) &optionValue);
 
@@ -1027,7 +1021,7 @@ result Socket::GetSockOpt(NetSocketOptLevel optionLevel,
        retVal = (this->*GetSockOptp)(optionLevel, optionName, optionValue);
 
        AFTER_ORIGINAL_TIZEN_SOCK("Socket::GetSockOpt", VT_ULONG, retVal,
-                       (unsigned int)this, (unsigned int)this, SOCKET_API_OTHER, "", 0, hostinfo,
+                       (unsigned int)this, (unsigned int)this, SOCKET_API_OTHER, info,
                        "ddx",
                        optionLevel, optionName, (unsigned int) &optionValue);
 
@@ -1046,7 +1040,7 @@ result Socket::RemoveSocketListener(ISocketEventListener& listener) {
        retVal = (this->*RemoveSocketListenerp)(listener);
 
        AFTER_ORIGINAL_TIZEN_SOCK("Socket::RemoveSocketListener", VT_ULONG, retVal,
-                       (unsigned int)this, (unsigned int)this, SOCKET_API_OTHER, "", 0, hostinfo,
+                       (unsigned int)this, (unsigned int)this, SOCKET_API_OTHER, info,
                        "x", (unsigned int) &listener);
 
        return retVal;