1 /* 2 * This file is auto-generated. Modifications will be lost. 3 * 4 * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/ 5 * for more information. 6 */ 7 #ifndef _LINUX_TIPC_H_ 8 #define _LINUX_TIPC_H_ 9 #include <linux/types.h> 10 #include <linux/sockios.h> 11 struct tipc_socket_addr { 12 __u32 ref; 13 __u32 node; 14 }; 15 struct tipc_service_addr { 16 __u32 type; 17 __u32 instance; 18 }; 19 struct tipc_service_range { 20 __u32 type; 21 __u32 lower; 22 __u32 upper; 23 }; 24 #define TIPC_NODE_STATE 0 25 #define TIPC_TOP_SRV 1 26 #define TIPC_LINK_STATE 2 27 #define TIPC_RESERVED_TYPES 64 28 enum tipc_scope { 29 TIPC_CLUSTER_SCOPE = 2, 30 TIPC_NODE_SCOPE = 3 31 }; 32 #define TIPC_MAX_USER_MSG_SIZE 66000U 33 #define TIPC_LOW_IMPORTANCE 0 34 #define TIPC_MEDIUM_IMPORTANCE 1 35 #define TIPC_HIGH_IMPORTANCE 2 36 #define TIPC_CRITICAL_IMPORTANCE 3 37 #define TIPC_OK 0 38 #define TIPC_ERR_NO_NAME 1 39 #define TIPC_ERR_NO_PORT 2 40 #define TIPC_ERR_NO_NODE 3 41 #define TIPC_ERR_OVERLOAD 4 42 #define TIPC_CONN_SHUTDOWN 5 43 #define TIPC_SUB_PORTS 0x01 44 #define TIPC_SUB_SERVICE 0x02 45 #define TIPC_SUB_CANCEL 0x04 46 #define TIPC_WAIT_FOREVER (~0) 47 struct tipc_subscr { 48 struct tipc_service_range seq; 49 __u32 timeout; 50 __u32 filter; 51 char usr_handle[8]; 52 }; 53 #define TIPC_PUBLISHED 1 54 #define TIPC_WITHDRAWN 2 55 #define TIPC_SUBSCR_TIMEOUT 3 56 struct tipc_event { 57 __u32 event; 58 __u32 found_lower; 59 __u32 found_upper; 60 struct tipc_socket_addr port; 61 struct tipc_subscr s; 62 }; 63 #ifndef AF_TIPC 64 #define AF_TIPC 30 65 #endif 66 #ifndef PF_TIPC 67 #define PF_TIPC AF_TIPC 68 #endif 69 #ifndef SOL_TIPC 70 #define SOL_TIPC 271 71 #endif 72 #define TIPC_ADDR_MCAST 1 73 #define TIPC_SERVICE_RANGE 1 74 #define TIPC_SERVICE_ADDR 2 75 #define TIPC_SOCKET_ADDR 3 76 struct sockaddr_tipc { 77 unsigned short family; 78 unsigned char addrtype; 79 signed char scope; 80 union { 81 struct tipc_socket_addr id; 82 struct tipc_service_range nameseq; 83 struct { 84 struct tipc_service_addr name; 85 __u32 domain; 86 } name; 87 } addr; 88 }; 89 #define TIPC_ERRINFO 1 90 #define TIPC_RETDATA 2 91 #define TIPC_DESTNAME 3 92 #define TIPC_IMPORTANCE 127 93 #define TIPC_SRC_DROPPABLE 128 94 #define TIPC_DEST_DROPPABLE 129 95 #define TIPC_CONN_TIMEOUT 130 96 #define TIPC_NODE_RECVQ_DEPTH 131 97 #define TIPC_SOCK_RECVQ_DEPTH 132 98 #define TIPC_MCAST_BROADCAST 133 99 #define TIPC_MCAST_REPLICAST 134 100 #define TIPC_GROUP_JOIN 135 101 #define TIPC_GROUP_LEAVE 136 102 #define TIPC_SOCK_RECVQ_USED 137 103 #define TIPC_NODELAY 138 104 #define TIPC_GROUP_LOOPBACK 0x1 105 #define TIPC_GROUP_MEMBER_EVTS 0x2 106 struct tipc_group_req { 107 __u32 type; 108 __u32 instance; 109 __u32 scope; 110 __u32 flags; 111 }; 112 #define TIPC_NODEID_LEN 16 113 #define TIPC_MAX_MEDIA_NAME 16 114 #define TIPC_MAX_IF_NAME 16 115 #define TIPC_MAX_BEARER_NAME 32 116 #define TIPC_MAX_LINK_NAME 68 117 #define SIOCGETLINKNAME SIOCPROTOPRIVATE 118 #define SIOCGETNODEID (SIOCPROTOPRIVATE + 1) 119 struct tipc_sioc_ln_req { 120 __u32 peer; 121 __u32 bearer_id; 122 char linkname[TIPC_MAX_LINK_NAME]; 123 }; 124 struct tipc_sioc_nodeid_req { 125 __u32 peer; 126 char node_id[TIPC_NODEID_LEN]; 127 }; 128 #define TIPC_AEAD_ALG_NAME (32) 129 struct tipc_aead_key { 130 char alg_name[TIPC_AEAD_ALG_NAME]; 131 unsigned int keylen; 132 char key[]; 133 }; 134 #define TIPC_AEAD_KEYLEN_MIN (16 + 4) 135 #define TIPC_AEAD_KEYLEN_MAX (32 + 4) 136 #define TIPC_AEAD_KEY_SIZE_MAX (sizeof(struct tipc_aead_key) + TIPC_AEAD_KEYLEN_MAX) 137 #define TIPC_REKEYING_NOW (~0U) 138 #define TIPC_CFG_SRV 0 139 #define TIPC_ZONE_SCOPE 1 140 #define TIPC_ADDR_NAMESEQ 1 141 #define TIPC_ADDR_NAME 2 142 #define TIPC_ADDR_ID 3 143 #define TIPC_NODE_BITS 12 144 #define TIPC_CLUSTER_BITS 12 145 #define TIPC_ZONE_BITS 8 146 #define TIPC_NODE_OFFSET 0 147 #define TIPC_CLUSTER_OFFSET TIPC_NODE_BITS 148 #define TIPC_ZONE_OFFSET (TIPC_CLUSTER_OFFSET + TIPC_CLUSTER_BITS) 149 #define TIPC_NODE_SIZE ((1UL << TIPC_NODE_BITS) - 1) 150 #define TIPC_CLUSTER_SIZE ((1UL << TIPC_CLUSTER_BITS) - 1) 151 #define TIPC_ZONE_SIZE ((1UL << TIPC_ZONE_BITS) - 1) 152 #define TIPC_NODE_MASK (TIPC_NODE_SIZE << TIPC_NODE_OFFSET) 153 #define TIPC_CLUSTER_MASK (TIPC_CLUSTER_SIZE << TIPC_CLUSTER_OFFSET) 154 #define TIPC_ZONE_MASK (TIPC_ZONE_SIZE << TIPC_ZONE_OFFSET) 155 #define TIPC_ZONE_CLUSTER_MASK (TIPC_ZONE_MASK | TIPC_CLUSTER_MASK) 156 #define tipc_portid tipc_socket_addr 157 #define tipc_name tipc_service_addr 158 #define tipc_name_seq tipc_service_range 159 #endif 160