Home | History | Annotate | Download | only in linux
      1 # Copyright 2017 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 # AF_INET and AF_INET6: ICMP support
      5 
      6 include <linux/icmp.h>
      7 include <linux/icmpv6.h>
      8 
      9 resource sock_icmp[sock_in]
     10 
     11 socket$inet_icmp(domain const[AF_INET], type const[SOCK_DGRAM], proto const[IPPROTO_ICMP]) sock_icmp
     12 socket$inet_icmp_raw(domain const[AF_INET], type const[SOCK_RAW], proto const[IPPROTO_ICMP]) sock_icmp
     13 socketpair$inet_icmp(domain const[AF_INET], type const[SOCK_DGRAM], proto const[IPPROTO_ICMP], fds ptr[out, icmp_pair])
     14 socketpair$inet_icmp_raw(domain const[AF_INET], type const[SOCK_RAW], proto const[IPPROTO_ICMP], fds ptr[out, icmp_pair])
     15 
     16 icmp_pair {
     17 	f0	sock_icmp
     18 	f1	sock_icmp
     19 }
     20 
     21 resource sock_icmp6[sock_in6]
     22 
     23 socket$inet6_icmp(domain const[AF_INET6], type const[SOCK_DGRAM], proto const[IPPROTO_ICMPV6]) sock_icmp6
     24 socket$inet6_icmp_raw(domain const[AF_INET6], type const[SOCK_RAW], proto const[IPPROTO_ICMPV6]) sock_icmp6
     25 socketpair$inet6_icmp(domain const[AF_INET6], type const[SOCK_DGRAM], proto const[IPPROTO_ICMPV6], fds ptr[out, icmp6_pair])
     26 socketpair$inet6_icmp_raw(domain const[AF_INET6], type const[SOCK_RAW], proto const[IPPROTO_ICMPV6], fds ptr[out, icmp6_pair])
     27 
     28 icmp6_pair {
     29 	f0	sock_icmp6
     30 	f1	sock_icmp6
     31 }
     32 
     33 setsockopt$inet_icmp_ICMP_FILTER(fd sock_icmp, level const[IPPROTO_ICMP], optname const[ICMP_FILTER], optval ptr[in, icmp_filter], optlen len[optval])
     34 setsockopt$inet6_icmp_ICMP_FILTER(fd sock_icmp6, level const[IPPROTO_ICMP], optname const[ICMP_FILTER], optval ptr[in, icmp_filter], optlen len[optval])
     35 
     36 icmp_filter {
     37 	data	int32
     38 }
     39