github.com/google/syzkaller@v0.0.0-20240517125934-c0f1611a36d6/sys/linux/socket_tipc_netlink.txt (about) 1 # Copyright 2018 syzkaller project authors. All rights reserved. 2 # Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. 3 4 include <uapi/linux/tipc_netlink.h> 5 include <uapi/linux/tipc_config.h> 6 include <uapi/linux/tipc_sockets_diag.h> 7 8 type tipc_net_addr int32be 9 10 resource genl_tipc_family_id[int16] 11 12 syz_genetlink_get_family_id$tipc(name ptr[in, string["TIPC"]], fd sock_nl_generic) genl_tipc_family_id 13 14 sendmsg$TIPC_CMD_SET_LINK_TOL(fd sock_nl_generic, msg ptr[in, msghdr_nl_tipc[TIPC_CMD_SET_LINK_TOL, tipc_tlv_desc[TIPC_TLV_LINK_CONFIG, tipc_link_config]]], f flags[send_flags]) 15 sendmsg$TIPC_CMD_SET_LINK_PRI(fd sock_nl_generic, msg ptr[in, msghdr_nl_tipc[TIPC_CMD_SET_LINK_PRI, tipc_tlv_desc[TIPC_TLV_LINK_CONFIG, tipc_link_config]]], f flags[send_flags]) 16 sendmsg$TIPC_CMD_SET_LINK_WINDOW(fd sock_nl_generic, msg ptr[in, msghdr_nl_tipc[TIPC_CMD_SET_LINK_WINDOW, tipc_tlv_desc[TIPC_TLV_LINK_CONFIG, tipc_link_config]]], f flags[send_flags]) 17 sendmsg$TIPC_CMD_ENABLE_BEARER(fd sock_nl_generic, msg ptr[in, msghdr_nl_tipc[TIPC_CMD_ENABLE_BEARER, tipc_tlv_desc[TIPC_TLV_BEARER_CONFIG, tipc_bearer_config]]], f flags[send_flags]) 18 sendmsg$TIPC_CMD_GET_BEARER_NAMES(fd sock_nl_generic, msg ptr[in, msghdr_nl_tipc[TIPC_CMD_GET_BEARER_NAMES, void]], f flags[send_flags]) 19 sendmsg$TIPC_CMD_GET_MEDIA_NAMES(fd sock_nl_generic, msg ptr[in, msghdr_nl_tipc[TIPC_CMD_GET_MEDIA_NAMES, void]], f flags[send_flags]) 20 sendmsg$TIPC_CMD_SHOW_PORTS(fd sock_nl_generic, msg ptr[in, msghdr_nl_tipc[TIPC_CMD_SHOW_PORTS, void]], f flags[send_flags]) 21 sendmsg$TIPC_CMD_GET_REMOTE_MNG(fd sock_nl_generic, msg ptr[in, msghdr_nl_tipc[TIPC_CMD_GET_REMOTE_MNG, void]], f flags[send_flags]) 22 sendmsg$TIPC_CMD_GET_MAX_PORTS(fd sock_nl_generic, msg ptr[in, msghdr_nl_tipc[TIPC_CMD_GET_MAX_PORTS, void]], f flags[send_flags]) 23 sendmsg$TIPC_CMD_GET_NETID(fd sock_nl_generic, msg ptr[in, msghdr_nl_tipc[TIPC_CMD_GET_NETID, void]], f flags[send_flags]) 24 sendmsg$TIPC_CMD_GET_NODES(fd sock_nl_generic, msg ptr[in, msghdr_nl_tipc[TIPC_CMD_GET_NODES, void]], f flags[send_flags]) 25 sendmsg$TIPC_CMD_GET_LINKS(fd sock_nl_generic, msg ptr[in, msghdr_nl_tipc[TIPC_CMD_GET_LINKS, tipc_tlv_desc[TIPC_TLV_NET_ADDR, tipc_net_addr]]], f flags[send_flags]) 26 sendmsg$TIPC_CMD_SET_NODE_ADDR(fd sock_nl_generic, msg ptr[in, msghdr_nl_tipc[TIPC_CMD_SET_NODE_ADDR, tipc_tlv_desc[TIPC_TLV_NET_ADDR, tipc_net_addr]]], f flags[send_flags]) 27 sendmsg$TIPC_CMD_SHOW_NAME_TABLE(fd sock_nl_generic, msg ptr[in, msghdr_nl_tipc[TIPC_CMD_SHOW_NAME_TABLE, tipc_tlv_desc[TIPC_TLV_NAME_TBL_QUERY, tipc_name_table_query]]], f flags[send_flags]) 28 sendmsg$TIPC_CMD_SHOW_LINK_STATS(fd sock_nl_generic, msg ptr[in, msghdr_nl_tipc[TIPC_CMD_SHOW_LINK_STATS, tipc_tlv_desc[TIPC_TLV_LINK_NAME, string[tipc_links]]]], f flags[send_flags]) 29 sendmsg$TIPC_CMD_SHOW_STATS(fd sock_nl_generic, msg ptr[in, msghdr_nl_tipc[TIPC_CMD_SHOW_STATS, void]], f flags[send_flags]) 30 sendmsg$TIPC_CMD_DISABLE_BEARER(fd sock_nl_generic, msg ptr[in, msghdr_nl_tipc[TIPC_CMD_DISABLE_BEARER, tipc_tlv_desc[TIPC_TLV_BEARER_NAME, tipc_bearer_name]]], f flags[send_flags]) 31 sendmsg$TIPC_CMD_RESET_LINK_STATS(fd sock_nl_generic, msg ptr[in, msghdr_nl_tipc[TIPC_CMD_RESET_LINK_STATS, tipc_tlv_desc[TIPC_TLV_LINK_NAME, string[tipc_links]]]], f flags[send_flags]) 32 sendmsg$TIPC_CMD_SET_NETID(fd sock_nl_generic, msg ptr[in, msghdr_nl_tipc[TIPC_CMD_SET_NETID, tipc_tlv_desc[TIPC_TLV_UNSIGNED, int32be]]], f flags[send_flags]) 33 34 type msghdr_nl_tipc[CMD, DATA] msghdr_netlink[netlink_msg_t[genl_tipc_family_id, tipc_genlmsghdr_t[CMD, DATA], void]] 35 36 type tipc_genlmsghdr[CMD] { 37 dest const[0, int32] 38 cmd const[CMD, int16] 39 reserved const[0, int16] 40 } [packed] 41 42 type tipc_genlmsghdr_t[CMD, DATA] { 43 hdr genlmsghdr_t[TIPC_GENL_CMD] 44 tipc tipc_genlmsghdr[CMD] 45 data DATA 46 } [packed] 47 48 type tipc_tlv_desc[TYP, DATA] { 49 tlv_len bytesize[parent, int16be] 50 tlv_type const[TYP, int16be] 51 data DATA 52 } [align[4]] 53 54 tipc_link_config { 55 value int32be 56 name tipc_bearer_link_or_media 57 } 58 59 # TODO: links have complex names of the form "own_node_id:own_dev_name-peer_node_id:peer_dev_name" 60 # We can't generate this at the moment. 61 tipc_links = "broadcast-link", "syz0", "syz1" 62 tipc_media = "eth", "ib", "udp" 63 tipc_media_l2 = "eth", "ib" 64 tipc_bearer_name_udp = "udp:syz0", "udp:syz1", "udp:syz2" 65 66 tipc_bearer_link_or_media [ 67 bearer tipc_bearer_name 68 link string[tipc_links, TIPC_MAX_LINK_NAME] 69 media string[tipc_media, TIPC_MAX_LINK_NAME] 70 ] [varlen] 71 72 tipc_bearer_name [ 73 l2 tipc_bearer_name_l2 74 udp string[tipc_bearer_name_udp] 75 ] [varlen] 76 77 tipc_bearer_name_l2 { 78 media stringnoz[tipc_media_l2] 79 colon const[':', int8] 80 dev string[devnames] 81 } [packed] 82 83 tipc_bearer_config { 84 priority int32be[0:TIPC_MEDIA_LINK_PRI] 85 disc_domain int32be 86 name tipc_bearer_name 87 } 88 89 tipc_name_table_query { 90 depth int32be 91 type int32be 92 lowbound int32be 93 upbound int32be 94 } 95 96 type alg_aead_name_tipc string["gcm(aes)", TIPC_AEAD_ALG_NAME] 97 98 tipc_aead_key { 99 alg_name alg_aead_name_tipc 100 keylen len[key, int32] 101 key array[int8, TIPC_AEAD_KEYLEN_MIN:TIPC_AEAD_KEYLEN_MAX] 102 } 103 104 resource genl_tipc2_family_id[int16] 105 syz_genetlink_get_family_id$tipc2(name ptr[in, string["TIPCv2"]], fd sock_nl_generic) genl_tipc2_family_id 106 107 type msghdr_nl_tipc2[CMD] msghdr_netlink[netlink_msg_t[genl_tipc2_family_id, genlmsghdr_t[CMD], tipc_nl_policy]] 108 109 sendmsg$TIPC_NL_BEARER_DISABLE(fd sock_nl_generic, msg ptr[in, msghdr_nl_tipc2[TIPC_NL_BEARER_DISABLE]], f flags[send_flags]) 110 111 sendmsg$TIPC_NL_BEARER_ENABLE(fd sock_nl_generic, msg ptr[in, msghdr_nl_tipc2[TIPC_NL_BEARER_ENABLE]], f flags[send_flags]) 112 sendmsg$TIPC_NL_BEARER_GET(fd sock_nl_generic, msg ptr[in, msghdr_nl_tipc2[TIPC_NL_BEARER_GET]], f flags[send_flags]) 113 sendmsg$TIPC_NL_BEARER_ADD(fd sock_nl_generic, msg ptr[in, msghdr_nl_tipc2[TIPC_NL_BEARER_ADD]], f flags[send_flags]) 114 sendmsg$TIPC_NL_BEARER_SET(fd sock_nl_generic, msg ptr[in, msghdr_nl_tipc2[TIPC_NL_BEARER_SET]], f flags[send_flags]) 115 sendmsg$TIPC_NL_SOCK_GET(fd sock_nl_generic, msg ptr[in, msghdr_nl_tipc2[TIPC_NL_SOCK_GET]], f flags[send_flags]) 116 sendmsg$TIPC_NL_PUBL_GET(fd sock_nl_generic, msg ptr[in, msghdr_nl_tipc2[TIPC_NL_PUBL_GET]], f flags[send_flags]) 117 sendmsg$TIPC_NL_LINK_GET(fd sock_nl_generic, msg ptr[in, msghdr_nl_tipc2[TIPC_NL_LINK_GET]], f flags[send_flags]) 118 sendmsg$TIPC_NL_LINK_SET(fd sock_nl_generic, msg ptr[in, msghdr_nl_tipc2[TIPC_NL_LINK_SET]], f flags[send_flags]) 119 sendmsg$TIPC_NL_LINK_RESET_STATS(fd sock_nl_generic, msg ptr[in, msghdr_nl_tipc2[TIPC_NL_LINK_RESET_STATS]], f flags[send_flags]) 120 sendmsg$TIPC_NL_MEDIA_GET(fd sock_nl_generic, msg ptr[in, msghdr_nl_tipc2[TIPC_NL_MEDIA_GET]], f flags[send_flags]) 121 sendmsg$TIPC_NL_MEDIA_SET(fd sock_nl_generic, msg ptr[in, msghdr_nl_tipc2[TIPC_NL_MEDIA_SET]], f flags[send_flags]) 122 sendmsg$TIPC_NL_NODE_GET(fd sock_nl_generic, msg ptr[in, msghdr_nl_tipc2[TIPC_NL_NODE_GET]], f flags[send_flags]) 123 sendmsg$TIPC_NL_NET_GET(fd sock_nl_generic, msg ptr[in, msghdr_nl_tipc2[TIPC_NL_NET_GET]], f flags[send_flags]) 124 sendmsg$TIPC_NL_NET_SET(fd sock_nl_generic, msg ptr[in, msghdr_nl_tipc2[TIPC_NL_NET_SET]], f flags[send_flags]) 125 sendmsg$TIPC_NL_NAME_TABLE_GET(fd sock_nl_generic, msg ptr[in, msghdr_nl_tipc2[TIPC_NL_NAME_TABLE_GET]], f flags[send_flags]) 126 sendmsg$TIPC_NL_MON_SET(fd sock_nl_generic, msg ptr[in, msghdr_nl_tipc2[TIPC_NL_MON_SET]], f flags[send_flags]) 127 sendmsg$TIPC_NL_MON_GET(fd sock_nl_generic, msg ptr[in, msghdr_nl_tipc2[TIPC_NL_MON_GET]], f flags[send_flags]) 128 sendmsg$TIPC_NL_MON_PEER_GET(fd sock_nl_generic, msg ptr[in, msghdr_nl_tipc2[TIPC_NL_MON_PEER_GET]], f flags[send_flags]) 129 sendmsg$TIPC_NL_PEER_REMOVE(fd sock_nl_generic, msg ptr[in, msghdr_nl_tipc2[TIPC_NL_PEER_REMOVE]], f flags[send_flags]) 130 sendmsg$TIPC_NL_UDP_GET_REMOTEIP(fd sock_nl_generic, msg ptr[in, msghdr_nl_tipc2[TIPC_NL_UDP_GET_REMOTEIP]], f flags[send_flags]) 131 sendmsg$TIPC_NL_KEY_SET(fd sock_nl_generic, msg ptr[in, msghdr_nl_tipc2[TIPC_NL_KEY_SET]], f flags[send_flags]) 132 sendmsg$TIPC_NL_KEY_FLUSH(fd sock_nl_generic, msg ptr[in, msghdr_nl_tipc2[TIPC_NL_KEY_FLUSH]], f flags[send_flags]) 133 134 tipc_nl_policy [ 135 TIPC_NLA_BEARER nlnest[TIPC_NLA_BEARER, array[tipc_nl_bearer_policy]] 136 TIPC_NLA_SOCK nlnest[TIPC_NLA_SOCK, array[tipc_nl_sock_policy]] 137 TIPC_NLA_LINK nlnest[TIPC_NLA_LINK, array[tipc_nl_link_policy]] 138 TIPC_NLA_MEDIA nlnest[TIPC_NLA_MEDIA, array[tipc_nl_media_policy]] 139 TIPC_NLA_NODE nlnest[TIPC_NLA_NODE, array[tipc_nl_node_policy]] 140 TIPC_NLA_NET nlnest[TIPC_NLA_NET, array[tipc_nl_net_policy]] 141 TIPC_NLA_MON nlnest[TIPC_NLA_MON, array[tipc_nl_monitor_policy]] 142 TIPC_NLA_PUBL nlnest[TIPC_NLA_PUBL, array[tipc_nl_publ_policy]] 143 ] [varlen] 144 145 tipc_nl_publ_policy [ 146 TIPC_NLA_PUBL_TYPE nlattr[TIPC_NLA_PUBL_TYPE, int32] 147 TIPC_NLA_PUBL_LOWER nlattr[TIPC_NLA_PUBL_LOWER, int32] 148 TIPC_NLA_PUBL_UPPER nlattr[TIPC_NLA_PUBL_UPPER, int32] 149 ] [varlen] 150 151 tipc_nl_bearer_policy [ 152 TIPC_NLA_BEARER_NAME nlattr[TIPC_NLA_BEARER_NAME, tipc_bearer_name] 153 TIPC_NLA_BEARER_PROP nlnest[TIPC_NLA_BEARER_PROP, array[tipc_nl_prop_policy]] 154 TIPC_NLA_BEARER_DOMAIN nlattr[TIPC_NLA_BEARER_DOMAIN, int32] 155 TIPC_NLA_BEARER_UDP_OPTS nlattr[TIPC_NLA_BEARER_UDP_OPTS, tipc_nl_udp_policy] 156 ] [varlen] 157 158 tipc_nl_sock_policy [ 159 TIPC_NLA_SOCK_ADDR nlattr[TIPC_NLA_SOCK_ADDR, int32] 160 TIPC_NLA_SOCK_REF nlattr[TIPC_NLA_SOCK_REF, int32] 161 TIPC_NLA_SOCK_HAS_PUBL nlattr[TIPC_NLA_SOCK_HAS_PUBL, void] 162 TIPC_NLA_SOCK_CON nlnest[TIPC_NLA_SOCK_CON, array[tipc_nl_sock_con_policy]] 163 ] [varlen] 164 165 tipc_nl_sock_con_policy [ 166 TIPC_NLA_CON_NODE nlattr[TIPC_NLA_CON_NODE, int32] 167 TIPC_NLA_CON_FLAG nlattr[TIPC_NLA_CON_FLAG, int32] 168 ] [varlen] 169 170 tipc_nl_link_policy [ 171 TIPC_NLA_LINK_NAME nlattr[TIPC_NLA_LINK_NAME, string[tipc_links]] 172 TIPC_NLA_LINK_PROP nlnest[TIPC_NLA_LINK_PROP, array[tipc_nl_prop_policy]] 173 ] [varlen] 174 175 tipc_nl_media_policy [ 176 TIPC_NLA_MEDIA_NAME nlattr[TIPC_NLA_MEDIA_NAME, string[tipc_media]] 177 TIPC_NLA_MEDIA_PROP nlnest[TIPC_NLA_MEDIA_PROP, array[tipc_nl_prop_policy]] 178 ] [varlen] 179 180 tipc_nl_node_policy [ 181 TIPC_NLA_NODE_ADDR nlattr[TIPC_NLA_NODE_ADDR, int32] 182 TIPC_NLA_NODE_UP nlattr[TIPC_NLA_NODE_UP, void] 183 TIPC_NLA_NODE_ID nlattr[TIPC_NLA_NODE_ID, array[int8]] 184 TIPC_NLA_NODE_KEY nlattr[TIPC_NLA_NODE_KEY, tipc_aead_key] 185 TIPC_NLA_NODE_KEY_MASTER nlattr[TIPC_NLA_NODE_KEY_MASTER, void] 186 TIPC_NLA_NODE_REKEYING nlattr[TIPC_NLA_NODE_REKEYING, int32] 187 ] [varlen] 188 189 tipc_nl_net_policy [ 190 TIPC_NLA_NET_ID nlattr[TIPC_NLA_NET_ID, int32] 191 TIPC_NLA_NET_ADDR nlattr[TIPC_NLA_NET_ADDR, int32] 192 TIPC_NLA_NET_NODEID nlattr[TIPC_NLA_NET_NODEID, int64] 193 TIPC_NLA_NET_NODEID_W1 nlattr[TIPC_NLA_NET_NODEID_W1, int64] 194 ] [varlen] 195 196 tipc_nl_monitor_policy [ 197 TIPC_NLA_MON_REF nlattr[TIPC_NLA_MON_REF, int32] 198 TIPC_NLA_MON_ACTIVATION_THRESHOLD nlattr[TIPC_NLA_MON_ACTIVATION_THRESHOLD, int32] 199 ] [varlen] 200 201 tipc_nl_prop_policy [ 202 TIPC_NLA_PROP_PRIO nlattr[TIPC_NLA_PROP_PRIO, int32[0:TIPC_MEDIA_LINK_PRI]] 203 TIPC_NLA_PROP_TOL nlattr[TIPC_NLA_PROP_TOL, int32] 204 TIPC_NLA_PROP_WIN nlattr[TIPC_NLA_PROP_WIN, int32] 205 TIPC_NLA_PROP_MTU nlattr[TIPC_NLA_PROP_MTU, int32] 206 ] [varlen] 207 208 tipc_nl_udp_policy { 209 TIPC_NLA_UDP_LOCAL nlattr[TIPC_NLA_UDP_LOCAL, sockaddr_tipc_udp] 210 TIPC_NLA_UDP_REMOTE nlattr[TIPC_NLA_UDP_REMOTE, sockaddr_tipc_udp] 211 } [packed] 212 213 sockaddr_tipc_udp [ 214 in sockaddr_in 215 in6 sockaddr_in6 216 ] [varlen]