mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
2e378e8de8
QMI Server lookup returns only node_id and port_id. This information is not sufficient when the QMI clients look for a specific instance of a service. Hence the server lookup routine returns the instance ID along with the server address information. Change-Id: I644e6c8bb9dc3108c0198b7779ef277aa65f7bc5 Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
80 lines
1.5 KiB
C
80 lines
1.5 KiB
C
#ifndef _LINUX_MSM_IPC_H_
|
|
#define _LINUX_MSM_IPC_H_
|
|
|
|
#include <linux/types.h>
|
|
#include <linux/ioctl.h>
|
|
|
|
struct msm_ipc_port_addr {
|
|
uint32_t node_id;
|
|
uint32_t port_id;
|
|
};
|
|
|
|
struct msm_ipc_port_name {
|
|
uint32_t service;
|
|
uint32_t instance;
|
|
};
|
|
|
|
struct msm_ipc_addr {
|
|
unsigned char addrtype;
|
|
union {
|
|
struct msm_ipc_port_addr port_addr;
|
|
struct msm_ipc_port_name port_name;
|
|
} addr;
|
|
};
|
|
|
|
#define MSM_IPC_WAIT_FOREVER (~0) /* timeout for permanent subscription */
|
|
|
|
/*
|
|
* Socket API
|
|
*/
|
|
|
|
#ifndef AF_MSM_IPC
|
|
#define AF_MSM_IPC 27
|
|
#endif
|
|
|
|
#ifndef PF_MSM_IPC
|
|
#define PF_MSM_IPC AF_MSM_IPC
|
|
#endif
|
|
|
|
#define MSM_IPC_ADDR_NAME 1
|
|
#define MSM_IPC_ADDR_ID 2
|
|
|
|
struct sockaddr_msm_ipc {
|
|
unsigned short family;
|
|
struct msm_ipc_addr address;
|
|
unsigned char reserved;
|
|
};
|
|
|
|
#define IPC_ROUTER_IOCTL_MAGIC (0xC3)
|
|
|
|
#define IPC_ROUTER_IOCTL_GET_VERSION \
|
|
_IOR(IPC_ROUTER_IOCTL_MAGIC, 0, unsigned int)
|
|
|
|
#define IPC_ROUTER_IOCTL_GET_MTU \
|
|
_IOR(IPC_ROUTER_IOCTL_MAGIC, 1, unsigned int)
|
|
|
|
#define IPC_ROUTER_IOCTL_LOOKUP_SERVER \
|
|
_IOWR(IPC_ROUTER_IOCTL_MAGIC, 2, struct sockaddr_msm_ipc)
|
|
|
|
#define IPC_ROUTER_IOCTL_GET_CURR_PKT_SIZE \
|
|
_IOR(IPC_ROUTER_IOCTL_MAGIC, 3, unsigned int)
|
|
|
|
#define IPC_ROUTER_IOCTL_BIND_CONTROL_PORT \
|
|
_IOR(IPC_ROUTER_IOCTL_MAGIC, 4, unsigned int)
|
|
|
|
struct msm_ipc_server_info {
|
|
uint32_t node_id;
|
|
uint32_t port_id;
|
|
uint32_t service;
|
|
uint32_t instance;
|
|
};
|
|
|
|
struct server_lookup_args {
|
|
struct msm_ipc_port_name port_name;
|
|
int num_entries_in_array;
|
|
int num_entries_found;
|
|
uint32_t lookup_mask;
|
|
struct msm_ipc_server_info srv_info[0];
|
|
};
|
|
|
|
#endif
|