treewide: remove redundant IS_ERR() before error code check
[linux/fpc-iii.git] / tools / testing / selftests / android / ion / ipcsocket.h
blobb3e84498a8a16d8bc0f76f648e7598e51d31d0f3
2 #ifndef _IPCSOCKET_H
3 #define _IPCSOCKET_H
6 #define MAX_SOCK_NAME_LEN 64
8 char sock_name[MAX_SOCK_NAME_LEN];
10 /* This structure is responsible for holding the IPC data
11 * data: hold the buffer fd
12 * len: just the length of 32-bit integer fd
14 struct socketdata {
15 int data;
16 unsigned int len;
19 /* This API is used to open the IPC socket connection
20 * name: implies a unique socket name in the system
21 * connecttype: implies server(0) or client(1)
23 int opensocket(int *sockfd, const char *name, int connecttype);
25 /* This is the API to send socket data over IPC socket */
26 int sendtosocket(int sockfd, struct socketdata *data);
28 /* This is the API to receive socket data over IPC socket */
29 int receivefromsocket(int sockfd, struct socketdata *data);
31 /* This is the API to close the socket connection */
32 int closesocket(int sockfd, char *name);
35 #endif