Elliott Hughes | 180edef | 2023-11-02 00:08:05 +0000 | [diff] [blame] | 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 | */ |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 7 | #ifndef _LINUX_TIPC_CONFIG_H_ |
| 8 | #define _LINUX_TIPC_CONFIG_H_ |
| 9 | #include <linux/types.h> |
| 10 | #include <linux/string.h> |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 11 | #include <linux/tipc.h> |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 12 | #include <asm/byteorder.h> |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 13 | #define TIPC_CMD_NOOP 0x0000 |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 14 | #define TIPC_CMD_GET_NODES 0x0001 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 15 | #define TIPC_CMD_GET_MEDIA_NAMES 0x0002 |
| 16 | #define TIPC_CMD_GET_BEARER_NAMES 0x0003 |
| 17 | #define TIPC_CMD_GET_LINKS 0x0004 |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 18 | #define TIPC_CMD_SHOW_NAME_TABLE 0x0005 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 19 | #define TIPC_CMD_SHOW_PORTS 0x0006 |
| 20 | #define TIPC_CMD_SHOW_LINK_STATS 0x000B |
| 21 | #define TIPC_CMD_SHOW_STATS 0x000F |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 22 | #define TIPC_CMD_GET_REMOTE_MNG 0x4003 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 23 | #define TIPC_CMD_GET_MAX_PORTS 0x4004 |
| 24 | #define TIPC_CMD_GET_MAX_PUBL 0x4005 |
| 25 | #define TIPC_CMD_GET_MAX_SUBSCR 0x4006 |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 26 | #define TIPC_CMD_GET_MAX_ZONES 0x4007 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 27 | #define TIPC_CMD_GET_MAX_CLUSTERS 0x4008 |
| 28 | #define TIPC_CMD_GET_MAX_NODES 0x4009 |
| 29 | #define TIPC_CMD_GET_MAX_SLAVES 0x400A |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 30 | #define TIPC_CMD_GET_NETID 0x400B |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 31 | #define TIPC_CMD_ENABLE_BEARER 0x4101 |
| 32 | #define TIPC_CMD_DISABLE_BEARER 0x4102 |
| 33 | #define TIPC_CMD_SET_LINK_TOL 0x4107 |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 34 | #define TIPC_CMD_SET_LINK_PRI 0x4108 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 35 | #define TIPC_CMD_SET_LINK_WINDOW 0x4109 |
| 36 | #define TIPC_CMD_SET_LOG_SIZE 0x410A |
| 37 | #define TIPC_CMD_DUMP_LOG 0x410B |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 38 | #define TIPC_CMD_RESET_LINK_STATS 0x410C |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 39 | #define TIPC_CMD_SET_NODE_ADDR 0x8001 |
| 40 | #define TIPC_CMD_SET_REMOTE_MNG 0x8003 |
| 41 | #define TIPC_CMD_SET_MAX_PORTS 0x8004 |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 42 | #define TIPC_CMD_SET_MAX_PUBL 0x8005 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 43 | #define TIPC_CMD_SET_MAX_SUBSCR 0x8006 |
| 44 | #define TIPC_CMD_SET_MAX_ZONES 0x8007 |
| 45 | #define TIPC_CMD_SET_MAX_CLUSTERS 0x8008 |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 46 | #define TIPC_CMD_SET_MAX_NODES 0x8009 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 47 | #define TIPC_CMD_SET_MAX_SLAVES 0x800A |
| 48 | #define TIPC_CMD_SET_NETID 0x800B |
| 49 | #define TIPC_CMD_NOT_NET_ADMIN 0xC001 |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 50 | #define TIPC_TLV_NONE 0 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 51 | #define TIPC_TLV_VOID 1 |
| 52 | #define TIPC_TLV_UNSIGNED 2 |
| 53 | #define TIPC_TLV_STRING 3 |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 54 | #define TIPC_TLV_LARGE_STRING 4 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 55 | #define TIPC_TLV_ULTRA_STRING 5 |
| 56 | #define TIPC_TLV_ERROR_STRING 16 |
| 57 | #define TIPC_TLV_NET_ADDR 17 |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 58 | #define TIPC_TLV_MEDIA_NAME 18 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 59 | #define TIPC_TLV_BEARER_NAME 19 |
| 60 | #define TIPC_TLV_LINK_NAME 20 |
| 61 | #define TIPC_TLV_NODE_INFO 21 |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 62 | #define TIPC_TLV_LINK_INFO 22 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 63 | #define TIPC_TLV_BEARER_CONFIG 23 |
| 64 | #define TIPC_TLV_LINK_CONFIG 24 |
| 65 | #define TIPC_TLV_NAME_TBL_QUERY 25 |
| 66 | #define TIPC_TLV_PORT_REF 26 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 67 | #define TIPC_MIN_LINK_PRI 0 |
| 68 | #define TIPC_DEF_LINK_PRI 10 |
| 69 | #define TIPC_MAX_LINK_PRI 31 |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 70 | #define TIPC_MEDIA_LINK_PRI (TIPC_MAX_LINK_PRI + 1) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 71 | #define TIPC_MIN_LINK_TOL 50 |
| 72 | #define TIPC_DEF_LINK_TOL 1500 |
| 73 | #define TIPC_MAX_LINK_TOL 30000 |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 74 | #if TIPC_MIN_LINK_TOL < 16 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 75 | #error "TIPC_MIN_LINK_TOL is too small (abort limit may be NaN)" |
| 76 | #endif |
| 77 | #define TIPC_MIN_LINK_WIN 16 |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 78 | #define TIPC_DEF_LINK_WIN 50 |
Christopher Ferris | 82d7504 | 2015-01-26 10:57:07 -0800 | [diff] [blame] | 79 | #define TIPC_MAX_LINK_WIN 8191 |
Christopher Ferris | 9ce2884 | 2018-10-25 12:11:39 -0700 | [diff] [blame] | 80 | #define TIPC_DEF_LINK_UDP_MTU 14000 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 81 | struct tipc_node_info { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 82 | __be32 addr; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 83 | __be32 up; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 84 | }; |
| 85 | struct tipc_link_info { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 86 | __be32 dest; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 87 | __be32 up; |
| 88 | char str[TIPC_MAX_LINK_NAME]; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 89 | }; |
| 90 | struct tipc_bearer_config { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 91 | __be32 priority; |
| 92 | __be32 disc_domain; |
| 93 | char name[TIPC_MAX_BEARER_NAME]; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 94 | }; |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 95 | struct tipc_link_config { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 96 | __be32 value; |
| 97 | char name[TIPC_MAX_LINK_NAME]; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 98 | }; |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 99 | #define TIPC_NTQ_ALLTYPES 0x80000000 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 100 | struct tipc_name_table_query { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 101 | __be32 depth; |
| 102 | __be32 type; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 103 | __be32 lowbound; |
| 104 | __be32 upbound; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 105 | }; |
| 106 | #define TIPC_CFG_TLV_ERROR "\x80" |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 107 | #define TIPC_CFG_NOT_NET_ADMIN "\x81" |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 108 | #define TIPC_CFG_NOT_ZONE_MSTR "\x82" |
| 109 | #define TIPC_CFG_NO_REMOTE "\x83" |
| 110 | #define TIPC_CFG_NOT_SUPPORTED "\x84" |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 111 | #define TIPC_CFG_INVALID_VALUE "\x85" |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 112 | struct tlv_desc { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 113 | __be16 tlv_len; |
| 114 | __be16 tlv_type; |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 115 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 116 | #define TLV_ALIGNTO 4 |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 117 | #define TLV_ALIGN(datalen) (((datalen) + (TLV_ALIGNTO - 1)) & ~(TLV_ALIGNTO - 1)) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 118 | #define TLV_LENGTH(datalen) (sizeof(struct tlv_desc) + (datalen)) |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 119 | #define TLV_SPACE(datalen) (TLV_ALIGN(TLV_LENGTH(datalen))) |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 120 | #define TLV_DATA(tlv) ((void *) ((char *) (tlv) + TLV_LENGTH(0))) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 121 | struct tlv_list_desc { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 122 | struct tlv_desc * tlv_ptr; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 123 | __u32 tlv_space; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 124 | }; |
| 125 | #define TIPC_GENL_NAME "TIPC" |
| 126 | #define TIPC_GENL_VERSION 0x1 |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 127 | #define TIPC_GENL_CMD 0x1 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 128 | struct tipc_genlmsghdr { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 129 | __u32 dest; |
| 130 | __u16 cmd; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 131 | __u16 reserved; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 132 | }; |
| 133 | #define TIPC_GENL_HDRLEN NLMSG_ALIGN(sizeof(struct tipc_genlmsghdr)) |
| 134 | struct tipc_cfg_msg_hdr { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 135 | __be32 tcm_len; |
| 136 | __be16 tcm_type; |
| 137 | __be16 tcm_flags; |
| 138 | char tcm_reserved[8]; |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 139 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 140 | #define TCM_F_REQUEST 0x1 |
| 141 | #define TCM_F_MORE 0x2 |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 142 | #define TCM_ALIGN(datalen) (((datalen) + 3) & ~3) |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 143 | #define TCM_LENGTH(datalen) (sizeof(struct tipc_cfg_msg_hdr) + datalen) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 144 | #define TCM_SPACE(datalen) (TCM_ALIGN(TCM_LENGTH(datalen))) |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 145 | #define TCM_DATA(tcm_hdr) ((void *) ((char *) (tcm_hdr) + TCM_LENGTH(0))) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 146 | #endif |