Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8f471a72 authored by Bjorn Andersson's avatar Bjorn Andersson Committed by Naitik Bharadiya
Browse files

net: qrtr: Add control packet definition to uapi



The QMUX protocol specification defines structure of the special control
packet messages being sent between handlers of the control port.

Add these to the uapi header, as this structure and the associated types
are shared between the kernel and all userspace handlers of control
messages.

Change-Id: I6a90ed1da13ba6e904191b37ae8f509581230809
Signed-off-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Git-Commit: da7653f0faabbe45eb2d3fd6e4b400fe003e81ae
Git-Repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git


[bharad@codeaurora.org: resolve trivial merge conflicts]
Signed-off-by: default avatarNaitik Bharadiya <bharad@codeaurora.org>
parent 3b0fe0b2
Loading
Loading
Loading
Loading
+32 −0
Original line number Diff line number Diff line
@@ -9,4 +9,36 @@ struct sockaddr_qrtr {
	__u32 sq_port;
};

enum qrtr_pkt_type {
	QRTR_TYPE_DATA		= 1,
	QRTR_TYPE_HELLO		= 2,
	QRTR_TYPE_BYE		= 3,
	QRTR_TYPE_NEW_SERVER	= 4,
	QRTR_TYPE_DEL_SERVER	= 5,
	QRTR_TYPE_DEL_CLIENT	= 6,
	QRTR_TYPE_RESUME_TX	= 7,
	QRTR_TYPE_EXIT          = 8,
	QRTR_TYPE_PING          = 9,
	QRTR_TYPE_NEW_LOOKUP	= 10,
	QRTR_TYPE_DEL_LOOKUP	= 11,
};

struct qrtr_ctrl_pkt {
	__le32 cmd;

	union {
		struct {
			__le32 service;
			__le32 instance;
			__le32 node;
			__le32 port;
		} server;

		struct {
			__le32 node;
			__le32 port;
		} client;
	};
} __packed;

#endif /* _LINUX_QRTR_H */
+0 −12
Original line number Diff line number Diff line
@@ -26,18 +26,6 @@
#define QRTR_MIN_EPH_SOCKET 0x4000
#define QRTR_MAX_EPH_SOCKET 0x7fff

enum qrtr_pkt_type {
	QRTR_TYPE_DATA		= 1,
	QRTR_TYPE_HELLO		= 2,
	QRTR_TYPE_BYE		= 3,
	QRTR_TYPE_NEW_SERVER	= 4,
	QRTR_TYPE_DEL_SERVER	= 5,
	QRTR_TYPE_DEL_CLIENT	= 6,
	QRTR_TYPE_RESUME_TX	= 7,
	QRTR_TYPE_EXIT		= 8,
	QRTR_TYPE_PING		= 9,
};

/**
 * struct qrtr_hdr - (I|R)PCrouter packet header
 * @version: protocol version