This repository has been archived on 2024-06-18. You can view files and clone it, but cannot push or open issues/pull-requests.
2018-10-10 23:08:58 +02:00
|
|
|
#ifndef __IPC_CLIENT_H__
|
|
|
|
#define __IPC_CLIENT_H__
|
2018-10-04 01:22:50 +02:00
|
|
|
|
|
|
|
struct ipc_client {
|
|
|
|
unsigned int version;
|
|
|
|
unsigned int index;
|
|
|
|
int proc_fd;
|
|
|
|
};
|
|
|
|
|
2018-10-04 22:51:31 +02:00
|
|
|
struct ipc_clients {
|
2018-10-04 01:54:12 +02:00
|
|
|
struct ipc_client **clients;
|
2018-10-04 01:22:50 +02:00
|
|
|
int size;
|
|
|
|
};
|
|
|
|
|
2018-10-08 16:15:35 +02:00
|
|
|
// store and remove only pointers on allocated structures
|
2018-10-04 22:51:31 +02:00
|
|
|
int ipc_client_add (struct ipc_clients *, struct ipc_client *);
|
2018-10-08 16:15:35 +02:00
|
|
|
int ipc_client_del (struct ipc_clients *, struct ipc_client *);
|
2018-10-04 01:22:50 +02:00
|
|
|
|
2018-10-08 16:15:35 +02:00
|
|
|
void ipc_clients_print (struct ipc_clients *);
|
|
|
|
void ipc_clients_free (struct ipc_clients *);
|
2018-10-04 01:22:50 +02:00
|
|
|
|
|
|
|
struct ipc_client * ipc_server_client_copy (const struct ipc_client *p);
|
|
|
|
int ipc_server_client_eq (const struct ipc_client *p1, const struct ipc_client *p2);
|
|
|
|
// create the service client structure
|
|
|
|
void ipc_server_client_gen (struct ipc_client *p
|
|
|
|
, unsigned int index, unsigned int version);
|
|
|
|
|
|
|
|
void client_print (struct ipc_client *);
|
|
|
|
#endif
|