History

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.

Bjorn Andersson committed 9 years ago

Commit da7653f1 parent 28978712 files · +32 −12Browse files

Showing the changes to include/uapi/linux (1 of 2 files). Show all

Unified · Split

include/uapi/linux/qrtr.h+32−0
@@ -13,4 +13,36 @@ struct sockaddr_qrtr { · 12 unmodified lines
1313 __u32 sq_port;
1414 };
1515
16+enum qrtr_pkt_type {
17+ QRTR_TYPE_DATA = 1,
18+ QRTR_TYPE_HELLO = 2,
19+ QRTR_TYPE_BYE = 3,
20+ QRTR_TYPE_NEW_SERVER = 4,
21+ QRTR_TYPE_DEL_SERVER = 5,
22+ QRTR_TYPE_DEL_CLIENT = 6,
23+ QRTR_TYPE_RESUME_TX = 7,
24+ QRTR_TYPE_EXIT = 8,
25+ QRTR_TYPE_PING = 9,
26+ QRTR_TYPE_NEW_LOOKUP = 10,
27+ QRTR_TYPE_DEL_LOOKUP = 11,
28+};
29+
30+struct qrtr_ctrl_pkt {
31+ __le32 cmd;
32+
33+ union {
34+ struct {
35+ __le32 service;
36+ __le32 instance;
37+ __le32 node;
38+ __le32 port;
39+ } server;
40+
41+ struct {
42+ __le32 node;
43+ __le32 port;
44+ } client;
45+ };
46+} __packed;
47+
1648 #endif /* _LINUX_QRTR_H */