sys/freebsd: Add pf ioctl()s

Tweak the building of the FreeBSD vm image to ensure pf is loaded at
startup, so that we can test it.
diff --git a/executor/defs.h b/executor/defs.h
index 846d25e..30095d3 100644
--- a/executor/defs.h
+++ b/executor/defs.h
@@ -20,7 +20,7 @@
 
 #if GOARCH_amd64
 #define GOARCH "amd64"
-#define SYZ_REVISION "f78432bae5c245e7b9b30dc20417edf7797ecce3"
+#define SYZ_REVISION "df0c7f110d9f80fc6efb916edd0244ecea6eeb9b"
 #define SYZ_EXECUTOR_USES_FORK_SERVER 1
 #define SYZ_EXECUTOR_USES_SHMEM 1
 #define SYZ_PAGE_SIZE 4096
diff --git a/executor/syscalls.h b/executor/syscalls.h
index 86fb978..2f0c0dc 100644
--- a/executor/syscalls.h
+++ b/executor/syscalls.h
@@ -423,6 +423,64 @@
     {"getsockopt$sock_linger", 118},
     {"getsockopt$sock_timeval", 118},
     {"getuid", 24},
+    {"ioctl$DIOCADDADDR", 54},
+    {"ioctl$DIOCADDALTQV0", 54},
+    {"ioctl$DIOCADDALTQV1", 54},
+    {"ioctl$DIOCADDRULE", 54},
+    {"ioctl$DIOCADDSTATE", 54},
+    {"ioctl$DIOCBEGINADDRS", 54},
+    {"ioctl$DIOCCHANGEADDR", 54},
+    {"ioctl$DIOCCHANGEALTQV0", 54},
+    {"ioctl$DIOCCHANGEALTQV1", 54},
+    {"ioctl$DIOCCHANGERULE", 54},
+    {"ioctl$DIOCCLRIFFLAG", 54},
+    {"ioctl$DIOCCLRSTATES", 54},
+    {"ioctl$DIOCGETADDR", 54},
+    {"ioctl$DIOCGETADDRS", 54},
+    {"ioctl$DIOCGETALTQSV0", 54},
+    {"ioctl$DIOCGETALTQSV1", 54},
+    {"ioctl$DIOCGETALTQV0", 54},
+    {"ioctl$DIOCGETALTQV1", 54},
+    {"ioctl$DIOCGETLIMIT", 54},
+    {"ioctl$DIOCGETQSTATSV0", 54},
+    {"ioctl$DIOCGETQSTATSV1", 54},
+    {"ioctl$DIOCGETRULE", 54},
+    {"ioctl$DIOCGETRULES", 54},
+    {"ioctl$DIOCGETRULESET", 54},
+    {"ioctl$DIOCGETRULESETS", 54},
+    {"ioctl$DIOCGETSRCNODES", 54},
+    {"ioctl$DIOCGETSTATE", 54},
+    {"ioctl$DIOCGETSTATES", 54},
+    {"ioctl$DIOCGETSTATUS", 54},
+    {"ioctl$DIOCGETTIMEOUT", 54},
+    {"ioctl$DIOCIGETIFACES", 54},
+    {"ioctl$DIOCKILLSRCNODES", 54},
+    {"ioctl$DIOCKILLSTATES", 54},
+    {"ioctl$DIOCNATLOOK", 54},
+    {"ioctl$DIOCOSFPADD", 54},
+    {"ioctl$DIOCOSFPGET", 54},
+    {"ioctl$DIOCRADDADDRS", 54},
+    {"ioctl$DIOCRADDTABLES", 54},
+    {"ioctl$DIOCRCLRASTATS", 54},
+    {"ioctl$DIOCRCLRTABLES", 54},
+    {"ioctl$DIOCRCLRTSTATS", 54},
+    {"ioctl$DIOCRDELADDRS", 54},
+    {"ioctl$DIOCRDELTABLES", 54},
+    {"ioctl$DIOCRGETADDRS", 54},
+    {"ioctl$DIOCRGETASTATS", 54},
+    {"ioctl$DIOCRGETTABLES", 54},
+    {"ioctl$DIOCRGETTSTATS", 54},
+    {"ioctl$DIOCRINADEFINE", 54},
+    {"ioctl$DIOCRSETADDRS", 54},
+    {"ioctl$DIOCRSETTFLAGS", 54},
+    {"ioctl$DIOCRTSTADDRS", 54},
+    {"ioctl$DIOCSETIFFLAG", 54},
+    {"ioctl$DIOCSETLIMIT", 54},
+    {"ioctl$DIOCSETSTATUSIF", 54},
+    {"ioctl$DIOCSETTIMEOUT", 54},
+    {"ioctl$DIOCXBEGIN", 54},
+    {"ioctl$DIOCXCOMMIT", 54},
+    {"ioctl$DIOCXROLLBACK", 54},
     {"lchown", 254},
     {"link", 9},
     {"linkat", 495},
@@ -453,6 +511,7 @@
     {"open", 5},
     {"open$dir", 5},
     {"openat", 499},
+    {"openat$ptmx", 499},
     {"pipe2", 542},
     {"poll", 209},
     {"ppoll", 545},
diff --git a/pkg/build/freebsd.go b/pkg/build/freebsd.go
index 4f3cb6a..73e234b 100644
--- a/pkg/build/freebsd.go
+++ b/pkg/build/freebsd.go
@@ -64,6 +64,8 @@
 
 sudo MAKEOBJDIRPREFIX=%s make -C %s installkernel KERNCONF=%s DESTDIR=$tmpdir
 
