qrtr.h 878 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
  2. #ifndef _LINUX_QRTR_H
  3. #define _LINUX_QRTR_H
  4. #include <linux/socket.h>
  5. #include <linux/types.h>
  6. #define QRTR_NODE_BCAST 0xffffffffu
  7. #define QRTR_PORT_CTRL 0xfffffffeu
  8. struct sockaddr_qrtr {
  9. __kernel_sa_family_t sq_family;
  10. __u32 sq_node;
  11. __u32 sq_port;
  12. };
  13. enum qrtr_pkt_type {
  14. QRTR_TYPE_DATA = 1,
  15. QRTR_TYPE_HELLO = 2,
  16. QRTR_TYPE_BYE = 3,
  17. QRTR_TYPE_NEW_SERVER = 4,
  18. QRTR_TYPE_DEL_SERVER = 5,
  19. QRTR_TYPE_DEL_CLIENT = 6,
  20. QRTR_TYPE_RESUME_TX = 7,
  21. QRTR_TYPE_EXIT = 8,
  22. QRTR_TYPE_PING = 9,
  23. QRTR_TYPE_NEW_LOOKUP = 10,
  24. QRTR_TYPE_DEL_LOOKUP = 11,
  25. };
  26. struct qrtr_ctrl_pkt {
  27. __le32 cmd;
  28. union {
  29. struct {
  30. __le32 service;
  31. __le32 instance;
  32. __le32 node;
  33. __le32 port;
  34. } server;
  35. struct {
  36. __le32 node;
  37. __le32 port;
  38. } client;
  39. };
  40. } __packed;
  41. #endif /* _LINUX_QRTR_H */