Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 1 | /**************************************************************************** |
| 2 | **************************************************************************** |
| 3 | *** |
| 4 | *** This header was automatically generated from a Linux kernel header |
| 5 | *** of the same name, to make information necessary for userspace to |
| 6 | *** call into the kernel available to libc. It contains only constants, |
| 7 | *** structures, and macros generated from the original header, and thus, |
| 8 | *** contains no copyrightable information. |
| 9 | *** |
| 10 | *** To edit the content of this header, modify the corresponding |
| 11 | *** source file (e.g. under external/kernel-headers/original/) then |
| 12 | *** run bionic/libc/kernel/tools/update_all.py |
| 13 | *** |
| 14 | *** Any manual change here will be lost the next time this script will |
| 15 | *** be run. You've been warned! |
| 16 | *** |
| 17 | **************************************************************************** |
| 18 | ****************************************************************************/ |
| 19 | #ifndef _LINUX_TIPC_H_ |
| 20 | #define _LINUX_TIPC_H_ |
| 21 | #include <linux/types.h> |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 22 | #include <linux/sockios.h> |
Christopher Ferris | 76a1d45 | 2018-06-27 14:12:29 -0700 | [diff] [blame] | 23 | struct tipc_socket_addr { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 24 | __u32 ref; |
| 25 | __u32 node; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 26 | }; |
Christopher Ferris | 76a1d45 | 2018-06-27 14:12:29 -0700 | [diff] [blame] | 27 | struct tipc_service_addr { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 28 | __u32 type; |
| 29 | __u32 instance; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 30 | }; |
Christopher Ferris | 76a1d45 | 2018-06-27 14:12:29 -0700 | [diff] [blame] | 31 | struct tipc_service_range { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 32 | __u32 type; |
| 33 | __u32 lower; |
| 34 | __u32 upper; |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 35 | }; |
Christopher Ferris | 76a1d45 | 2018-06-27 14:12:29 -0700 | [diff] [blame] | 36 | #define TIPC_NODE_STATE 0 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 37 | #define TIPC_TOP_SRV 1 |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 38 | #define TIPC_LINK_STATE 2 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 39 | #define TIPC_RESERVED_TYPES 64 |
Christopher Ferris | 76a1d45 | 2018-06-27 14:12:29 -0700 | [diff] [blame] | 40 | enum tipc_scope { |
| 41 | TIPC_CLUSTER_SCOPE = 2, |
| 42 | TIPC_NODE_SCOPE = 3 |
| 43 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 44 | #define TIPC_MAX_USER_MSG_SIZE 66000U |
| 45 | #define TIPC_LOW_IMPORTANCE 0 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 46 | #define TIPC_MEDIUM_IMPORTANCE 1 |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 47 | #define TIPC_HIGH_IMPORTANCE 2 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 48 | #define TIPC_CRITICAL_IMPORTANCE 3 |
| 49 | #define TIPC_OK 0 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 50 | #define TIPC_ERR_NO_NAME 1 |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 51 | #define TIPC_ERR_NO_PORT 2 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 52 | #define TIPC_ERR_NO_NODE 3 |
| 53 | #define TIPC_ERR_OVERLOAD 4 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 54 | #define TIPC_CONN_SHUTDOWN 5 |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 55 | #define TIPC_SUB_PORTS 0x01 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 56 | #define TIPC_SUB_SERVICE 0x02 |
| 57 | #define TIPC_SUB_CANCEL 0x04 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 58 | #define TIPC_WAIT_FOREVER (~0) |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 59 | struct tipc_subscr { |
Christopher Ferris | 76a1d45 | 2018-06-27 14:12:29 -0700 | [diff] [blame] | 60 | struct tipc_service_range seq; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 61 | __u32 timeout; |
| 62 | __u32 filter; |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 63 | char usr_handle[8]; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 64 | }; |
| 65 | #define TIPC_PUBLISHED 1 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 66 | #define TIPC_WITHDRAWN 2 |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 67 | #define TIPC_SUBSCR_TIMEOUT 3 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 68 | struct tipc_event { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 69 | __u32 event; |
| 70 | __u32 found_lower; |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 71 | __u32 found_upper; |
Christopher Ferris | 76a1d45 | 2018-06-27 14:12:29 -0700 | [diff] [blame] | 72 | struct tipc_socket_addr port; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 73 | struct tipc_subscr s; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 74 | }; |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 75 | #ifndef AF_TIPC |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 76 | #define AF_TIPC 30 |
| 77 | #endif |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 78 | #ifndef PF_TIPC |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 79 | #define PF_TIPC AF_TIPC |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 80 | #endif |
| 81 | #ifndef SOL_TIPC |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 82 | #define SOL_TIPC 271 |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 83 | #endif |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 84 | #define TIPC_ADDR_MCAST 1 |
Christopher Ferris | 76a1d45 | 2018-06-27 14:12:29 -0700 | [diff] [blame] | 85 | #define TIPC_SERVICE_RANGE 1 |
| 86 | #define TIPC_SERVICE_ADDR 2 |
| 87 | #define TIPC_SOCKET_ADDR 3 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 88 | struct sockaddr_tipc { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 89 | unsigned short family; |
| 90 | unsigned char addrtype; |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 91 | signed char scope; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 92 | union { |
Christopher Ferris | 76a1d45 | 2018-06-27 14:12:29 -0700 | [diff] [blame] | 93 | struct tipc_socket_addr id; |
| 94 | struct tipc_service_range nameseq; |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 95 | struct { |
Christopher Ferris | 76a1d45 | 2018-06-27 14:12:29 -0700 | [diff] [blame] | 96 | struct tipc_service_addr name; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 97 | __u32 domain; |
| 98 | } name; |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 99 | } addr; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 100 | }; |
| 101 | #define TIPC_ERRINFO 1 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 102 | #define TIPC_RETDATA 2 |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 103 | #define TIPC_DESTNAME 3 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 104 | #define TIPC_IMPORTANCE 127 |
| 105 | #define TIPC_SRC_DROPPABLE 128 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 106 | #define TIPC_DEST_DROPPABLE 129 |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 107 | #define TIPC_CONN_TIMEOUT 130 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 108 | #define TIPC_NODE_RECVQ_DEPTH 131 |
| 109 | #define TIPC_SOCK_RECVQ_DEPTH 132 |
Christopher Ferris | 525ce91 | 2017-07-26 13:12:53 -0700 | [diff] [blame] | 110 | #define TIPC_MCAST_BROADCAST 133 |
| 111 | #define TIPC_MCAST_REPLICAST 134 |
Christopher Ferris | 934ec94 | 2018-01-31 15:29:16 -0800 | [diff] [blame] | 112 | #define TIPC_GROUP_JOIN 135 |
| 113 | #define TIPC_GROUP_LEAVE 136 |
Christopher Ferris | aeddbcf | 2019-07-08 12:45:46 -0700 | [diff] [blame^] | 114 | #define TIPC_SOCK_RECVQ_USED 137 |
Christopher Ferris | 934ec94 | 2018-01-31 15:29:16 -0800 | [diff] [blame] | 115 | #define TIPC_GROUP_LOOPBACK 0x1 |
| 116 | #define TIPC_GROUP_MEMBER_EVTS 0x2 |
| 117 | struct tipc_group_req { |
| 118 | __u32 type; |
| 119 | __u32 instance; |
| 120 | __u32 scope; |
| 121 | __u32 flags; |
| 122 | }; |
Christopher Ferris | 9ce2884 | 2018-10-25 12:11:39 -0700 | [diff] [blame] | 123 | #define TIPC_NODEID_LEN 16 |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 124 | #define TIPC_MAX_MEDIA_NAME 16 |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 125 | #define TIPC_MAX_IF_NAME 16 |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 126 | #define TIPC_MAX_BEARER_NAME 32 |
Christopher Ferris | 76a1d45 | 2018-06-27 14:12:29 -0700 | [diff] [blame] | 127 | #define TIPC_MAX_LINK_NAME 68 |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 128 | #define SIOCGETLINKNAME SIOCPROTOPRIVATE |
Christopher Ferris | 9ce2884 | 2018-10-25 12:11:39 -0700 | [diff] [blame] | 129 | #define SIOCGETNODEID (SIOCPROTOPRIVATE + 1) |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 130 | struct tipc_sioc_ln_req { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 131 | __u32 peer; |
| 132 | __u32 bearer_id; |
| 133 | char linkname[TIPC_MAX_LINK_NAME]; |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 134 | }; |
Christopher Ferris | 9ce2884 | 2018-10-25 12:11:39 -0700 | [diff] [blame] | 135 | struct tipc_sioc_nodeid_req { |
| 136 | __u32 peer; |
| 137 | char node_id[TIPC_NODEID_LEN]; |
| 138 | }; |
Christopher Ferris | 76a1d45 | 2018-06-27 14:12:29 -0700 | [diff] [blame] | 139 | #define TIPC_CFG_SRV 0 |
| 140 | #define TIPC_ZONE_SCOPE 1 |
| 141 | #define TIPC_ADDR_NAMESEQ 1 |
| 142 | #define TIPC_ADDR_NAME 2 |
| 143 | #define TIPC_ADDR_ID 3 |
| 144 | #define TIPC_NODE_BITS 12 |
| 145 | #define TIPC_CLUSTER_BITS 12 |
| 146 | #define TIPC_ZONE_BITS 8 |
| 147 | #define TIPC_NODE_OFFSET 0 |
| 148 | #define TIPC_CLUSTER_OFFSET TIPC_NODE_BITS |
| 149 | #define TIPC_ZONE_OFFSET (TIPC_CLUSTER_OFFSET + TIPC_CLUSTER_BITS) |
| 150 | #define TIPC_NODE_SIZE ((1UL << TIPC_NODE_BITS) - 1) |
| 151 | #define TIPC_CLUSTER_SIZE ((1UL << TIPC_CLUSTER_BITS) - 1) |
| 152 | #define TIPC_ZONE_SIZE ((1UL << TIPC_ZONE_BITS) - 1) |
| 153 | #define TIPC_NODE_MASK (TIPC_NODE_SIZE << TIPC_NODE_OFFSET) |
| 154 | #define TIPC_CLUSTER_MASK (TIPC_CLUSTER_SIZE << TIPC_CLUSTER_OFFSET) |
| 155 | #define TIPC_ZONE_MASK (TIPC_ZONE_SIZE << TIPC_ZONE_OFFSET) |
| 156 | #define TIPC_ZONE_CLUSTER_MASK (TIPC_ZONE_MASK | TIPC_CLUSTER_MASK) |
| 157 | #define tipc_portid tipc_socket_addr |
| 158 | #define tipc_name tipc_service_addr |
| 159 | #define tipc_name_seq tipc_service_range |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 160 | #endif |