github.com/google/syzkaller@v0.0.0-20240517125934-c0f1611a36d6/sys/darwin/pf.txt (about) 1 # Copyright 2019 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 <sys/param.h> 5 include <sys/socket.h> 6 include <sys/lock.h> 7 include <sys/mbuf.h> 8 include <sys/ioccom.h> 9 include <net/if.h> 10 include <net/radix.h> 11 include <net/pfvar.h> 12 13 resource fd_pf[fd] 14 15 openat$ptmx(fd const[AT_FDCWD], file ptr[in, string["/dev/pf"]], flags flags[open_flags], mode const[0]) fd_pf 16 17 ioctl$DIOCADDRULE(fd fd_pf, cmd const[DIOCADDRULE], arg ptr[in, array[int8]]) 18 ioctl$DIOCGETRULES(fd fd_pf, cmd const[DIOCGETRULES], arg ptr[in, array[int8]]) 19 ioctl$DIOCGETRULE(fd fd_pf, cmd const[DIOCGETRULE], arg ptr[in, array[int8]]) 20 ioctl$DIOCCLRSTATES(fd fd_pf, cmd const[DIOCCLRSTATES], arg ptr[in, array[int8]]) 21 ioctl$DIOCGETSTATE(fd fd_pf, cmd const[DIOCGETSTATE], arg ptr[in, array[int8]]) 22 ioctl$DIOCSETSTATUSIF(fd fd_pf, cmd const[DIOCSETSTATUSIF], arg ptr[in, pfioc_if]) 23 ioctl$DIOCGETSTATUS(fd fd_pf, cmd const[DIOCGETSTATUS], arg ptr[in, array[int8]]) 24 ioctl$DIOCNATLOOK(fd fd_pf, cmd const[DIOCNATLOOK], arg ptr[in, array[int8]]) 25 ioctl$DIOCGETSTATES(fd fd_pf, cmd const[DIOCGETSTATES], arg ptr[in, array[int8]]) 26 ioctl$DIOCCHANGERULE(fd fd_pf, cmd const[DIOCCHANGERULE], arg ptr[in, array[int8]]) 27 ioctl$DIOCSETTIMEOUT(fd fd_pf, cmd const[DIOCSETTIMEOUT], arg ptr[in, pfioc_tm]) 28 ioctl$DIOCGETTIMEOUT(fd fd_pf, cmd const[DIOCGETTIMEOUT], arg ptr[in, pfioc_tm]) 29 ioctl$DIOCADDSTATE(fd fd_pf, cmd const[DIOCADDSTATE], arg ptr[in, array[int8]]) 30 ioctl$DIOCGETLIMIT(fd fd_pf, cmd const[DIOCGETLIMIT], arg ptr[in, pfioc_limit]) 31 ioctl$DIOCSETLIMIT(fd fd_pf, cmd const[DIOCSETLIMIT], arg ptr[in, pfioc_limit]) 32 ioctl$DIOCKILLSTATES(fd fd_pf, cmd const[DIOCKILLSTATES], arg ptr[in, array[int8]]) 33 ioctl$DIOCBEGINADDRS(fd fd_pf, cmd const[DIOCBEGINADDRS], arg ptr[in, array[int8]]) 34 ioctl$DIOCADDADDR(fd fd_pf, cmd const[DIOCADDADDR], arg ptr[in, array[int8]]) 35 ioctl$DIOCGETADDRS(fd fd_pf, cmd const[DIOCGETADDRS], arg ptr[in, array[int8]]) 36 ioctl$DIOCGETADDR(fd fd_pf, cmd const[DIOCGETADDR], arg ptr[in, array[int8]]) 37 ioctl$DIOCCHANGEADDR(fd fd_pf, cmd const[DIOCCHANGEADDR], arg ptr[in, array[int8]]) 38 ioctl$DIOCGETRULESETS(fd fd_pf, cmd const[DIOCGETRULESETS], arg ptr[in, array[int8]]) 39 ioctl$DIOCGETRULESET(fd fd_pf, cmd const[DIOCGETRULESET], arg ptr[in, array[int8]]) 40 ioctl$DIOCRCLRTABLES(fd fd_pf, cmd const[DIOCRCLRTABLES], arg ptr[in, pfioc_table]) 41 ioctl$DIOCRADDTABLES(fd fd_pf, cmd const[DIOCRADDTABLES], arg ptr[in, pfioc_table]) 42 ioctl$DIOCRDELTABLES(fd fd_pf, cmd const[DIOCRDELTABLES], arg ptr[in, pfioc_table]) 43 ioctl$DIOCRGETTABLES(fd fd_pf, cmd const[DIOCRGETTABLES], arg ptr[in, pfioc_table]) 44 ioctl$DIOCRGETTSTATS(fd fd_pf, cmd const[DIOCRGETTSTATS], arg ptr[in, pfioc_table]) 45 ioctl$DIOCRCLRTSTATS(fd fd_pf, cmd const[DIOCRCLRTSTATS], arg ptr[in, pfioc_table]) 46 ioctl$DIOCRSETTFLAGS(fd fd_pf, cmd const[DIOCRSETTFLAGS], arg ptr[in, pfioc_table]) 47 ioctl$DIOCRADDADDRS(fd fd_pf, cmd const[DIOCRADDADDRS], arg ptr[in, pfioc_table]) 48 ioctl$DIOCRDELADDRS(fd fd_pf, cmd const[DIOCRDELADDRS], arg ptr[in, pfioc_table]) 49 ioctl$DIOCRSETADDRS(fd fd_pf, cmd const[DIOCRSETADDRS], arg ptr[in, pfioc_table]) 50 ioctl$DIOCRGETADDRS(fd fd_pf, cmd const[DIOCRGETADDRS], arg ptr[in, pfioc_table]) 51 ioctl$DIOCRTSTADDRS(fd fd_pf, cmd const[DIOCRTSTADDRS], arg ptr[in, pfioc_table]) 52 ioctl$DIOCRGETASTATS(fd fd_pf, cmd const[DIOCRGETASTATS], arg ptr[in, pfioc_table]) 53 ioctl$DIOCRCLRASTATS(fd fd_pf, cmd const[DIOCRCLRASTATS], arg ptr[in, pfioc_table]) 54 ioctl$DIOCRINADEFINE(fd fd_pf, cmd const[DIOCRINADEFINE], arg ptr[in, pfioc_table]) 55 ioctl$DIOCOSFPADD(fd fd_pf, cmd const[DIOCOSFPADD], arg ptr[in, array[int8]]) 56 ioctl$DIOCOSFPGET(fd fd_pf, cmd const[DIOCOSFPGET], arg ptr[in, array[int8]]) 57 ioctl$DIOCXBEGIN(fd fd_pf, cmd const[DIOCXBEGIN], arg ptr[in, array[int8]]) 58 ioctl$DIOCXCOMMIT(fd fd_pf, cmd const[DIOCXCOMMIT], arg ptr[in, array[int8]]) 59 ioctl$DIOCXROLLBACK(fd fd_pf, cmd const[DIOCXROLLBACK], arg ptr[in, array[int8]]) 60 ioctl$DIOCGETSRCNODES(fd fd_pf, cmd const[DIOCGETSRCNODES], arg ptr[in, array[int8]]) 61 ioctl$DIOCIGETIFACES(fd fd_pf, cmd const[DIOCIGETIFACES], arg ptr[in, pfioc_iface]) 62 ioctl$DIOCSETIFFLAG(fd fd_pf, cmd const[DIOCSETIFFLAG], arg ptr[in, pfioc_iface]) 63 ioctl$DIOCCLRIFFLAG(fd fd_pf, cmd const[DIOCCLRIFFLAG], arg ptr[in, pfioc_iface]) 64 ioctl$DIOCKILLSRCNODES(fd fd_pf, cmd const[DIOCKILLSRCNODES], arg ptr[in, array[int8]]) 65 66 pfioc_if { 67 ifname const[IFNAMSIZ, int8] 68 } 69 70 pfioc_tm { 71 timeout int32 72 seconds int32 73 } 74 75 pfioc_limit { 76 index int32 77 limit int32 78 } 79 80 pfr_table { 81 pfrt_anchor array[int8, MAXPATHLEN] 82 pfrt_name array[int8, PF_TABLE_NAME_SIZE] 83 pfrt_flags int32 84 pfrt_fback int8 85 } 86 87 pfioc_table { 88 pfrio_table pfr_table 89 pfrio_buffer ptr[in, array[int8]] 90 pfrio_esize int64 91 pfrio_size int64 92 pfrio_size2 int64 93 pfrio_nadd int64 94 pfrio_ndel int64 95 pfrio_nchange int64 96 pfrio_flags int64 97 pfrio_ticket int32 98 } 99 100 pfioc_iface { 101 pfiio_name const[IFNAMSIZ, int8] 102 pfiio_buffer ptr[in, array[int8]] 103 pfiio_esize int32 104 pfiio_size int32 105 pfiio_flags int32 106 }