github.com/google/syzkaller@v0.0.0-20240517125934-c0f1611a36d6/sys/linux/socket_inet_igmp.txt (about) 1 # Copyright 2022 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 <linux/ip.h> 5 include <linux/ipv6.h> 6 include <uapi/linux/mroute.h> 7 include <uapi/linux/mroute6.h> 8 9 resource sock_igmp[sock_in] 10 resource sock_igmp6[sock_in6] 11 12 socket$igmp(domain const[AF_INET], type const[SOCK_RAW], proto const[IPPROTO_IGMP]) sock_igmp 13 socket$igmp6(domain const[AF_INET6], type const[SOCK_RAW], proto const[IPPROTO_IGMP]) sock_igmp6 14 15 setsockopt$MRT_INIT(fd sock_igmp, level const[SOL_IP], opt const[MRT_INIT], val ptr[in, const[0, int32]], len bytesize[val]) 16 setsockopt$MRT_DONE(fd sock_igmp, level const[SOL_IP], opt const[MRT_DONE], val const[0], len const[0]) 17 setsockopt$MRT_ADD_VIF(fd sock_igmp, level const[SOL_IP], opt const[MRT_ADD_VIF], val ptr[in, vifctl], len bytesize[val]) 18 setsockopt$MRT_DEL_VIF(fd sock_igmp, level const[SOL_IP], opt const[MRT_DEL_VIF], val ptr[in, vifctl], len bytesize[val]) 19 setsockopt$MRT_ADD_MFC(fd sock_igmp, level const[SOL_IP], opt const[MRT_ADD_MFC], val ptr[in, mfcctl], len bytesize[val]) 20 setsockopt$MRT_DEL_MFC(fd sock_igmp, level const[SOL_IP], opt const[MRT_DEL_MFC], val ptr[in, mfcctl], len bytesize[val]) 21 setsockopt$MRT_ADD_MFC_PROXY(fd sock_igmp, level const[SOL_IP], opt const[MRT_ADD_MFC_PROXY], val ptr[in, mfcctl], len bytesize[val]) 22 setsockopt$MRT_DEL_MFC_PROXY(fd sock_igmp, level const[SOL_IP], opt const[MRT_DEL_MFC_PROXY], val ptr[in, mfcctl], len bytesize[val]) 23 setsockopt$MRT_FLUSH(fd sock_igmp, level const[SOL_IP], opt const[MRT_FLUSH], val ptr[in, flags[mrt_flush_flags, int32]], len bytesize[val]) 24 setsockopt$MRT_ASSERT(fd sock_igmp, level const[SOL_IP], opt const[MRT_ASSERT], val ptr[in, bool32], len bytesize[val]) 25 setsockopt$MRT_PIM(fd sock_igmp, level const[SOL_IP], opt const[MRT_ASSERT], val ptr[in, int32[0:IGMPMSG_WRVIFWHOLE]], len bytesize[val]) 26 setsockopt$MRT_TABLE(fd sock_igmp, level const[SOL_IP], opt const[MRT_ASSERT], val ptr[in, flags[mrt_tables, int32]], len bytesize[val]) 27 28 getsockopt$MRT(fd sock_igmp, level const[SOL_IP], opt flags[mrt_getsockopts], val ptr[out, int32], len ptr[inout, bytesize[val, int32]]) 29 30 ioctl$SIOCGETVIFCNT(fd sock_igmp, cmd const[SIOCGETVIFCNT], arg ptr[in, sioc_vif_req]) 31 ioctl$SIOCGETSGCNT(fd sock_igmp, cmd const[SIOCGETSGCNT], arg ptr[in, sioc_sg_req]) 32 33 setsockopt$MRT6_INIT(fd sock_igmp6, level const[SOL_IPV6], opt const[MRT6_INIT], val ptr[in, const[0, int32]], len bytesize[val]) 34 setsockopt$MRT6_DONE(fd sock_igmp6, level const[SOL_IPV6], opt const[MRT6_DONE], val const[0], len const[0]) 35 setsockopt$MRT6_ADD_MIF(fd sock_igmp6, level const[SOL_IPV6], opt const[MRT6_ADD_MIF], val ptr[in, mif6ctl], len bytesize[val]) 36 setsockopt$MRT6_DEL_MIF(fd sock_igmp6, level const[SOL_IPV6], opt const[MRT6_DEL_MIF], val ptr[in, mif6ctl], len bytesize[val]) 37 setsockopt$MRT6_ADD_MFC(fd sock_igmp6, level const[SOL_IPV6], opt const[MRT6_ADD_MFC], val ptr[in, mf6cctl], len bytesize[val]) 38 setsockopt$MRT6_DEL_MFC(fd sock_igmp6, level const[SOL_IPV6], opt const[MRT6_DEL_MFC], val ptr[in, mf6cctl], len bytesize[val]) 39 setsockopt$MRT6_ADD_MFC_PROXY(fd sock_igmp6, level const[SOL_IPV6], opt const[MRT6_ADD_MFC_PROXY], val ptr[in, mf6cctl], len bytesize[val]) 40 setsockopt$MRT6_DEL_MFC_PROXY(fd sock_igmp6, level const[SOL_IPV6], opt const[MRT6_DEL_MFC_PROXY], val ptr[in, mf6cctl], len bytesize[val]) 41 setsockopt$MRT6_FLUSH(fd sock_igmp6, level const[SOL_IPV6], opt const[MRT6_FLUSH], val ptr[in, flags[mrt6_flush_flags, int32]], len bytesize[val]) 42 setsockopt$MRT6_ASSERT(fd sock_igmp6, level const[SOL_IPV6], opt const[MRT6_ASSERT], val ptr[in, bool32], len bytesize[val]) 43 setsockopt$MRT6_PIM(fd sock_igmp6, level const[SOL_IPV6], opt const[MRT6_ASSERT], val ptr[in, int32[0:IGMPMSG_WRVIFWHOLE]], len bytesize[val]) 44 setsockopt$MRT6_TABLE(fd sock_igmp6, level const[SOL_IPV6], opt const[MRT6_ASSERT], val ptr[in, flags[mrt_tables, int32]], len bytesize[val]) 45 46 getsockopt$MRT6(fd sock_igmp6, level const[SOL_IPV6], opt flags[mrt6_getsockopts], val ptr[out, int32], len ptr[inout, bytesize[val, int32]]) 47 48 ioctl$SIOCGETMIFCNT_IN6(fd sock_igmp, cmd const[SIOCGETMIFCNT_IN6], arg ptr[in, sioc_mif_req6]) 49 ioctl$SIOCGETSGCNT_IN6(fd sock_igmp, cmd const[SIOCGETSGCNT_IN6], arg ptr[in, sioc_sg_req6]) 50 51 type vifi_t int16[-1:1] 52 type mifi_t int16[-1:1] 53 mrt_flush_flags = MRT_FLUSH_MFC, MRT_FLUSH_MFC_STATIC, MRT_FLUSH_VIFS, MRT_FLUSH_VIFS_STATIC 54 mrt6_flush_flags = MRT6_FLUSH_MFC, MRT6_FLUSH_MFC_STATIC, MRT6_FLUSH_MIFS, MRT6_FLUSH_MIFS_STATIC 55 mrt_tables = RT_TABLE_UNSPEC, RT_TABLE_COMPAT, RT_TABLE_DEFAULT, RT_TABLE_MAIN, RT_TABLE_LOCAL, RT_TABLE_MAX, 1 56 mrt_getsockopts = MRT_VERSION, MRT_PIM, MRT_ASSERT 57 mrt6_getsockopts = MRT6_VERSION, MRT6_PIM, MRT6_ASSERT 58 59 vifctl { 60 vifc_vifi vifi_t 61 vifc_flags flags[viff_ctls, int8] 62 vifc_threshold int8 63 vifc_rate_limit int32 64 u vifctl_u 65 vifc_rmt_addr ipv4_addr 66 } 67 68 vifctl_u [ 69 vifc_lcl_addr ipv4_addr 70 vifc_lcl_ifindex ifindex 71 ] 72 73 viff_ctls = 0, VIFF_TUNNEL, VIFF_REGISTER, VIFF_USE_IFINDEX 74 75 mfcctl { 76 mfcc_origin ipv4_addr 77 mfcc_mcastgrp ipv4_addr 78 mfcc_parent vifi_t 79 mfcc_ttls array[int8, MAXVIFS] 80 mfcc_pkt_cnt int32 81 mfcc_byte_cnt int32 82 mfcc_wrong_if int32 83 mfcc_expire int32 84 } 85 86 sioc_vif_req { 87 vifi vifi_t 88 icount intptr (out) 89 ocount intptr (out) 90 ibytes intptr (out) 91 obytes intptr (out) 92 } 93 94 sioc_sg_req { 95 src ipv4_addr 96 grp ipv4_addr 97 pktcnt intptr (out) 98 bytecnt intptr (out) 99 wrong_if intptr (out) 100 } 101 102 mif6ctl { 103 mif6c_mifi mifi_t 104 mif6c_flags flags[mif6ctl_flags, int8] 105 vifc_threshold int8 106 # TODO: in the kernel this is int16 (WHY?!) 107 mif6c_pifi ifindex 108 vifc_rate_limit int32 109 } 110 111 mif6ctl_flags = 0, MIFF_REGISTER 112 113 mf6cctl { 114 mf6cc_origin sockaddr_in6 115 mf6cc_mcastgrp sockaddr_in6 116 mf6cc_parent mifi_t 117 mf6cc_ifset if_set 118 } 119 120 if_set { 121 ifs_bits array[int32, 8] 122 } 123 124 sioc_mif_req6 { 125 mifi mifi_t 126 icount intptr (out) 127 ocount intptr (out) 128 ibytes intptr (out) 129 obytes intptr (out) 130 } 131 132 sioc_sg_req6 { 133 src ipv6_addr 134 grp ipv6_addr 135 pktcnt intptr (out) 136 bytecnt intptr (out) 137 wrong_if intptr (out) 138 }