diff options
author | Ingo Molnar <mingo@kernel.org> | 2017-12-06 22:39:39 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2017-12-06 22:39:39 +0100 |
commit | d6eabce2577a695197e9433302fd6a9f0e1a7666 (patch) | |
tree | e5c5bcc7803879d5d911cc8faeb74a946c242395 /tools/testing/selftests/android/ion/ipcsocket.h | |
parent | Merge branch 'perf/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent (diff) | |
parent | x86: don't hash faulting address in oops printout (diff) | |
download | linux-dev-d6eabce2577a695197e9433302fd6a9f0e1a7666.tar.xz linux-dev-d6eabce2577a695197e9433302fd6a9f0e1a7666.zip |
Merge branch 'linus' into perf/urgent, to synchronize UAPI headers
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/testing/selftests/android/ion/ipcsocket.h')
-rw-r--r-- | tools/testing/selftests/android/ion/ipcsocket.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/tools/testing/selftests/android/ion/ipcsocket.h b/tools/testing/selftests/android/ion/ipcsocket.h new file mode 100644 index 000000000000..b3e84498a8a1 --- /dev/null +++ b/tools/testing/selftests/android/ion/ipcsocket.h @@ -0,0 +1,35 @@ + +#ifndef _IPCSOCKET_H +#define _IPCSOCKET_H + + +#define MAX_SOCK_NAME_LEN 64 + +char sock_name[MAX_SOCK_NAME_LEN]; + +/* This structure is responsible for holding the IPC data + * data: hold the buffer fd + * len: just the length of 32-bit integer fd + */ +struct socketdata { + int data; + unsigned int len; +}; + +/* This API is used to open the IPC socket connection + * name: implies a unique socket name in the system + * connecttype: implies server(0) or client(1) + */ +int opensocket(int *sockfd, const char *name, int connecttype); + +/* This is the API to send socket data over IPC socket */ +int sendtosocket(int sockfd, struct socketdata *data); + +/* This is the API to receive socket data over IPC socket */ +int receivefromsocket(int sockfd, struct socketdata *data); + +/* This is the API to close the socket connection */ +int closesocket(int sockfd, char *name); + + +#endif |