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.
Showing the changes to include/uapi/linux (1 of 2 files). Show all
Unified · Split
| @@ -13,4 +13,36 @@ struct sockaddr_qrtr { · 12 unmodified lines | ||
| 13 | 13 | __u32 sq_port; |
| 14 | 14 | }; |
| 15 | 15 | |
| 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 | + | |
| 16 | 48 | #endif /* _LINUX_QRTR_H */ |