4 * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
8 * Jaewon Lim <jaewon81.lim@samsung.com>
9 * Woojin Jung <woojin2.jung@samsung.com>
10 * Juyoung Kim <j0.kim@samsung.com>
12 * This library is free software; you can redistribute it and/or modify it under
13 * the terms of the GNU Lesser General Public License as published by the
14 * Free Software Foundation; either version 2.1 of the License, or (at your option)
17 * This library is distributed in the hope that it will be useful, but WITHOUT ANY
18 * WARRANTY; without even the implied warranty of MERCHANTABILITY or
19 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
20 * License for more details.
22 * You should have received a copy of the GNU Lesser General Public License
23 * along with this library; if not, write to the Free Software Foundation, Inc., 51
24 * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
31 #ifndef __DA_SOCKET_H__
32 #define __DA_SOCKET_H__
36 #define POST_PROBEBLOCK_MIDDLE_SOCK(SIZE, FD, APITYPE, PATH) \
37 log.length += sprintf(log.data + log.length, "`,%u`,%d`,%d`,%d`,0`,%s", \
38 SIZE, FD, FD_SOCKET, APITYPE, PATH)
40 #define POST_PROBEBLOCK_MIDDLE_NOSOCK(SIZE, APITYPE, PATH) \
41 log.length += sprintf(log.data + log.length, "`,%u`,`,%d`,%d`,0`,%s", \
42 SIZE, FD_SOCKET, APITYPE, PATH)
44 #define POST_PROBEBLOCK_CALLSTACK_SOCKET() \
45 POST_PROBEBLOCK_CALLSTACK()
47 #define AFTER_ORIGINAL_SOCK_RET(RTYPE, RVAL, SIZE, FD, APITYPE, INPUTFORMAT, ...) \
48 POST_PROBEBLOCK_BEGIN(LC_RESOURCE, RTYPE, RVAL, INPUTFORMAT, __VA_ARGS__); \
49 POST_PROBEBLOCK_MIDDLE_SOCK(SIZE, FD, APITYPE, ""); \
50 POST_PROBEBLOCK_CALLSTACK_SOCKET(); \
53 #define AFTER_ORIGINAL_NOSOCK_RET(RTYPE, RVAL, SIZE, APITYPE, INPUTFORMAT, ...) \
54 POST_PROBEBLOCK_BEGIN(LC_RESOURCE, RTYPE, RVAL, INPUTFORMAT, __VA_ARGS__); \
55 POST_PROBEBLOCK_MIDDLE_NOSOCK(SIZE, APITYPE, ""); \
56 POST_PROBEBLOCK_CALLSTACK_SOCKET(); \
59 #define AFTER_ORIGINAL_SOCK(SIZE, FD, APITYPE, INPUTFORMAT, ...) \
60 AFTER_ORIGINAL_SOCK_RET(VT_INT, ret, SIZE, FD, APITYPE, INPUTFORMAT, __VA_ARGS__)
62 #define AFTER_ORIGINAL_NOSOCK(SIZE, APITYPE, INPUTFORMAT, ...) \
63 AFTER_ORIGINAL_NOSOCK_RET(VT_INT, ret, SIZE, APITYPE, INPUTFORMAT, __VA_ARGS__)
65 #endif // __DA_SOCKET_H__