+echo 'pf_load="YES"' | sudo tee -a /boot/loader.conf
+
 sudo umount $tmpdir
 sudo mdconfig -d -u ${md#md}
 `, objPrefix, kernelDir, confFile)
diff --git a/sys/freebsd/gen/amd64.go b/sys/freebsd/gen/amd64.go
index 21a4695..83691be 100644
--- a/sys/freebsd/gen/amd64.go
+++ b/sys/freebsd/gen/amd64.go
@@ -14,6 +14,7 @@
 	{Name: "assoc_id", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}, Kind: []string{"assoc_id"}, Values: []uint64{0}},
 	{Name: "fd", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}, Kind: []string{"fd"}, Values: []uint64{18446744073709551615, 18446744073709551516}},
 	{Name: "fd_dir", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}, Kind: []string{"fd", "fd_dir"}, Values: []uint64{18446744073709551615, 18446744073709551516}},
+	{Name: "fd_pf", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}, Kind: []string{"fd", "fd_pf"}, Values: []uint64{18446744073709551615, 18446744073709551516}},
 	{Name: "gid", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}, Kind: []string{"gid"}, Values: []uint64{0, 18446744073709551615}},
 	{Name: "ifindex", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}, Kind: []string{"ifindex"}, Values: []uint64{0}},
 	{Name: "ipc", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}, Kind: []string{"ipc"}, Values: []uint64{0, 18446744073709551615}},
@@ -471,6 +472,46 @@
 		&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "pad0", TypeSize: 8}}},
 		&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "pad1", TypeSize: 8}}},
 	}}},
+	{Key: StructKey{Name: "pfioc_if"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "pfioc_if", TypeSize: 1}, Fields: []Type{
+		&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "ifname", TypeSize: 1}}, Kind: 2, RangeBegin: 16, RangeEnd: 16},
+	}}},
+	{Key: StructKey{Name: "pfioc_iface"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "pfioc_iface", TypeSize: 32}, Fields: []Type{
+		&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "pfiio_name", TypeSize: 1}}, Kind: 2, RangeBegin: 16, RangeEnd: 16},
+		&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 7}}, IsPad: true},
+		&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "pfiio_buffer", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}}},
+		&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "pfiio_esize", TypeSize: 4}}},
+		&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "pfiio_size", TypeSize: 4}}},
+		&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "pfiio_flags", TypeSize: 4}}},
+		&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 4}}, IsPad: true},
+	}}},
+	{Key: StructKey{Name: "pfioc_limit"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "pfioc_limit", TypeSize: 8}, Fields: []Type{
+		&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "index", TypeSize: 4}}},
+		&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "limit", TypeSize: 4}}},
+	}}},
+	{Key: StructKey{Name: "pfioc_table"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "pfioc_table", TypeSize: 1136}, Fields: []Type{
+		&StructType{Key: StructKey{Name: "pfr_table"}, FldName: "pfrio_table"},
+		&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "pfrio_buffer", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}}},
+		&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "pfrio_esize", TypeSize: 8}}},
+		&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "pfrio_size", TypeSize: 8}}},
+		&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "pfrio_size2", TypeSize: 8}}},
+		&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "pfrio_nadd", TypeSize: 8}}},
+		&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "pfrio_ndel", TypeSize: 8}}},
+		&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "pfrio_nchange", TypeSize: 8}}},
+		&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "pfrio_flags", TypeSize: 8}}},
+		&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "pfrio_ticket", TypeSize: 4}}},
+		&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 4}}, IsPad: true},
+	}}},
+	{Key: StructKey{Name: "pfioc_tm"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "pfioc_tm", TypeSize: 8}, Fields: []Type{
+		&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "timeout", TypeSize: 4}}},
+		&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "seconds", TypeSize: 4}}},
+	}}},
+	{Key: StructKey{Name: "pfr_table"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "pfr_table", TypeSize: 1064}, Fields: []Type{
+		&BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "pfrt_anchor", TypeSize: 1024}, Kind: 1, RangeBegin: 1024, RangeEnd: 1024},
+		&BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "pfrt_name", TypeSize: 32}, Kind: 1, RangeBegin: 32, RangeEnd: 32},
+		&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "pfrt_flags", TypeSize: 4}}},
+		&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "pfrt_fback", TypeSize: 1}}},
+		&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 3}}, IsPad: true},
+	}}},
 	{Key: StructKey{Name: "pipefd", Dir: 1}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "pipefd", TypeSize: 8, ArgDir: 1}, Fields: []Type{
 		&ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "rfd", TypeSize: 4, ArgDir: 1}},
 		&ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "wfd", TypeSize: 4, ArgDir: 1}},
@@ -2194,6 +2235,296 @@
 		&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "optlen", TypeSize: 8}, Type: &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", TypeSize: 4, ArgDir: 2}}, Buf: "optval"}},
 	}},
 	{NR: 24, Name: "getuid", CallName: "getuid", Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "uid", FldName: "ret", TypeSize: 4, ArgDir: 1}}},
+	{NR: 54, Name: "ioctl$DIOCADDADDR", CallName: "ioctl", Args: []Type{
+		&ResourceType{TypeCommon: TypeCommon{TypeName: "fd_pf", FldName: "fd", TypeSize: 4}},
+		&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 3295691828},
+		&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}}},
+	}},
+	{NR: 54, Name: "ioctl$DIOCADDALTQV0", CallName: "ioctl", Args: []Type{
+		&ResourceType{TypeCommon: TypeCommon{TypeName: "fd_pf", FldName: "fd", TypeSize: 4}},
+		&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 3238020141},
+		&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}}},
+	}},
+	{NR: 54, Name: "ioctl$DIOCADDALTQV1", CallName: "ioctl", Args: []Type{
+		&ResourceType{TypeCommon: TypeCommon{TypeName: "fd_pf", FldName: "fd", TypeSize: 4}},
+		&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 3241165869},
+		&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}}},
+	}},
+	{NR: 54, Name: "ioctl$DIOCADDRULE", CallName: "ioctl", Args: []Type{
+		&ResourceType{TypeCommon: TypeCommon{TypeName: "fd_pf", FldName: "fd", TypeSize: 4}},
+		&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 3420472324},
+		&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}}},
+	}},
+	{NR: 54, Name: "ioctl$DIOCADDSTATE", CallName: "ioctl", Args: []Type{
+		&ResourceType{TypeCommon: TypeCommon{TypeName: "fd_pf", FldName: "fd", TypeSize: 4}},
+		&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 3237102629},
+		&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}}},
+	}},
+	{NR: 54, Name: "ioctl$DIOCBEGINADDRS", CallName: "ioctl", Args: []Type{
+		&ResourceType{TypeCommon: TypeCommon{TypeName: "fd_pf", FldName: "fd", TypeSize: 4}},
+		&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 3295691827},
+		&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}}},
+	}},
+	{NR: 54, Name: "ioctl$DIOCCHANGEADDR", CallName: "ioctl", Args: []Type{
+		&ResourceType{TypeCommon: TypeCommon{TypeName: "fd_pf", FldName: "fd", TypeSize: 4}},
+		&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 3295691831},
+		&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}}},
+	}},
+	{NR: 54, Name: "ioctl$DIOCCHANGEALTQV0", CallName: "ioctl", Args: []Type{
+		&ResourceType{TypeCommon: TypeCommon{TypeName: "fd_pf", FldName: "fd", TypeSize: 4}},
+		&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 3238020145},
+		&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}}},
+	}},
+	{NR: 54, Name: "ioctl$DIOCCHANGEALTQV1", CallName: "ioctl", Args: []Type{
+		&ResourceType{TypeCommon: TypeCommon{TypeName: "fd_pf", FldName: "fd", TypeSize: 4}},
+		&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 3241165873},
+		&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}}},
+	}},
+	{NR: 54, Name: "ioctl$DIOCCHANGERULE", CallName: "ioctl", Args: []Type{
+		&ResourceType{TypeCommon: TypeCommon{TypeName: "fd_pf", FldName: "fd", TypeSize: 4}},
+		&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 3420472346},
+		&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}}},
+	}},
+	{NR: 54, Name: "ioctl$DIOCCLRIFFLAG", CallName: "ioctl", Args: []Type{
+		&ResourceType{TypeCommon: TypeCommon{TypeName: "fd_pf", FldName: "fd", TypeSize: 4}},
+		&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 3223864410},
+		&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "pfioc_iface"}}},
+	}},
+	{NR: 54, Name: "ioctl$DIOCCLRSTATES", CallName: "ioctl", Args: []Type{
+		&ResourceType{TypeCommon: TypeCommon{TypeName: "fd_pf", FldName: "fd", TypeSize: 4}},
+		&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 3235922962},
+		&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}}},
+	}},
+	{NR: 54, Name: "ioctl$DIOCGETADDR", CallName: "ioctl", Args: []Type{
+		&ResourceType{TypeCommon: TypeCommon{TypeName: "fd_pf", FldName: "fd", TypeSize: 4}},
+		&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 3295691830},
+		&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}}},
+	}},
+	{NR: 54, Name: "ioctl$DIOCGETADDRS", CallName: "ioctl", Args: []Type{
+		&ResourceType{TypeCommon: TypeCommon{TypeName: "fd_pf", FldName: "fd", TypeSize: 4}},
+		&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 3295691829},
+		&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}}},
+	}},
+	{NR: 54, Name: "ioctl$DIOCGETALTQSV0", CallName: "ioctl", Args: []Type{
+		&ResourceType{TypeCommon: TypeCommon{TypeName: "fd_pf", FldName: "fd", TypeSize: 4}},
+		&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 3238020143},
+		&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}}},
+	}},
+	{NR: 54, Name: "ioctl$DIOCGETALTQSV1", CallName: "ioctl", Args: []Type{
+		&ResourceType{TypeCommon: TypeCommon{TypeName: "fd_pf", FldName: "fd", TypeSize: 4}},
+		&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 3241165871},
+		&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}}},
+	}},
+	{NR: 54, Name: "ioctl$DIOCGETALTQV0", CallName: "ioctl", Args: []Type{
+		&ResourceType{TypeCommon: TypeCommon{TypeName: "fd_pf", FldName: "fd", TypeSize: 4}},
+		&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 3238020144},
+		&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}}},
+	}},
+	{NR: 54, Name: "ioctl$DIOCGETALTQV1", CallName: "ioctl", Args: []Type{
+		&ResourceType{TypeCommon: TypeCommon{TypeName: "fd_pf", FldName: "fd", TypeSize: 4}},
+		&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 3241165872},
+		&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}}},
+	}},
+	{NR: 54, Name: "ioctl$DIOCGETLIMIT", CallName: "ioctl", Args: []Type{
+		&ResourceType{TypeCommon: TypeCommon{TypeName: "fd_pf", FldName: "fd", TypeSize: 4}},
+		&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 3221767207},
+		&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "pfioc_limit"}}},
+	}},
+	{NR: 54, Name: "ioctl$DIOCGETQSTATSV0", CallName: "ioctl", Args: []Type{
+		&ResourceType{TypeCommon: TypeCommon{TypeName: "fd_pf", FldName: "fd", TypeSize: 4}},
+		&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 3222815794},
+		&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}}},
+	}},
+	{NR: 54, Name: "ioctl$DIOCGETQSTATSV1", CallName: "ioctl", Args: []Type{
+		&ResourceType{TypeCommon: TypeCommon{TypeName: "fd_pf", FldName: "fd", TypeSize: 4}},
+		&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 3223340082},
+		&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}}},
+	}},
+	{NR: 54, Name: "ioctl$DIOCGETRULE", CallName: "ioctl", Args: []Type{
+		&ResourceType{TypeCommon: TypeCommon{TypeName: "fd_pf", FldName: "fd", TypeSize: 4}},
+		&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 3420472327},
+		&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}}},
+	}},
+	{NR: 54, Name: "ioctl$DIOCGETRULES", CallName: "ioctl", Args: []Type{
+		&ResourceType{TypeCommon: TypeCommon{TypeName: "fd_pf", FldName: "fd", TypeSize: 4}},
+		&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 3420472326},
+		&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}}},
+	}},
+	{NR: 54, Name: "ioctl$DIOCGETRULESET", CallName: "ioctl", Args: []Type{
+		&ResourceType{TypeCommon: TypeCommon{TypeName: "fd_pf", FldName: "fd", TypeSize: 4}},
+		&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 3292808251},
+		&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}}},
+	}},
+	{NR: 54, Name: "ioctl$DIOCGETRULESETS", CallName: "ioctl", Args: []Type{
+		&ResourceType{TypeCommon: TypeCommon{TypeName: "fd_pf", FldName: "fd", TypeSize: 4}},
+		&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 3292808250},
+		&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}}},
+	}},
+	{NR: 54, Name: "ioctl$DIOCGETSRCNODES", CallName: "ioctl", Args: []Type{
+		&ResourceType{TypeCommon: TypeCommon{TypeName: "fd_pf", FldName: "fd", TypeSize: 4}},
+		&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 3222291540},
+		&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}}},
+	}},
+	{NR: 54, Name: "ioctl$DIOCGETSTATE", CallName: "ioctl", Args: []Type{
+		&ResourceType{TypeCommon: TypeCommon{TypeName: "fd_pf", FldName: "fd", TypeSize: 4}},
+		&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 3237102611},
+		&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}}},
+	}},
+	{NR: 54, Name: "ioctl$DIOCGETSTATES", CallName: "ioctl", Args: []Type{
+		&ResourceType{TypeCommon: TypeCommon{TypeName: "fd_pf", FldName: "fd", TypeSize: 4}},
+		&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 3222291481},
+		&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}}},
+	}},
+	{NR: 54, Name: "ioctl$DIOCGETSTATUS", CallName: "ioctl", Args: []Type{
+		&ResourceType{TypeCommon: TypeCommon{TypeName: "fd_pf", FldName: "fd", TypeSize: 4}},
+		&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 3248505877},
+		&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}}},
+	}},
+	{NR: 54, Name: "ioctl$DIOCGETTIMEOUT", CallName: "ioctl", Args: []Type{
+		&ResourceType{TypeCommon: TypeCommon{TypeName: "fd_pf", FldName: "fd", TypeSize: 4}},
+		&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 3221767198},
+		&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "pfioc_tm"}}},
+	}},
+	{NR: 54, Name: "ioctl$DIOCIGETIFACES", CallName: "ioctl", Args: []Type{
+		&ResourceType{TypeCommon: TypeCommon{TypeName: "fd_pf", FldName: "fd", TypeSize: 4}},
+		&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 3223864407},
+		&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "pfioc_iface"}}},
+	}},
+	{NR: 54, Name: "ioctl$DIOCKILLSRCNODES", CallName: "ioctl", Args: []Type{
+		&ResourceType{TypeCommon: TypeCommon{TypeName: "fd_pf", FldName: "fd", TypeSize: 4}},
+		&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 3229631579},
+		&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}}},
+	}},
+	{NR: 54, Name: "ioctl$DIOCKILLSTATES", CallName: "ioctl", Args: []Type{
+		&ResourceType{TypeCommon: TypeCommon{TypeName: "fd_pf", FldName: "fd", TypeSize: 4}},
+		&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 3235922985},
+		&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}}},
+	}},
+	{NR: 54, Name: "ioctl$DIOCNATLOOK", CallName: "ioctl", Args: []Type{
+		&ResourceType{TypeCommon: TypeCommon{TypeName: "fd_pf", FldName: "fd", TypeSize: 4}},
+		&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 3226223639},
+		&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}}},
+	}},
+	{NR: 54, Name: "ioctl$DIOCOSFPADD", CallName: "ioctl", Args: []Type{
+		&ResourceType{TypeCommon: TypeCommon{TypeName: "fd_pf", FldName: "fd", TypeSize: 4}},
+		&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 3230155855},
+		&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}}},
+	}},
+	{NR: 54, Name: "ioctl$DIOCOSFPGET", CallName: "ioctl", Args: []Type{
+		&ResourceType{TypeCommon: TypeCommon{TypeName: "fd_pf", FldName: "fd", TypeSize: 4}},
+		&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 3230155856},
+		&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}}},
+	}},
+	{NR: 54, Name: "ioctl$DIOCRADDADDRS", CallName: "ioctl", Args: []Type{
+		&ResourceType{TypeCommon: TypeCommon{TypeName: "fd_pf", FldName: "fd", TypeSize: 4}},
+		&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 3293594691},
+		&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "pfioc_table"}}},
+	}},
+	{NR: 54, Name: "ioctl$DIOCRADDTABLES", CallName: "ioctl", Args: []Type{
+		&ResourceType{TypeCommon: TypeCommon{TypeName: "fd_pf", FldName: "fd", TypeSize: 4}},
+		&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 3293594685},
+		&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "pfioc_table"}}},
+	}},
+	{NR: 54, Name: "ioctl$DIOCRCLRASTATS", CallName: "ioctl", Args: []Type{
+		&ResourceType{TypeCommon: TypeCommon{TypeName: "fd_pf", FldName: "fd", TypeSize: 4}},
+		&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 3293594696},
+		&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "pfioc_table"}}},
+	}},
+	{NR: 54, Name: "ioctl$DIOCRCLRTABLES", CallName: "ioctl", Args: []Type{
+		&ResourceType{TypeCommon: TypeCommon{TypeName: "fd_pf", FldName: "fd", TypeSize: 4}},
+		&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 3293594684},
+		&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "pfioc_table"}}},
+	}},
+	{NR: 54, Name: "ioctl$DIOCRCLRTSTATS", CallName: "ioctl", Args: []Type{
+		&ResourceType{TypeCommon: TypeCommon{TypeName: "fd_pf", FldName: "fd", TypeSize: 4}},
+		&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 3293594689},
+		&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "pfioc_table"}}},
+	}},
+	{NR: 54, Name: "ioctl$DIOCRDELADDRS", CallName: "ioctl", Args: []Type{
+		&ResourceType{TypeCommon: TypeCommon{TypeName: "fd_pf", FldName: "fd", TypeSize: 4}},
+		&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 3293594692},
+		&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "pfioc_table"}}},
+	}},
+	{NR: 54, Name: "ioctl$DIOCRDELTABLES", CallName: "ioctl", Args: []Type{
+		&ResourceType{TypeCommon: TypeCommon{TypeName: "fd_pf", FldName: "fd", TypeSize: 4}},
+		&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 3293594686},
+		&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "pfioc_table"}}},
+	}},
+	{NR: 54, Name: "ioctl$DIOCRGETADDRS", CallName: "ioctl", Args: []Type{
+		&ResourceType{TypeCommon: TypeCommon{TypeName: "fd_pf", FldName: "fd", TypeSize: 4}},
+		&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 3293594694},
+		&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "pfioc_table"}}},
+	}},
+	{NR: 54, Name: "ioctl$DIOCRGETASTATS", CallName: "ioctl", Args: []Type{
+		&ResourceType{TypeCommon: TypeCommon{TypeName: "fd_pf", FldName: "fd", TypeSize: 4}},
+		&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 3293594695},
+		&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "pfioc_table"}}},
+	}},
+	{NR: 54, Name: "ioctl$DIOCRGETTABLES", CallName: "ioctl", Args: []Type{
+		&ResourceType{TypeCommon: TypeCommon{TypeName: "fd_pf", FldName: "fd", TypeSize: 4}},
+		&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 3293594687},
+		&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "pfioc_table"}}},
+	}},
+	{NR: 54, Name: "ioctl$DIOCRGETTSTATS", CallName: "ioctl", Args: []Type{
+		&ResourceType{TypeCommon: TypeCommon{TypeName: "fd_pf", FldName: "fd", TypeSize: 4}},
+		&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 3293594688},
+		&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "pfioc_table"}}},
+	}},
+	{NR: 54, Name: "ioctl$DIOCRINADEFINE", CallName: "ioctl", Args: []Type{
+		&ResourceType{TypeCommon: TypeCommon{TypeName: "fd_pf", FldName: "fd", TypeSize: 4}},
+		&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 3293594699},
+		&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "pfioc_table"}}},
+	}},
+	{NR: 54, Name: "ioctl$DIOCRSETADDRS", CallName: "ioctl", Args: []Type{
+		&ResourceType{TypeCommon: TypeCommon{TypeName: "fd_pf", FldName: "fd", TypeSize: 4}},
+		&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 3293594693},
+		&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "pfioc_table"}}},
+	}},
+	{NR: 54, Name: "ioctl$DIOCRSETTFLAGS", CallName: "ioctl", Args: []Type{
+		&ResourceType{TypeCommon: TypeCommon{TypeName: "fd_pf", FldName: "fd", TypeSize: 4}},
+		&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 3293594698},
+		&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "pfioc_table"}}},
+	}},
+	{NR: 54, Name: "ioctl$DIOCRTSTADDRS", CallName: "ioctl", Args: []Type{
+		&ResourceType{TypeCommon: TypeCommon{TypeName: "fd_pf", FldName: "fd", TypeSize: 4}},
+		&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 3293594697},
+		&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "pfioc_table"}}},
+	}},
+	{NR: 54, Name: "ioctl$DIOCSETIFFLAG", CallName: "ioctl", Args: []Type{
+		&ResourceType{TypeCommon: TypeCommon{TypeName: "fd_pf", FldName: "fd", TypeSize: 4}},
+		&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 3223864409},
+		&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "pfioc_iface"}}},
+	}},
+	{NR: 54, Name: "ioctl$DIOCSETLIMIT", CallName: "ioctl", Args: []Type{
+		&ResourceType{TypeCommon: TypeCommon{TypeName: "fd_pf", FldName: "fd", TypeSize: 4}},
+		&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 3221767208},
+		&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "pfioc_limit"}}},
+	}},
+	{NR: 54, Name: "ioctl$DIOCSETSTATUSIF", CallName: "ioctl", Args: []Type{
+		&ResourceType{TypeCommon: TypeCommon{TypeName: "fd_pf", FldName: "fd", TypeSize: 4}},
+		&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 3222291476},
+		&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "pfioc_if"}}},
+	}},
+	{NR: 54, Name: "ioctl$DIOCSETTIMEOUT", CallName: "ioctl", Args: []Type{
+		&ResourceType{TypeCommon: TypeCommon{TypeName: "fd_pf", FldName: "fd", TypeSize: 4}},
+		&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 3221767197},
+		&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "pfioc_tm"}}},
+	}},
+	{NR: 54, Name: "ioctl$DIOCXBEGIN", CallName: "ioctl", Args: []Type{
+		&ResourceType{TypeCommon: TypeCommon{TypeName: "fd_pf", FldName: "fd", TypeSize: 4}},
+		&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 3222291537},
+		&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}}},
+	}},
+	{NR: 54, Name: "ioctl$DIOCXCOMMIT", CallName: "ioctl", Args: []Type{
+		&ResourceType{TypeCommon: TypeCommon{TypeName: "fd_pf", FldName: "fd", TypeSize: 4}},
+		&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 3222291538},
+		&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}}},
+	}},
+	{NR: 54, Name: "ioctl$DIOCXROLLBACK", CallName: "ioctl", Args: []Type{
+		&ResourceType{TypeCommon: TypeCommon{TypeName: "fd_pf", FldName: "fd", TypeSize: 4}},
+		&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 3222291539},
+		&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}}},
+	}},
 	{NR: 254, Name: "lchown", CallName: "lchown", Args: []Type{
 		&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "file", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename", IsVarlen: true}, Kind: 3}},
 		&ResourceType{TypeCommon: TypeCommon{TypeName: "uid", FldName: "uid", TypeSize: 4}},
@@ -2338,6 +2669,12 @@
 		&FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "open_flags", FldName: "flags", TypeSize: 8}}, Vals: []uint64{0, 1, 2, 8, 64, 1048576, 512, 65536, 131072, 2048, 32768, 256, 4, 128, 1024}, BitMask: true},
 		&FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "open_mode", FldName: "mode", TypeSize: 8}}, Vals: []uint64{256, 128, 64, 32, 16, 8, 4, 2, 1}, BitMask: true},
 	}, Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "ret", TypeSize: 4, ArgDir: 1}}},
+	{NR: 499, Name: "openat$ptmx", CallName: "openat", Args: []Type{
+		&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "fd", TypeSize: 8}}, Val: 18446744073709551516},
+		&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "file", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "string", TypeSize: 8}, Kind: 2, Values: []string{"/dev/pf\x00"}}},
+		&FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "open_flags", FldName: "flags", TypeSize: 8}}, Vals: []uint64{0, 1, 2, 8, 64, 1048576, 512, 65536, 131072, 2048, 32768, 256, 4, 128, 1024}, BitMask: true},
+		&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "mode", TypeSize: 8}}},
+	}, Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_pf", FldName: "ret", TypeSize: 4, ArgDir: 1}}},
 	{NR: 542, Name: "pipe2", CallName: "pipe2", Args: []Type{
 		&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "pipefd", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "pipefd", Dir: 1}}},
 		&FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pipe_flags", FldName: "flags", TypeSize: 8}}, Vals: []uint64{4, 1048576}, BitMask: true},
@@ -3665,6 +4002,73 @@
 	{Name: "CLOCK_PROCESS_CPUTIME_ID", Value: 15},
 	{Name: "CLOCK_REALTIME"},
 	{Name: "CLOCK_THREAD_CPUTIME_ID", Value: 14},
+	{Name: "DIOCADDADDR", Value: 3295691828},
+	{Name: "DIOCADDALTQV0", Value: 3238020141},
+	{Name: "DIOCADDALTQV1", Value: 3241165869},
+	{Name: "DIOCADDRULE", Value: 3420472324},
+	{Name: "DIOCADDSTATE", Value: 3237102629},
+	{Name: "DIOCBEGINADDRS", Value: 3295691827},
+	{Name: "DIOCCHANGEADDR", Value: 3295691831},
+	{Name: "DIOCCHANGEALTQV0", Value: 3238020145},
+	{Name: "DIOCCHANGEALTQV1", Value: 3241165873},
+	{Name: "DIOCCHANGERULE", Value: 3420472346},
+	{Name: "DIOCCLRIFFLAG", Value: 3223864410},
+	{Name: "DIOCCLRRULECTRS", Value: 536888358},
+	{Name: "DIOCCLRSRCNODES", Value: 536888405},
+	{Name: "DIOCCLRSTATES", Value: 3235922962},
+	{Name: "DIOCCLRSTATUS", Value: 536888342},
+	{Name: "DIOCGETADDR", Value: 3295691830},
+	{Name: "DIOCGETADDRS", Value: 3295691829},
+	{Name: "DIOCGETALTQSV0", Value: 3238020143},
+	{Name: "DIOCGETALTQSV1", Value: 3241165871},
+	{Name: "DIOCGETALTQV0", Value: 3238020144},
+	{Name: "DIOCGETALTQV1", Value: 3241165872},
+	{Name: "DIOCGETLIMIT", Value: 3221767207},
+	{Name: "DIOCGETQSTATSV0", Value: 3222815794},
+	{Name: "DIOCGETQSTATSV1", Value: 3223340082},
+	{Name: "DIOCGETRULE", Value: 3420472327},
+	{Name: "DIOCGETRULES", Value: 3420472326},
+	{Name: "DIOCGETRULESET", Value: 3292808251},
+	{Name: "DIOCGETRULESETS", Value: 3292808250},
+	{Name: "DIOCGETSRCNODES", Value: 3222291540},
+	{Name: "DIOCGETSTATE", Value: 3237102611},
+	{Name: "DIOCGETSTATES", Value: 3222291481},
+	{Name: "DIOCGETSTATUS", Value: 3248505877},
+	{Name: "DIOCGETTIMEOUT", Value: 3221767198},
+	{Name: "DIOCIGETIFACES", Value: 3223864407},
+	{Name: "DIOCKILLSRCNODES", Value: 3229631579},
+	{Name: "DIOCKILLSTATES", Value: 3235922985},
+	{Name: "DIOCNATLOOK", Value: 3226223639},
+	{Name: "DIOCOSFPADD", Value: 3230155855},
+	{Name: "DIOCOSFPFLUSH", Value: 536888398},
+	{Name: "DIOCOSFPGET", Value: 3230155856},
+	{Name: "DIOCRADDADDRS", Value: 3293594691},
+	{Name: "DIOCRADDTABLES", Value: 3293594685},
+	{Name: "DIOCRCLRADDRS", Value: 3293594690},
+	{Name: "DIOCRCLRASTATS", Value: 3293594696},
+	{Name: "DIOCRCLRTABLES", Value: 3293594684},
+	{Name: "DIOCRCLRTSTATS", Value: 3293594689},
+	{Name: "DIOCRDELADDRS", Value: 3293594692},
+	{Name: "DIOCRDELTABLES", Value: 3293594686},
+	{Name: "DIOCRGETADDRS", Value: 3293594694},
+	{Name: "DIOCRGETASTATS", Value: 3293594695},
+	{Name: "DIOCRGETTABLES", Value: 3293594687},
+	{Name: "DIOCRGETTSTATS", Value: 3293594688},
+	{Name: "DIOCRINADEFINE", Value: 3293594699},
+	{Name: "DIOCRSETADDRS", Value: 3293594693},
+	{Name: "DIOCRSETTFLAGS", Value: 3293594698},
+	{Name: "DIOCRTSTADDRS", Value: 3293594697},
+	{Name: "DIOCSETDEBUG", Value: 3221505048},
+	{Name: "DIOCSETHOSTID", Value: 3221505110},
+	{Name: "DIOCSETIFFLAG", Value: 3223864409},
+	{Name: "DIOCSETLIMIT", Value: 3221767208},
+	{Name: "DIOCSETSTATUSIF", Value: 3222291476},
+	{Name: "DIOCSETTIMEOUT", Value: 3221767197},
+	{Name: "DIOCSTARTALTQ", Value: 536888362},
+	{Name: "DIOCSTOPALTQ", Value: 536888363},
+	{Name: "DIOCXBEGIN", Value: 3222291537},
+	{Name: "DIOCXCOMMIT", Value: 3222291538},
+	{Name: "DIOCXROLLBACK", Value: 3222291539},
 	{Name: "FASYNC", Value: 64},
 	{Name: "FD_CLOEXEC", Value: 1},
 	{Name: "F_DUPFD"},
@@ -3686,6 +4090,7 @@
 	{Name: "GETPID", Value: 4},
 	{Name: "GETVAL", Value: 5},
 	{Name: "GETZCNT", Value: 7},
+	{Name: "IFNAMSIZ", Value: 16},
 	{Name: "IPC_CREAT", Value: 512},
 	{Name: "IPC_EXCL", Value: 1024},
 	{Name: "IPC_INFO", Value: 3},
@@ -3756,36 +4161,7 @@
 	{Name: "ITIMER_PROF", Value: 2},
 	{Name: "ITIMER_REAL"},
 	{Name: "ITIMER_VIRTUAL", Value: 1},
-	{Name: "LINUX_AF_INET6", Value: 10},
-	{Name: "LINUX_AF_UNIX", Value: 1},
-	{Name: "LINUX_AF_UNSPEC"},
-	{Name: "LINUX_IPV6_CHECKSUM", Value: 7},
-	{Name: "LINUX_IPV6_DONTFRAG", Value: 62},
-	{Name: "LINUX_IPV6_DSTOPTS", Value: 59},
-	{Name: "LINUX_IPV6_HOPLIMIT", Value: 52},
-	{Name: "LINUX_IPV6_HOPOPTS", Value: 54},
-	{Name: "LINUX_IPV6_MULTICAST_HOPS", Value: 18},
-	{Name: "LINUX_IPV6_MULTICAST_IF", Value: 17},
-	{Name: "LINUX_IPV6_MULTICAST_LOOP", Value: 19},
-	{Name: "LINUX_IPV6_NEXTHOP", Value: 9},
-	{Name: "LINUX_IPV6_PATHMTU", Value: 61},
-	{Name: "LINUX_IPV6_PKTINFO", Value: 50},
-	{Name: "LINUX_IPV6_RECVDSTOPTS", Value: 58},
-	{Name: "LINUX_IPV6_RECVHOPLIMIT", Value: 51},
-	{Name: "LINUX_IPV6_RECVHOPOPTS", Value: 53},
-	{Name: "LINUX_IPV6_RECVPATHMTU", Value: 60},
-	{Name: "LINUX_IPV6_RECVPKTINFO", Value: 49},
-	{Name: "LINUX_IPV6_RECVRTHDR", Value: 56},
-	{Name: "LINUX_IPV6_RTHDR", Value: 57},
-	{Name: "LINUX_IPV6_RTHDRDSTOPTS", Value: 55},
-	{Name: "LINUX_IPV6_UNICAST_HOPS", Value: 16},
-	{Name: "LINUX_IPV6_V6ONLY", Value: 26},
 	{Name: "LINUX_SCM_CREDENTIALS", Value: 2},
-	{Name: "LINUX_SCM_RIGHTS", Value: 1},
-	{Name: "LINUX_SOCK_DGRAM", Value: 2},
-	{Name: "LINUX_SOCK_SEQPACKET", Value: 5},
-	{Name: "LINUX_SOCK_STREAM", Value: 1},
-	{Name: "LINUX_SOL_SOCKET", Value: 1},
 	{Name: "LOCK_EX", Value: 2},
 	{Name: "LOCK_NB", Value: 4},
 	{Name: "LOCK_SH", Value: 1},
@@ -3802,6 +4178,7 @@
 	{Name: "MAP_PRIVATE", Value: 2},
 	{Name: "MAP_SHARED", Value: 1},
 	{Name: "MAP_STACK", Value: 1024},
+	{Name: "MAXPATHLEN", Value: 1024},
 	{Name: "MCAST_BLOCK_SOURCE", Value: 84},
 	{Name: "MCAST_EXCLUDE", Value: 2},
 	{Name: "MCAST_INCLUDE", Value: 1},
@@ -3843,6 +4220,7 @@
 	{Name: "O_SYNC", Value: 128},
 	{Name: "O_TRUNC", Value: 1024},
 	{Name: "O_WRONLY", Value: 1},
+	{Name: "PF_TABLE_NAME_SIZE", Value: 32},
 	{Name: "POLLERR", Value: 8},
 	{Name: "POLLHUP", Value: 16},
 	{Name: "POLLIN", Value: 1},
@@ -4083,6 +4461,7 @@
 	{Name: "SYS_getsockname", Value: 32},
 	{Name: "SYS_getsockopt", Value: 118},
 	{Name: "SYS_getuid", Value: 24},
+	{Name: "SYS_ioctl", Value: 54},
 	{Name: "SYS_lchown", Value: 254},
 	{Name: "SYS_link", Value: 9},
 	{Name: "SYS_linkat", Value: 495},
@@ -4208,4 +4587,4 @@
 	{Name: "WUNTRACED", Value: 2},
 }
 
-const revision_amd64 = "f78432bae5c245e7b9b30dc20417edf7797ecce3"
+const revision_amd64 = "df0c7f110d9f80fc6efb916edd0244ecea6eeb9b"
diff --git a/sys/freebsd/pf.txt b/sys/freebsd/pf.txt
new file mode 100644
index 0000000..cb38bbf
--- /dev/null
+++ b/sys/freebsd/pf.txt
@@ -0,0 +1,120 @@
+## 
+
+include <sys/param.h>
+include <sys/socket.h>
+include <sys/cpuset.h>
+include <sys/lock.h>
+include <sys/rmlock.h>
+include <sys/mbuf.h>
+include <net/if.h>
+include <net/radix.h>
+include <net/vnet.h>
+include <netpfil/pf/pf.h>
+include <netpfil/pf/pf_mtag.h>
+
+include <net/pfvar.h>
+
+resource fd_pf[fd]
+
+openat$ptmx(fd const[AT_FDCWD], file ptr[in, string["/dev/pf"]], flags flags[open_flags], mode const[0]) fd_pf
+
+ioctl$DIOCADDRULE(fd fd_pf, cmd const[DIOCADDRULE], arg ptr[in, array[int8]])
+ioctl$DIOCGETRULES(fd fd_pf, cmd const[DIOCGETRULES], arg ptr[in, array[int8]])
+ioctl$DIOCGETRULE(fd fd_pf, cmd const[DIOCGETRULE], arg ptr[in, array[int8]])
+ioctl$DIOCCLRSTATES(fd fd_pf, cmd const[DIOCCLRSTATES], arg ptr[in, array[int8]])
+ioctl$DIOCGETSTATE(fd fd_pf, cmd const[DIOCGETSTATE], arg ptr[in, array[int8]])
+ioctl$DIOCSETSTATUSIF(fd fd_pf, cmd const[DIOCSETSTATUSIF], arg ptr[in, pfioc_if])
+ioctl$DIOCGETSTATUS(fd fd_pf, cmd const[DIOCGETSTATUS], arg ptr[in, array[int8]])
+ioctl$DIOCNATLOOK(fd fd_pf, cmd const[DIOCNATLOOK], arg ptr[in, array[int8]])
+ioctl$DIOCGETSTATES(fd fd_pf, cmd const[DIOCGETSTATES], arg ptr[in, array[int8]])
+ioctl$DIOCCHANGERULE(fd fd_pf, cmd const[DIOCCHANGERULE], arg ptr[in, array[int8]])
+ioctl$DIOCSETTIMEOUT(fd fd_pf, cmd const[DIOCSETTIMEOUT], arg ptr[in, pfioc_tm])
+ioctl$DIOCGETTIMEOUT(fd fd_pf, cmd const[DIOCGETTIMEOUT], arg ptr[in, pfioc_tm])
+ioctl$DIOCADDSTATE(fd fd_pf, cmd const[DIOCADDSTATE], arg ptr[in, array[int8]])
+ioctl$DIOCGETLIMIT(fd fd_pf, cmd const[DIOCGETLIMIT], arg ptr[in, pfioc_limit])
+ioctl$DIOCSETLIMIT(fd fd_pf, cmd const[DIOCSETLIMIT], arg ptr[in, pfioc_limit])
+ioctl$DIOCKILLSTATES(fd fd_pf, cmd const[DIOCKILLSTATES], arg ptr[in, array[int8]])
+ioctl$DIOCADDALTQV0(fd fd_pf, cmd const[DIOCADDALTQV0], arg ptr[in, array[int8]])
+ioctl$DIOCADDALTQV1(fd fd_pf, cmd const[DIOCADDALTQV1], arg ptr[in, array[int8]])
+ioctl$DIOCGETALTQSV0(fd fd_pf, cmd const[DIOCGETALTQSV0], arg ptr[in, array[int8]])
+ioctl$DIOCGETALTQSV1(fd fd_pf, cmd const[DIOCGETALTQSV1], arg ptr[in, array[int8]])
+ioctl$DIOCGETALTQV0(fd fd_pf, cmd const[DIOCGETALTQV0], arg ptr[in, array[int8]])
+ioctl$DIOCGETALTQV1(fd fd_pf, cmd const[DIOCGETALTQV1], arg ptr[in, array[int8]])
+ioctl$DIOCCHANGEALTQV0(fd fd_pf, cmd const[DIOCCHANGEALTQV0], arg ptr[in, array[int8]])
+ioctl$DIOCCHANGEALTQV1(fd fd_pf, cmd const[DIOCCHANGEALTQV1], arg ptr[in, array[int8]])
+ioctl$DIOCGETQSTATSV0(fd fd_pf, cmd const[DIOCGETQSTATSV0], arg ptr[in, array[int8]])
+ioctl$DIOCGETQSTATSV1(fd fd_pf, cmd const[DIOCGETQSTATSV1], arg ptr[in, array[int8]])
+ioctl$DIOCBEGINADDRS(fd fd_pf, cmd const[DIOCBEGINADDRS], arg ptr[in, array[int8]])
+ioctl$DIOCADDADDR(fd fd_pf, cmd const[DIOCADDADDR], arg ptr[in, array[int8]])
+ioctl$DIOCGETADDRS(fd fd_pf, cmd const[DIOCGETADDRS], arg ptr[in, array[int8]])
+ioctl$DIOCGETADDR(fd fd_pf, cmd const[DIOCGETADDR], arg ptr[in, array[int8]])
+ioctl$DIOCCHANGEADDR(fd fd_pf, cmd const[DIOCCHANGEADDR], arg ptr[in, array[int8]])
+ioctl$DIOCGETRULESETS(fd fd_pf, cmd const[DIOCGETRULESETS], arg ptr[in, array[int8]])
+ioctl$DIOCGETRULESET(fd fd_pf, cmd const[DIOCGETRULESET], arg ptr[in, array[int8]])
+ioctl$DIOCRCLRTABLES(fd fd_pf, cmd const[DIOCRCLRTABLES], arg ptr[in, pfioc_table])
+ioctl$DIOCRADDTABLES(fd fd_pf, cmd const[DIOCRADDTABLES], arg ptr[in, pfioc_table])
+ioctl$DIOCRDELTABLES(fd fd_pf, cmd const[DIOCRDELTABLES], arg ptr[in, pfioc_table])
+ioctl$DIOCRGETTABLES(fd fd_pf, cmd const[DIOCRGETTABLES], arg ptr[in, pfioc_table])
+ioctl$DIOCRGETTSTATS(fd fd_pf, cmd const[DIOCRGETTSTATS], arg ptr[in, pfioc_table])
+ioctl$DIOCRCLRTSTATS(fd fd_pf, cmd const[DIOCRCLRTSTATS], arg ptr[in, pfioc_table])
+ioctl$DIOCRSETTFLAGS(fd fd_pf, cmd const[DIOCRSETTFLAGS], arg ptr[in, pfioc_table])
+ioctl$DIOCRADDADDRS(fd fd_pf, cmd const[DIOCRADDADDRS], arg ptr[in, pfioc_table])
+ioctl$DIOCRDELADDRS(fd fd_pf, cmd const[DIOCRDELADDRS], arg ptr[in, pfioc_table])
+ioctl$DIOCRSETADDRS(fd fd_pf, cmd const[DIOCRSETADDRS], arg ptr[in, pfioc_table])
+ioctl$DIOCRGETADDRS(fd fd_pf, cmd const[DIOCRGETADDRS], arg ptr[in, pfioc_table])
+ioctl$DIOCRTSTADDRS(fd fd_pf, cmd const[DIOCRTSTADDRS], arg ptr[in, pfioc_table])
+ioctl$DIOCRGETASTATS(fd fd_pf, cmd const[DIOCRGETASTATS], arg ptr[in, pfioc_table])
+ioctl$DIOCRCLRASTATS(fd fd_pf, cmd const[DIOCRCLRASTATS], arg ptr[in, pfioc_table])
+ioctl$DIOCRINADEFINE(fd fd_pf, cmd const[DIOCRINADEFINE], arg ptr[in, pfioc_table])
+ioctl$DIOCOSFPADD(fd fd_pf, cmd const[DIOCOSFPADD], arg ptr[in, array[int8]])
+ioctl$DIOCOSFPGET(fd fd_pf, cmd const[DIOCOSFPGET], arg ptr[in, array[int8]])
+ioctl$DIOCXBEGIN(fd fd_pf, cmd const[DIOCXBEGIN], arg ptr[in, array[int8]])
+ioctl$DIOCXCOMMIT(fd fd_pf, cmd const[DIOCXCOMMIT], arg ptr[in, array[int8]])
+ioctl$DIOCXROLLBACK(fd fd_pf, cmd const[DIOCXROLLBACK], arg ptr[in, array[int8]])
+ioctl$DIOCGETSRCNODES(fd fd_pf, cmd const[DIOCGETSRCNODES], arg ptr[in, array[int8]])
+ioctl$DIOCIGETIFACES(fd fd_pf, cmd const[DIOCIGETIFACES], arg ptr[in, pfioc_iface])
+ioctl$DIOCSETIFFLAG(fd fd_pf, cmd const[DIOCSETIFFLAG], arg ptr[in, pfioc_iface])
+ioctl$DIOCCLRIFFLAG(fd fd_pf, cmd const[DIOCCLRIFFLAG], arg ptr[in, pfioc_iface])
+ioctl$DIOCKILLSRCNODES(fd fd_pf, cmd const[DIOCKILLSRCNODES], arg ptr[in, array[int8]])
+
+pfioc_if {
+	ifname	int8[IFNAMSIZ]
+}
+
+pfioc_tm {
+	timeout	int32
+	seconds	int32
+}
+
+pfioc_limit {
+	index	int32
+	limit	int32
+}
+
+pfr_table {
+	pfrt_anchor	array[int8, MAXPATHLEN]
+	pfrt_name	array[int8, PF_TABLE_NAME_SIZE]
+	pfrt_flags	int32
+	pfrt_fback	int8
+}
+
+pfioc_table {
+	pfrio_table	pfr_table
+	pfrio_buffer	ptr[in, array[int8]]
+	pfrio_esize	int64
+	pfrio_size	int64
+	pfrio_size2	int64
+	pfrio_nadd	int64
+	pfrio_ndel	int64
+	pfrio_nchange	int64
+	pfrio_flags	int64
+	pfrio_ticket	int32
+}
+
+pfioc_iface {
+	pfiio_name	int8[IFNAMSIZ]
+	pfiio_buffer	ptr[in, array[int8]]
+	pfiio_esize	int32
+	pfiio_size	int32
+	pfiio_flags	int32
+}
diff --git a/sys/freebsd/pf_amd64.const b/sys/freebsd/pf_amd64.const
new file mode 100644
index 0000000..c89e219
--- /dev/null
+++ b/sys/freebsd/pf_amd64.const
@@ -0,0 +1,73 @@
+# AT_FDCWD is not set
+DIOCADDRULE = 3420472324
+DIOCGETRULES = 3420472326
+DIOCGETRULE = 3420472327
+DIOCCLRSTATES = 3235922962
+DIOCGETSTATE = 3237102611
+DIOCSETSTATUSIF = 3222291476
+DIOCGETSTATUS = 3248505877
+DIOCCLRSTATUS = 536888342
+DIOCNATLOOK = 3226223639
+DIOCSETDEBUG = 3221505048
+DIOCGETSTATES = 3222291481
+DIOCCHANGERULE = 3420472346
+DIOCSETTIMEOUT = 3221767197
+DIOCGETTIMEOUT = 3221767198
+DIOCADDSTATE = 3237102629
+DIOCCLRRULECTRS = 536888358
+DIOCGETLIMIT = 3221767207
+DIOCSETLIMIT = 3221767208
+DIOCKILLSTATES = 3235922985
+DIOCSTARTALTQ = 536888362
+DIOCSTOPALTQ = 536888363
+DIOCADDALTQV0 = 3238020141
+DIOCADDALTQV1 = 3241165869
+DIOCGETALTQSV0 = 3238020143
+DIOCGETALTQSV1 = 3241165871
+DIOCGETALTQV0 = 3238020144
+DIOCGETALTQV1 = 3241165872
+DIOCCHANGEALTQV0 = 3238020145
+DIOCCHANGEALTQV1 = 3241165873
+DIOCGETQSTATSV0 = 3222815794
+DIOCGETQSTATSV1 = 3223340082
+DIOCBEGINADDRS = 3295691827
+DIOCADDADDR = 3295691828
+DIOCGETADDRS = 3295691829
+DIOCGETADDR = 3295691830
+DIOCCHANGEADDR = 3295691831
+DIOCGETRULESETS = 3292808250
+DIOCGETRULESET = 3292808251
+DIOCRCLRTABLES = 3293594684
+DIOCRADDTABLES = 3293594685
+DIOCRDELTABLES = 3293594686
+DIOCRGETTABLES = 3293594687
+DIOCRGETTSTATS = 3293594688
+DIOCRCLRTSTATS = 3293594689
+DIOCRCLRADDRS = 3293594690
+DIOCRADDADDRS = 3293594691
+DIOCRDELADDRS = 3293594692
+DIOCRSETADDRS = 3293594693
+DIOCRGETADDRS = 3293594694
+DIOCRGETASTATS = 3293594695
+DIOCRCLRASTATS = 3293594696
+DIOCRTSTADDRS = 3293594697
+DIOCRSETTFLAGS = 3293594698
+DIOCRINADEFINE = 3293594699
+DIOCOSFPFLUSH = 536888398
+DIOCOSFPADD = 3230155855
+DIOCOSFPGET = 3230155856
+DIOCXBEGIN = 3222291537
+DIOCXCOMMIT = 3222291538
+DIOCXROLLBACK = 3222291539
+DIOCGETSRCNODES = 3222291540
+DIOCCLRSRCNODES = 536888405
+DIOCSETHOSTID = 3221505110
+DIOCIGETIFACES = 3223864407
+DIOCSETIFFLAG = 3223864409
+DIOCCLRIFFLAG = 3223864410
+DIOCKILLSRCNODES = 3229631579
+MAXPATHLEN = 1024
+PF_TABLE_NAME_SIZE = 32
+IFNAMSIZ = 16
+SYS_ioctl = 54
+SYS_openat = 499
diff --git a/sys/freebsd/socket_inet6_amd64.const b/sys/freebsd/socket_inet6_amd64.const
index 4e5bd21..4a9d522 100644
--- a/sys/freebsd/socket_inet6_amd64.const
+++ b/sys/freebsd/socket_inet6_amd64.const
@@ -33,28 +33,6 @@
 IPV6_TCLASS = 61
 IPV6_UNICAST_HOPS = 4
 IPV6_V6ONLY = 27
-LINUX_AF_INET6 = 10
-LINUX_IPV6_CHECKSUM = 7
-LINUX_IPV6_DONTFRAG = 62
-LINUX_IPV6_DSTOPTS = 59
-LINUX_IPV6_HOPLIMIT = 52
-LINUX_IPV6_HOPOPTS = 54
-LINUX_IPV6_MULTICAST_HOPS = 18
-LINUX_IPV6_MULTICAST_IF = 17
-LINUX_IPV6_MULTICAST_LOOP = 19
-LINUX_IPV6_NEXTHOP = 9
-LINUX_IPV6_PATHMTU = 61
-LINUX_IPV6_PKTINFO = 50
-LINUX_IPV6_RECVDSTOPTS = 58
-LINUX_IPV6_RECVHOPLIMIT = 51
-LINUX_IPV6_RECVHOPOPTS = 53
-LINUX_IPV6_RECVPATHMTU = 60
-LINUX_IPV6_RECVPKTINFO = 49
-LINUX_IPV6_RECVRTHDR = 56
-LINUX_IPV6_RTHDR = 57
-LINUX_IPV6_RTHDRDSTOPTS = 55
-LINUX_IPV6_UNICAST_HOPS = 16
-LINUX_IPV6_V6ONLY = 26
 MCAST_BLOCK_SOURCE = 84
 MCAST_JOIN_GROUP = 80
 MCAST_JOIN_SOURCE_GROUP = 82
diff --git a/sys/freebsd/socket_unix_amd64.const b/sys/freebsd/socket_unix_amd64.const
index 032c6e7..e2b7f38 100644
--- a/sys/freebsd/socket_unix_amd64.const
+++ b/sys/freebsd/socket_unix_amd64.const
@@ -1,14 +1,7 @@
 # AUTOGENERATED FILE
 AF_UNIX = 1
 AF_UNSPEC = 0
-LINUX_AF_UNIX = 1
-LINUX_AF_UNSPEC = 0
 LINUX_SCM_CREDENTIALS = 2
-LINUX_SCM_RIGHTS = 1
-LINUX_SOCK_DGRAM = 2
-LINUX_SOCK_SEQPACKET = 5
-LINUX_SOCK_STREAM = 1
-LINUX_SOL_SOCKET = 1
 SCM_RIGHTS = 1
 SOCK_DGRAM = 2
 SOCK_SEQPACKET = 5