]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/pprof: update vendored github.com/google/pprof
authorDmitri Shuralyov <dmitshur@golang.org>
Thu, 4 Nov 2021 12:46:07 +0000 (08:46 -0400)
committerDmitri Shuralyov <dmitshur@golang.org>
Thu, 4 Nov 2021 16:59:45 +0000 (16:59 +0000)
Pull in the latest published version of github.com/google/pprof
as part of #36905.

This adds the fmt.Println redundant newline fix from
google/pprof@f987b9c94b318d4bd026dcc7892f7f1fab6eadab.

Done with:

go get -d github.com/google/pprof@latest
go mod tidy
go mod vendor

For #36905.
Fixes #49322.

Change-Id: Ia832766bba65a30c68407b73b33fefbe81438e65
Reviewed-on: https://go-review.googlesource.com/c/go/+/361294
Trust: Dmitri Shuralyov <dmitshur@golang.org>
Trust: Zvonimir Pavlinovic <zpavlinovic@google.com>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Zvonimir Pavlinovic <zpavlinovic@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Zvonimir Pavlinovic <zpavlinovic@google.com>
76 files changed:
src/cmd/go.mod
src/cmd/go.sum
src/cmd/vendor/github.com/google/pprof/internal/elfexec/elfexec.go
src/cmd/vendor/github.com/google/pprof/internal/report/source_html.go
src/cmd/vendor/github.com/ianlancetaylor/demangle/README.md
src/cmd/vendor/github.com/ianlancetaylor/demangle/ast.go
src/cmd/vendor/github.com/ianlancetaylor/demangle/demangle.go
src/cmd/vendor/github.com/ianlancetaylor/demangle/rust.go [new file with mode: 0644]
src/cmd/vendor/golang.org/x/sys/unix/mkerrors.sh
src/cmd/vendor/golang.org/x/sys/unix/syscall_darwin.go
src/cmd/vendor/golang.org/x/sys/unix/syscall_illumos.go
src/cmd/vendor/golang.org/x/sys/unix/syscall_linux.go
src/cmd/vendor/golang.org/x/sys/unix/syscall_linux_386.go
src/cmd/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go
src/cmd/vendor/golang.org/x/sys/unix/syscall_linux_arm.go
src/cmd/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go
src/cmd/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go
src/cmd/vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go
src/cmd/vendor/golang.org/x/sys/unix/syscall_linux_ppc.go
src/cmd/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go
src/cmd/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go
src/cmd/vendor/golang.org/x/sys/unix/syscall_linux_s390x.go
src/cmd/vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go
src/cmd/vendor/golang.org/x/sys/unix/sysvshm_linux.go [new file with mode: 0644]
src/cmd/vendor/golang.org/x/sys/unix/sysvshm_unix.go [new file with mode: 0644]
src/cmd/vendor/golang.org/x/sys/unix/sysvshm_unix_other.go [new file with mode: 0644]
src/cmd/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go
src/cmd/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go
src/cmd/vendor/golang.org/x/sys/unix/zerrors_linux.go
src/cmd/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go
src/cmd/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s
src/cmd/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go
src/cmd/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s
src/cmd/vendor/golang.org/x/sys/unix/zsyscall_linux.go
src/cmd/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go
src/cmd/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go
src/cmd/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go
src/cmd/vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go
src/cmd/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go
src/cmd/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go
src/cmd/vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go
src/cmd/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc.go
src/cmd/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go
src/cmd/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go
src/cmd/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go
src/cmd/vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go
src/cmd/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go
src/cmd/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go
src/cmd/vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go
src/cmd/vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go
src/cmd/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go
src/cmd/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm64.go
src/cmd/vendor/golang.org/x/sys/unix/ztypes_illumos_amd64.go
src/cmd/vendor/golang.org/x/sys/unix/ztypes_linux.go
src/cmd/vendor/golang.org/x/sys/unix/ztypes_linux_386.go
src/cmd/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go
src/cmd/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go
src/cmd/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go
src/cmd/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go
src/cmd/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go
src/cmd/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go
src/cmd/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go
src/cmd/vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go
src/cmd/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go
src/cmd/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go
src/cmd/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go
src/cmd/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go
src/cmd/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go
src/cmd/vendor/golang.org/x/sys/windows/memory_windows.go
src/cmd/vendor/golang.org/x/sys/windows/syscall_windows.go
src/cmd/vendor/golang.org/x/sys/windows/types_windows.go
src/cmd/vendor/golang.org/x/sys/windows/zsyscall_windows.go
src/cmd/vendor/modules.txt
src/go.mod
src/go.sum
src/vendor/modules.txt

index e6fdc902dd2ea4eee7f4a501084bf6719b670a32..f7802a167566dfcd3d31895608f35b577ad54c50 100644 (file)
@@ -3,7 +3,7 @@ module cmd
 go 1.18
 
 require (
-       github.com/google/pprof v0.0.0-20211001005136-7fe48b4c820b
+       github.com/google/pprof v0.0.0-20211104044539-f987b9c94b31
        golang.org/x/arch v0.0.0-20210901143047-ebb09ed340f1
        golang.org/x/mod v0.5.1-0.20210913215816-37dd6891021a
        golang.org/x/sync v0.0.0-20210220032951-036812b2e83c
@@ -12,8 +12,8 @@ require (
 )
 
 require (
-       github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639 // indirect
+       github.com/ianlancetaylor/demangle v0.0.0-20210905161508-09a460cdf81d // indirect
        golang.org/x/crypto v0.0.0-20210817164053-32db794688a5 // indirect
-       golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e // indirect
+       golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac // indirect
        golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
 )
index 4993128d1a1be12d9d6f80b9084efc3db0faadce..25c25d81bdff950e1d7433e34b8bfd426de6d87c 100644 (file)
@@ -1,10 +1,10 @@
 github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
 github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
 github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
-github.com/google/pprof v0.0.0-20211001005136-7fe48b4c820b h1:GX4+fGLMW5XTmDXB3R6UhTwZIYqgAOdA19+Ea0+3CU4=
-github.com/google/pprof v0.0.0-20211001005136-7fe48b4c820b/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
-github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639 h1:mV02weKRL81bEnm8A0HT1/CAelMQDBuQIfLw8n+d6xI=
-github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
+github.com/google/pprof v0.0.0-20211104044539-f987b9c94b31 h1:YvpxjnjGhf/vDEeYOysNbsrtB///PKS8lqkFNSDm1p8=
+github.com/google/pprof v0.0.0-20211104044539-f987b9c94b31/go.mod h1:KgnwoLYCZ8IQu3XUZ8Nc/bM9CCZFOyjUNOSygVozoDg=
+github.com/ianlancetaylor/demangle v0.0.0-20210905161508-09a460cdf81d h1:uGg2frlt3IcT7kbV6LEp5ONv4vmoO2FW4qSO+my/aoM=
+github.com/ianlancetaylor/demangle v0.0.0-20210905161508-09a460cdf81d/go.mod h1:aYm2/VgdVmcIU8iMfdMvDMsRAQjcfZSKFby6HOFvi/w=
 golang.org/x/arch v0.0.0-20210901143047-ebb09ed340f1 h1:MwxAfiDvuwX8Nnnc6iRDhzyMyyc2tz5tYyCP/pZcPCg=
 golang.org/x/arch v0.0.0-20210901143047-ebb09ed340f1/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8=
 golang.org/x/crypto v0.0.0-20210817164053-32db794688a5 h1:HWj/xjIHfjYU5nVXpTM0s39J9CbLn7Cc5a7IC5rwsMQ=
@@ -13,9 +13,8 @@ golang.org/x/mod v0.5.1-0.20210913215816-37dd6891021a h1:55PVa91KndtPGH2lus5l2gD
 golang.org/x/mod v0.5.1-0.20210913215816-37dd6891021a/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro=
 golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ=
 golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e h1:XMgFehsDnnLGtjvjOfqWSUzt0alpTR1RSEuznObga2c=
-golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac h1:oN6lz7iLW/YC7un8pq+9bOLyXrprv2+DKfkJY+2LJJw=
+golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b h1:9zKuko04nR4gjZ4+DNjHqRlAJqbJETHwiNKDqTfOjfE=
 golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
 golang.org/x/tools v0.1.8-0.20211025211149-f916b54a1784 h1:+xP+QoP2SEPgbn+07I/yJTzP+gavj0XKGS6+JU5tlck=
index 4f1164518589bbd96b6bb62f35dfc64b66be9049..6447092d3d9978baeea75405fc441c0546d5c87e 100644 (file)
@@ -165,19 +165,61 @@ func GetBuildID(binary io.ReaderAt) ([]byte, error) {
        return nil, nil
 }
 
-// GetBase determines the base address to subtract from virtual
-// address to get symbol table address. For an executable, the base
-// is 0. Otherwise, it's a shared library, and the base is the
-// address where the mapping starts. The kernel is special, and may
-// use the address of the _stext symbol as the mmap start. _stext
-// offset can be obtained with `nm vmlinux | grep _stext`
-func GetBase(fh *elf.FileHeader, loadSegment *elf.ProgHeader, stextOffset *uint64, start, limit, offset uint64) (uint64, error) {
+// kernelBase caluclates the base for kernel mappings, which usually require
+// special handling. For kernel mappings, tools (like perf) use the address of
+// the kernel relocation symbol (_text or _stext) as the mmap start. Additionaly,
+// for obfuscation, ChromeOS profiles have the kernel image remapped to the 0-th page.
+func kernelBase(loadSegment *elf.ProgHeader, stextOffset *uint64, start, limit, offset uint64) (uint64, bool) {
        const (
-               pageSize = 4096
                // PAGE_OFFSET for PowerPC64, see arch/powerpc/Kconfig in the kernel sources.
                pageOffsetPpc64 = 0xc000000000000000
+               pageSize        = 4096
        )
 
+       if loadSegment.Vaddr == start-offset {
+               return offset, true
+       }
+       if start == 0 && limit != 0 && stextOffset != nil {
+               // ChromeOS remaps its kernel to 0. Nothing else should come
+               // down this path. Empirical values:
+               //       VADDR=0xffffffff80200000
+               // stextOffset=0xffffffff80200198
+               return start - *stextOffset, true
+       }
+       if start >= loadSegment.Vaddr && limit > start && (offset == 0 || offset == pageOffsetPpc64 || offset == start) {
+               // Some kernels look like:
+               //       VADDR=0xffffffff80200000
+               // stextOffset=0xffffffff80200198
+               //       Start=0xffffffff83200000
+               //       Limit=0xffffffff84200000
+               //      Offset=0 (0xc000000000000000 for PowerPC64) (== Start for ASLR kernel)
+               // So the base should be:
+               if stextOffset != nil && (start%pageSize) == (*stextOffset%pageSize) {
+                       // perf uses the address of _stext as start. Some tools may
+                       // adjust for this before calling GetBase, in which case the page
+                       // alignment should be different from that of stextOffset.
+                       return start - *stextOffset, true
+               }
+
+               return start - loadSegment.Vaddr, true
+       }
+       if start%pageSize != 0 && stextOffset != nil && *stextOffset%pageSize == start%pageSize {
+               // ChromeOS remaps its kernel to 0 + start%pageSize. Nothing
+               // else should come down this path. Empirical values:
+               //       start=0x198 limit=0x2f9fffff offset=0
+               //       VADDR=0xffffffff81000000
+               // stextOffset=0xffffffff81000198
+               return start - *stextOffset, true
+       }
+       return 0, false
+}
+
+// GetBase determines the base address to subtract from virtual
+// address to get symbol table address. For an executable, the base
+// is 0. Otherwise, it's a shared library, and the base is the
+// address where the mapping starts. The kernel needs special hanldling.
+func GetBase(fh *elf.FileHeader, loadSegment *elf.ProgHeader, stextOffset *uint64, start, limit, offset uint64) (uint64, error) {
+
        if start == 0 && offset == 0 && (limit == ^uint64(0) || limit == 0) {
                // Some tools may introduce a fake mapping that spans the entire
                // address space. Assume that the address has already been
@@ -202,43 +244,15 @@ func GetBase(fh *elf.FileHeader, loadSegment *elf.ProgHeader, stextOffset *uint6
                        // the 64-bit address space.
                        return start - offset + loadSegment.Off - loadSegment.Vaddr, nil
                }
-               // Various kernel heuristics and cases follow.
-               if loadSegment.Vaddr == start-offset {
-                       return offset, nil
+               // Various kernel heuristics and cases are handled separately.
+               if base, match := kernelBase(loadSegment, stextOffset, start, limit, offset); match {
+                       return base, nil
                }
-               if start == 0 && limit != 0 {
-                       // ChromeOS remaps its kernel to 0. Nothing else should come
-                       // down this path. Empirical values:
-                       //       VADDR=0xffffffff80200000
-                       // stextOffset=0xffffffff80200198
-                       if stextOffset != nil {
-                               return -*stextOffset, nil
-                       }
-                       return -loadSegment.Vaddr, nil
-               }
-               if start >= loadSegment.Vaddr && limit > start && (offset == 0 || offset == pageOffsetPpc64 || offset == start) {
-                       // Some kernels look like:
-                       //       VADDR=0xffffffff80200000
-                       // stextOffset=0xffffffff80200198
-                       //       Start=0xffffffff83200000
-                       //       Limit=0xffffffff84200000
-                       //      Offset=0 (0xc000000000000000 for PowerPC64) (== Start for ASLR kernel)
-                       // So the base should be:
-                       if stextOffset != nil && (start%pageSize) == (*stextOffset%pageSize) {
-                               // perf uses the address of _stext as start. Some tools may
-                               // adjust for this before calling GetBase, in which case the page
-                               // alignment should be different from that of stextOffset.
-                               return start - *stextOffset, nil
-                       }
-
+               // ChromeOS can remap its kernel to 0, and the caller might have not found
+               // the _stext symbol. Split this case from kernelBase() above, since we don't
+               // want to apply it to an ET_DYN user-mode executable.
+               if start == 0 && limit != 0 && stextOffset == nil {
                        return start - loadSegment.Vaddr, nil
-               } else if start%pageSize != 0 && stextOffset != nil && *stextOffset%pageSize == start%pageSize {
-                       // ChromeOS remaps its kernel to 0 + start%pageSize. Nothing
-                       // else should come down this path. Empirical values:
-                       //       start=0x198 limit=0x2f9fffff offset=0
-                       //       VADDR=0xffffffff81000000
-                       // stextOffset=0xffffffff81000198
-                       return start - *stextOffset, nil
                }
 
                return 0, fmt.Errorf("don't know how to handle EXEC segment: %v start=0x%x limit=0x%x offset=0x%x", *loadSegment, start, limit, offset)
@@ -255,6 +269,11 @@ func GetBase(fh *elf.FileHeader, loadSegment *elf.ProgHeader, stextOffset *uint6
                if loadSegment == nil {
                        return start - offset, nil
                }
+               // Kernels compiled as PIE can be ET_DYN as well. Use heuristic, similar to
+               // the ET_EXEC case above.
+               if base, match := kernelBase(loadSegment, stextOffset, start, limit, offset); match {
+                       return base, nil
+               }
                // The program header, if not nil, indicates the offset in the file where
                // the executable segment is located (loadSegment.Off), and the base virtual
                // address where the first byte of the segment is loaded
index 17c9f6eb947c512a0a8f253cfa00f4b1eed94512..851693f1d0e6d717357d4c567b7108d7069f8ec0 100644 (file)
@@ -72,5 +72,4 @@ function pprof_toggle_asm(e) {
 
 const weblistPageClosing = `
 </body>
-</html>
-`
+</html>`
index ef3f94a63d7dd6cda1bea346c255a4d86380243a..2c01cae088fef3e867c2a8c37d19d60f8b277257 100644 (file)
@@ -1,3 +1,3 @@
 # github.com/ianlancetaylor/demangle
 
-A Go package that can be used to demangle C++ symbol names.
+A Go package that can be used to demangle C++ and Rust symbol names.
index ccbe5b355988b2786d30d4b2ff3b8930a6345dbf..7b9178f1bb09e0b2ad985a40a4758585f716506a 100644 (file)
@@ -11,6 +11,7 @@ import (
 
 // AST is an abstract syntax tree representing a C++ declaration.
 // This is sufficient for the demangler but is by no means a general C++ AST.
+// This abstract syntax tree is only used for C++ symbols, not Rust symbols.
 type AST interface {
        // Internal method to convert to demangled string.
        print(*printState)
@@ -37,21 +38,25 @@ type AST interface {
 // ASTToString returns the demangled name of the AST.
 func ASTToString(a AST, options ...Option) string {
        tparams := true
+       llvmStyle := false
        for _, o := range options {
                switch o {
                case NoTemplateParams:
                        tparams = false
+               case LLVMStyle:
+                       llvmStyle = true
                }
        }
 
-       ps := printState{tparams: tparams}
+       ps := printState{tparams: tparams, llvmStyle: llvmStyle}
        a.print(&ps)
        return ps.buf.String()
 }
 
 // The printState type holds information needed to print an AST.
 type printState struct {
-       tparams bool // whether to print template parameters
+       tparams   bool // whether to print template parameters
+       llvmStyle bool
 
        buf  strings.Builder
        last byte // Last byte written to buffer.
@@ -408,7 +413,11 @@ type LambdaAuto struct {
 func (la *LambdaAuto) print(ps *printState) {
        // We print the index plus 1 because that is what the standard
        // demangler does.
-       fmt.Fprintf(&ps.buf, "auto:%d", la.Index+1)
+       if ps.llvmStyle {
+               ps.writeString("auto")
+       } else {
+               fmt.Fprintf(&ps.buf, "auto:%d", la.Index+1)
+       }
 }
 
 func (la *LambdaAuto) Traverse(fn func(AST) bool) {
@@ -504,6 +513,9 @@ func (q *Qualifier) print(ps *printState) {
                ps.writeByte('(')
                first := true
                for _, e := range q.Exprs {
+                       if el, ok := e.(*ExprList); ok && len(el.Exprs) == 0 {
+                               continue
+                       }
                        if !first {
                                ps.writeString(", ")
                        }
@@ -715,7 +727,11 @@ type BuiltinType struct {
 }
 
 func (bt *BuiltinType) print(ps *printState) {
-       ps.writeString(bt.Name)
+       name := bt.Name
+       if ps.llvmStyle && name == "decltype(nullptr)" {
+               name = "std::nullptr_t"
+       }
+       ps.writeString(name)
 }
 
 func (bt *BuiltinType) Traverse(fn func(AST) bool) {
@@ -970,10 +986,15 @@ type VendorQualifier struct {
 }
 
 func (vq *VendorQualifier) print(ps *printState) {
-       ps.inner = append(ps.inner, vq)
-       ps.print(vq.Type)
-       if len(ps.inner) > 0 {
-               ps.printOneInner(nil)
+       if ps.llvmStyle {
+               ps.print(vq.Type)
+               vq.printInner(ps)
+       } else {
+               ps.inner = append(ps.inner, vq)
+               ps.print(vq.Type)
+               if len(ps.inner) > 0 {
+                       ps.printOneInner(nil)
+               }
        }
 }
 
@@ -1110,19 +1131,27 @@ func (at *ArrayType) goString(indent int, field string) string {
                at.Element.goString(indent+2, "Element: "))
 }
 
-// FunctionType is a function type.  The Return field may be nil for
-// cases where the return type is not part of the mangled name.
+// FunctionType is a function type.
 type FunctionType struct {
        Return AST
        Args   []AST
+
+       // The forLocalName field reports whether this FunctionType
+       // was created for a local name. With the default GNU demangling
+       // output we don't print the return type in that case.
+       ForLocalName bool
 }
 
 func (ft *FunctionType) print(ps *printState) {
-       if ft.Return != nil {
+       retType := ft.Return
+       if ft.ForLocalName && !ps.llvmStyle {
+               retType = nil
+       }
+       if retType != nil {
                // Pass the return type as an inner type in order to
                // print the arguments in the right location.
                ps.inner = append(ps.inner, ft)
-               ps.print(ft.Return)
+               ps.print(retType)
                if len(ps.inner) == 0 {
                        // Everything was printed.
                        return
@@ -1227,7 +1256,11 @@ func (ft *FunctionType) Copy(fn func(AST) AST, skip func(AST) bool) AST {
        if !changed {
                return fn(ft)
        }
-       ft = &FunctionType{Return: ret, Args: args}
+       ft = &FunctionType{
+               Return:       ret,
+               Args:         args,
+               ForLocalName: ft.ForLocalName,
+       }
        if r := fn(ft); r != nil {
                return r
        }
@@ -1239,6 +1272,10 @@ func (ft *FunctionType) GoString() string {
 }
 
 func (ft *FunctionType) goString(indent int, field string) string {
+       var forLocalName string
+       if ft.ForLocalName {
+               forLocalName = " ForLocalName: true"
+       }
        var r string
        if ft.Return == nil {
                r = fmt.Sprintf("%*sReturn: nil", indent+2, "")
@@ -1255,7 +1292,8 @@ func (ft *FunctionType) goString(indent int, field string) string {
                        args += a.goString(indent+4, fmt.Sprintf("%d: ", i))
                }
        }
-       return fmt.Sprintf("%*s%sFunctionType:\n%s\n%s", indent, "", field, r, args)
+       return fmt.Sprintf("%*s%sFunctionType:%s\n%s\n%s", indent, "", field,
+               forLocalName, r, args)
 }
 
 // FunctionParam is a parameter of a function, used for last-specified
@@ -1267,6 +1305,12 @@ type FunctionParam struct {
 func (fp *FunctionParam) print(ps *printState) {
        if fp.Index == 0 {
                ps.writeString("this")
+       } else if ps.llvmStyle {
+               if fp.Index == 1 {
+                       ps.writeString("fp")
+               } else {
+                       fmt.Fprintf(&ps.buf, "fp%d", fp.Index-2)
+               }
        } else {
                fmt.Fprintf(&ps.buf, "{parm#%d}", fp.Index)
        }
@@ -1422,9 +1466,15 @@ func (vt *VectorType) print(ps *printState) {
 }
 
 func (vt *VectorType) printInner(ps *printState) {
-       ps.writeString(" __vector(")
+       end := byte(')')
+       if ps.llvmStyle {
+               ps.writeString(" vector[")
+               end = ']'
+       } else {
+               ps.writeString(" __vector(")
+       }
        ps.print(vt.Dimension)
-       ps.writeByte(')')
+       ps.writeByte(end)
 }
 
 func (vt *VectorType) Traverse(fn func(AST) bool) {
@@ -1466,13 +1516,59 @@ func (vt *VectorType) goString(indent int, field string) string {
                vt.Base.goString(indent+2, "Base: "))
 }
 
+// ElaboratedType is an elaborated struct/union/enum type.
+type ElaboratedType struct {
+       Kind string
+       Type AST
+}
+
+func (et *ElaboratedType) print(ps *printState) {
+       ps.writeString(et.Kind)
+       ps.writeString(" ")
+       et.Type.print(ps)
+}
+
+func (et *ElaboratedType) Traverse(fn func(AST) bool) {
+       if fn(et) {
+               et.Type.Traverse(fn)
+       }
+}
+
+func (et *ElaboratedType) Copy(fn func(AST) AST, skip func(AST) bool) AST {
+       if skip(et) {
+               return nil
+       }
+       typ := et.Type.Copy(fn, skip)
+       if typ == nil {
+               return fn(et)
+       }
+       et = &ElaboratedType{Kind: et.Kind, Type: typ}
+       if r := fn(et); r != nil {
+               return r
+       }
+       return et
+}
+
+func (et *ElaboratedType) GoString() string {
+       return et.goString(0, "")
+}
+
+func (et *ElaboratedType) goString(indent int, field string) string {
+       return fmt.Sprintf("%*s%sElaboratedtype: Kind: %s\n%s", indent, "", field,
+               et.Kind, et.Type.goString(indent+2, "Expr: "))
+}
+
 // Decltype is the decltype operator.
 type Decltype struct {
        Expr AST
 }
 
 func (dt *Decltype) print(ps *printState) {
-       ps.writeString("decltype (")
+       ps.writeString("decltype")
+       if !ps.llvmStyle {
+               ps.writeString(" ")
+       }
+       ps.writeString("(")
        ps.print(dt.Expr)
        ps.writeByte(')')
 }
@@ -1544,15 +1640,20 @@ func (op *Operator) goString(indent int, field string) string {
 // Constructor is a constructor.
 type Constructor struct {
        Name AST
+       Base AST // base class of inheriting constructor
 }
 
 func (c *Constructor) print(ps *printState) {
        ps.print(c.Name)
+       // We don't include the base class in the demangled string.
 }
 
 func (c *Constructor) Traverse(fn func(AST) bool) {
        if fn(c) {
                c.Name.Traverse(fn)
+               if c.Base != nil {
+                       c.Base.Traverse(fn)
+               }
        }
 }
 
@@ -1561,10 +1662,20 @@ func (c *Constructor) Copy(fn func(AST) AST, skip func(AST) bool) AST {
                return nil
        }
        name := c.Name.Copy(fn, skip)
-       if name == nil {
+       var base AST
+       if c.Base != nil {
+               base = c.Base.Copy(fn, skip)
+       }
+       if name == nil && base == nil {
                return fn(c)
        }
-       c = &Constructor{Name: name}
+       if name == nil {
+               name = c.Name
+       }
+       if base == nil {
+               base = c.Base
+       }
+       c = &Constructor{Name: name, Base: base}
        if r := fn(c); r != nil {
                return r
        }
@@ -1576,7 +1687,13 @@ func (c *Constructor) GoString() string {
 }
 
 func (c *Constructor) goString(indent int, field string) string {
-       return fmt.Sprintf("%*s%sConstructor:\n%s", indent, "", field, c.Name.goString(indent+2, "Name: "))
+       var sb strings.Builder
+       fmt.Fprintf(&sb, "%*s%sConstructor:\n", indent, "", field)
+       if c.Base != nil {
+               fmt.Fprintf(&sb, "%s\n", c.Base.goString(indent+2, "Base: "))
+       }
+       fmt.Fprintf(&sb, "%s", c.Name.goString(indent+2, "Name: "))
+       return sb.String()
 }
 
 // Destructor is a destructor.
@@ -1727,8 +1844,12 @@ func (pe *PackExpansion) print(ps *printState) {
        // We normally only get here if the simplify function was
        // unable to locate and expand the pack.
        if pe.Pack == nil {
-               parenthesize(ps, pe.Base)
-               ps.writeString("...")
+               if ps.llvmStyle {
+                       ps.print(pe.Base)
+               } else {
+                       parenthesize(ps, pe.Base)
+                       ps.writeString("...")
+               }
        } else {
                ps.print(pe.Base)
        }
@@ -1834,7 +1955,13 @@ type SizeofPack struct {
 }
 
 func (sp *SizeofPack) print(ps *printState) {
-       ps.writeString(fmt.Sprintf("%d", len(sp.Pack.Args)))
+       if ps.llvmStyle {
+               ps.writeString("sizeof...(")
+               ps.print(sp.Pack)
+               ps.writeByte(')')
+       } else {
+               ps.writeString(fmt.Sprintf("%d", len(sp.Pack.Args)))
+       }
 }
 
 func (sp *SizeofPack) Traverse(fn func(AST) bool) {
@@ -1932,6 +2059,287 @@ func (sa *SizeofArgs) goString(indent int, field string) string {
        return fmt.Sprintf("%*s%sSizeofArgs:\n%s", indent, "", field, args)
 }
 
+// TemplateParamName is the name of a template parameter that the
+// demangler introduced for a lambda that has explicit template
+// parameters.  This is a prefix with an index.
+type TemplateParamName struct {
+       Prefix string
+       Index  int
+}
+
+func (tpn *TemplateParamName) print(ps *printState) {
+       ps.writeString(tpn.Prefix)
+       if tpn.Index > 0 {
+               ps.writeString(fmt.Sprintf("%d", tpn.Index-1))
+       }
+}
+
+func (tpn *TemplateParamName) Traverse(fn func(AST) bool) {
+       fn(tpn)
+}
+
+func (tpn *TemplateParamName) Copy(fn func(AST) AST, skip func(AST) bool) AST {
+       if skip(tpn) {
+               return nil
+       }
+       return fn(tpn)
+}
+
+func (tpn *TemplateParamName) GoString() string {
+       return tpn.goString(0, "")
+}
+
+func (tpn *TemplateParamName) goString(indent int, field string) string {
+       name := tpn.Prefix
+       if tpn.Index > 0 {
+               name += fmt.Sprintf("%d", tpn.Index-1)
+       }
+       return fmt.Sprintf("%*s%sTemplateParamName: %s", indent, "", field, name)
+}
+
+// TypeTemplateParam is a type template parameter that appears in a
+// lambda with explicit template parameters.
+type TypeTemplateParam struct {
+       Name AST
+}
+
+func (ttp *TypeTemplateParam) print(ps *printState) {
+       ps.writeString("typename ")
+       ps.printInner(false)
+       ps.print(ttp.Name)
+}
+
+func (ttp *TypeTemplateParam) Traverse(fn func(AST) bool) {
+       if fn(ttp) {
+               ttp.Name.Traverse(fn)
+       }
+}
+
+func (ttp *TypeTemplateParam) Copy(fn func(AST) AST, skip func(AST) bool) AST {
+       if skip(ttp) {
+               return nil
+       }
+       name := ttp.Name.Copy(fn, skip)
+       if name == nil {
+               return fn(ttp)
+       }
+       ttp = &TypeTemplateParam{Name: name}
+       if r := fn(ttp); r != nil {
+               return r
+       }
+       return ttp
+}
+
+func (ttp *TypeTemplateParam) GoString() string {
+       return ttp.goString(0, "")
+}
+
+func (ttp *TypeTemplateParam) goString(indent int, field string) string {
+       return fmt.Sprintf("%*s%sTypeTemplateParam:\n%s", indent, "", field,
+               ttp.Name.goString(indent+2, "Name"))
+}
+
+// NonTypeTemplateParam is a non-type template parameter that appears
+// in a lambda with explicit template parameters.
+type NonTypeTemplateParam struct {
+       Name AST
+       Type AST
+}
+
+func (nttp *NonTypeTemplateParam) print(ps *printState) {
+       ps.inner = append(ps.inner, nttp)
+       ps.print(nttp.Type)
+       if len(ps.inner) > 0 {
+               ps.writeByte(' ')
+               ps.print(nttp.Name)
+               ps.inner = ps.inner[:len(ps.inner)-1]
+       }
+}
+
+func (nttp *NonTypeTemplateParam) printInner(ps *printState) {
+       ps.print(nttp.Name)
+}
+
+func (nttp *NonTypeTemplateParam) Traverse(fn func(AST) bool) {
+       if fn(nttp) {
+               nttp.Name.Traverse(fn)
+               nttp.Type.Traverse(fn)
+       }
+}
+
+func (nttp *NonTypeTemplateParam) Copy(fn func(AST) AST, skip func(AST) bool) AST {
+       if skip(nttp) {
+               return nil
+       }
+       name := nttp.Name.Copy(fn, skip)
+       typ := nttp.Type.Copy(fn, skip)
+       if name == nil && typ == nil {
+               return fn(nttp)
+       }
+       if name == nil {
+               name = nttp.Name
+       }
+       if typ == nil {
+               typ = nttp.Type
+       }
+       nttp = &NonTypeTemplateParam{Name: name, Type: typ}
+       if r := fn(nttp); r != nil {
+               return r
+       }
+       return nttp
+}
+
+func (nttp *NonTypeTemplateParam) GoString() string {
+       return nttp.goString(0, "")
+}
+
+func (nttp *NonTypeTemplateParam) goString(indent int, field string) string {
+       return fmt.Sprintf("%*s%sNonTypeTemplateParam:\n%s\n%s", indent, "", field,
+               nttp.Name.goString(indent+2, "Name: "),
+               nttp.Type.goString(indent+2, "Type: "))
+}
+
+// TemplateTemplateParam is a template template parameter that appears
+// in a lambda with explicit template parameters.
+type TemplateTemplateParam struct {
+       Name   AST
+       Params []AST
+}
+
+func (ttp *TemplateTemplateParam) print(ps *printState) {
+       ps.writeString("template<")
+       for i, param := range ttp.Params {
+               if i > 0 {
+                       ps.writeString(", ")
+               }
+               ps.print(param)
+       }
+       ps.writeString("> typename ")
+       ps.print(ttp.Name)
+}
+
+func (ttp *TemplateTemplateParam) Traverse(fn func(AST) bool) {
+       if fn(ttp) {
+               ttp.Name.Traverse(fn)
+               for _, param := range ttp.Params {
+                       param.Traverse(fn)
+               }
+       }
+}
+
+func (ttp *TemplateTemplateParam) Copy(fn func(AST) AST, skip func(AST) bool) AST {
+       if skip(ttp) {
+               return nil
+       }
+
+       changed := false
+
+       name := ttp.Name.Copy(fn, skip)
+       if name == nil {
+               name = ttp.Name
+       } else {
+               changed = true
+       }
+
+       params := make([]AST, len(ttp.Params))
+       for i, p := range ttp.Params {
+               pc := p.Copy(fn, skip)
+               if pc == nil {
+                       params[i] = p
+               } else {
+                       params[i] = pc
+                       changed = true
+               }
+       }
+
+       if !changed {
+               return fn(ttp)
+       }
+
+       ttp = &TemplateTemplateParam{
+               Name:   name,
+               Params: params,
+       }
+       if r := fn(ttp); r != nil {
+               return r
+       }
+       return ttp
+}
+
+func (ttp *TemplateTemplateParam) GoString() string {
+       return ttp.goString(0, "")
+}
+
+func (ttp *TemplateTemplateParam) goString(indent int, field string) string {
+       var params strings.Builder
+       fmt.Fprintf(&params, "%*sParams:", indent+2, "")
+       for i, p := range ttp.Params {
+               params.WriteByte('\n')
+               params.WriteString(p.goString(indent+4, fmt.Sprintf("%d: ", i)))
+       }
+       return fmt.Sprintf("%*s%sTemplateTemplateParam:\n%s\n%s", indent, "", field,
+               ttp.Name.goString(indent+2, "Name: "),
+               params.String())
+}
+
+// TemplateParamPack is a template parameter pack that appears in a
+// lambda with explicit template parameters.
+type TemplateParamPack struct {
+       Param AST
+}
+
+func (tpp *TemplateParamPack) print(ps *printState) {
+       holdInner := ps.inner
+       defer func() { ps.inner = holdInner }()
+
+       ps.inner = []AST{tpp}
+       if nttp, ok := tpp.Param.(*NonTypeTemplateParam); ok {
+               ps.print(nttp.Type)
+       } else {
+               ps.print(tpp.Param)
+       }
+       if len(ps.inner) > 0 {
+               ps.writeString("...")
+       }
+}
+
+func (tpp *TemplateParamPack) printInner(ps *printState) {
+       ps.writeString("...")
+       if nttp, ok := tpp.Param.(*NonTypeTemplateParam); ok {
+               ps.print(nttp.Name)
+       }
+}
+
+func (tpp *TemplateParamPack) Traverse(fn func(AST) bool) {
+       if fn(tpp) {
+               tpp.Param.Traverse(fn)
+       }
+}
+
+func (tpp *TemplateParamPack) Copy(fn func(AST) AST, skip func(AST) bool) AST {
+       if skip(tpp) {
+               return nil
+       }
+       param := tpp.Param.Copy(fn, skip)
+       if param == nil {
+               return fn(tpp)
+       }
+       tpp = &TemplateParamPack{Param: param}
+       if r := fn(tpp); r != nil {
+               return r
+       }
+       return tpp
+}
+
+func (tpp *TemplateParamPack) GoString() string {
+       return tpp.goString(0, "")
+}
+
+func (tpp *TemplateParamPack) goString(indent int, field string) string {
+       return fmt.Sprintf("%*s%sTemplateParamPack:\n%s", indent, "", field,
+               tpp.Param.goString(indent+2, "Param: "))
+}
+
 // Cast is a type cast.
 type Cast struct {
        To AST
@@ -1977,7 +2385,11 @@ func (c *Cast) goString(indent int, field string) string {
 func parenthesize(ps *printState, val AST) {
        paren := false
        switch v := val.(type) {
-       case *Name, *InitializerList, *FunctionParam:
+       case *Name, *InitializerList:
+       case *FunctionParam:
+               if ps.llvmStyle {
+                       paren = true
+               }
        case *Qualified:
                if v.LocalName {
                        paren = true
@@ -2047,14 +2459,17 @@ type Unary struct {
 }
 
 func (u *Unary) print(ps *printState) {
+       op, _ := u.Op.(*Operator)
        expr := u.Expr
 
        // Don't print the argument list when taking the address of a
        // function.
-       if op, ok := u.Op.(*Operator); ok && op.Name == "&" {
-               if t, ok := expr.(*Typed); ok {
-                       if _, ok := t.Type.(*FunctionType); ok {
-                               expr = t.Name
+       if !ps.llvmStyle {
+               if op != nil && op.Name == "&" {
+                       if t, ok := expr.(*Typed); ok {
+                               if _, ok := t.Type.(*FunctionType); ok {
+                                       expr = t.Name
+                               }
                        }
                }
        }
@@ -2063,8 +2478,11 @@ func (u *Unary) print(ps *printState) {
                parenthesize(ps, expr)
        }
 
-       if op, ok := u.Op.(*Operator); ok {
+       if op != nil {
                ps.writeString(op.Name)
+               if ps.llvmStyle && op.Name == "noexcept" {
+                       ps.writeByte(' ')
+               }
        } else if c, ok := u.Op.(*Cast); ok {
                ps.writeByte('(')
                ps.print(c.To)
@@ -2074,7 +2492,7 @@ func (u *Unary) print(ps *printState) {
        }
 
        if !u.Suffix {
-               if op, ok := u.Op.(*Operator); ok && op.Name == "::" {
+               if op != nil && op.Name == "::" {
                        // Don't use parentheses after ::.
                        ps.print(expr)
                } else if u.SizeofType {
@@ -2082,6 +2500,19 @@ func (u *Unary) print(ps *printState) {
                        ps.writeByte('(')
                        ps.print(expr)
                        ps.writeByte(')')
+               } else if op != nil && op.Name == "__alignof__" {
+                       // Always use parentheses for __alignof__ argument.
+                       ps.writeByte('(')
+                       ps.print(expr)
+                       ps.writeByte(')')
+               } else if ps.llvmStyle {
+                       if op == nil || op.Name != `operator"" ` {
+                               ps.writeByte('(')
+                       }
+                       ps.print(expr)
+                       if op == nil || op.Name != `operator"" ` {
+                               ps.writeByte(')')
+                       }
                } else {
                        parenthesize(ps, expr)
                }
@@ -2140,7 +2571,16 @@ func isDesignatedInitializer(x AST) bool {
        switch x := x.(type) {
        case *Binary:
                if op, ok := x.Op.(*Operator); ok {
-                       return op.Name == "=" || op.Name == "]="
+                       if op.Name == "]=" {
+                               return true
+                       }
+                       if op.Name != "=" {
+                               return false
+                       }
+                       if _, ok := x.Left.(*Literal); ok {
+                               return false
+                       }
+                       return true
                }
        case *Trinary:
                if op, ok := x.Op.(*Operator); ok {
@@ -2185,8 +2625,13 @@ func (b *Binary) print(ps *printState) {
                        // initializer chains.
                        ps.print(b.Right)
                } else {
-                       ps.writeByte('=')
-                       parenthesize(ps, b.Right)
+                       if ps.llvmStyle {
+                               ps.writeString(" = ")
+                               ps.print(b.Right)
+                       } else {
+                               ps.writeByte('=')
+                               parenthesize(ps, b.Right)
+                       }
                }
                return
        }
@@ -2200,9 +2645,19 @@ func (b *Binary) print(ps *printState) {
 
        left := b.Left
 
+       skipParens := false
+       skipBothParens := false
+       addSpaces := ps.llvmStyle
+       if ps.llvmStyle && op != nil {
+               switch op.Name {
+               case ".", "->":
+                       skipBothParens = true
+                       addSpaces = false
+               }
+       }
+
        // For a function call in an expression, don't print the types
        // of the arguments unless there is a return type.
-       skipParens := false
        if op != nil && op.Name == "()" {
                if ty, ok := b.Left.(*Typed); ok {
                        if ft, ok := ty.Type.(*FunctionType); ok {
@@ -2215,10 +2670,17 @@ func (b *Binary) print(ps *printState) {
                                left = ty.Name
                        }
                }
+               if ps.llvmStyle {
+                       skipParens = true
+               }
        }
 
-       if skipParens {
+       if skipParens || skipBothParens {
                ps.print(left)
+       } else if ps.llvmStyle {
+               ps.writeByte('(')
+               ps.print(left)
+               ps.writeByte(')')
        } else {
                parenthesize(ps, left)
        }
@@ -2232,13 +2694,27 @@ func (b *Binary) print(ps *printState) {
 
        if op != nil {
                if op.Name != "()" {
+                       if addSpaces {
+                               ps.writeByte(' ')
+                       }
                        ps.writeString(op.Name)
+                       if addSpaces {
+                               ps.writeByte(' ')
+                       }
                }
        } else {
                ps.print(b.Op)
        }
 
-       parenthesize(ps, b.Right)
+       if skipBothParens {
+               ps.print(b.Right)
+       } else if ps.llvmStyle {
+               ps.writeByte('(')
+               ps.print(b.Right)
+               ps.writeByte(')')
+       } else {
+               parenthesize(ps, b.Right)
+       }
 
        if op != nil && op.Name == ">" {
                ps.writeByte(')')
@@ -2310,14 +2786,23 @@ func (t *Trinary) print(ps *printState) {
                        // initializer chains.
                        ps.print(t.Third)
                } else {
-                       ps.writeByte('=')
-                       parenthesize(ps, t.Third)
+                       if ps.llvmStyle {
+                               ps.writeString(" = ")
+                               ps.print(t.Third)
+                       } else {
+                               ps.writeByte('=')
+                               parenthesize(ps, t.Third)
+                       }
                }
                return
        }
 
        parenthesize(ps, t.First)
-       ps.writeByte('?')
+       if ps.llvmStyle {
+               ps.writeString(" ? ")
+       } else {
+               ps.writeByte('?')
+       }
        parenthesize(ps, t.Second)
        ps.writeString(" : ")
        parenthesize(ps, t.Third)
@@ -2386,31 +2871,44 @@ func (f *Fold) print(ps *printState) {
        op, _ := f.Op.(*Operator)
        printOp := func() {
                if op != nil {
+                       if ps.llvmStyle {
+                               ps.writeByte(' ')
+                       }
                        ps.writeString(op.Name)
+                       if ps.llvmStyle {
+                               ps.writeByte(' ')
+                       }
                } else {
                        ps.print(f.Op)
                }
        }
+       foldParenthesize := func(a AST) {
+               if _, ok := a.(*ArgumentPack); ok || !ps.llvmStyle {
+                       parenthesize(ps, a)
+               } else {
+                       ps.print(a)
+               }
+       }
 
        if f.Arg2 == nil {
                if f.Left {
                        ps.writeString("(...")
                        printOp()
-                       parenthesize(ps, f.Arg1)
+                       foldParenthesize(f.Arg1)
                        ps.writeString(")")
                } else {
                        ps.writeString("(")
-                       parenthesize(ps, f.Arg1)
+                       foldParenthesize(f.Arg1)
                        printOp()
                        ps.writeString("...)")
                }
        } else {
                ps.writeString("(")
-               parenthesize(ps, f.Arg1)
+               foldParenthesize(f.Arg1)
                printOp()
                ps.writeString("...")
                printOp()
-               parenthesize(ps, f.Arg2)
+               foldParenthesize(f.Arg2)
                ps.writeString(")")
        }
 }
@@ -2471,6 +2969,143 @@ func (f *Fold) goString(indent int, field string) string {
        }
 }
 
+// Subobject is a a reference to an offset in an expression.  This is
+// used for C++20 manglings of class types used as the type of
+// non-type template arguments.
+//
+// See https://github.com/itanium-cxx-abi/cxx-abi/issues/47.
+type Subobject struct {
+       Type      AST
+       SubExpr   AST
+       Offset    int
+       Selectors []int
+       PastEnd   bool
+}
+
+func (so *Subobject) print(ps *printState) {
+       ps.print(so.SubExpr)
+       ps.writeString(".<")
+       ps.print(so.Type)
+       ps.writeString(fmt.Sprintf(" at offset %d>", so.Offset))
+}
+
+func (so *Subobject) Traverse(fn func(AST) bool) {
+       if fn(so) {
+               so.Type.Traverse(fn)
+               so.SubExpr.Traverse(fn)
+       }
+}
+
+func (so *Subobject) Copy(fn func(AST) AST, skip func(AST) bool) AST {
+       if skip(so) {
+               return nil
+       }
+       typ := so.Type.Copy(fn, skip)
+       subExpr := so.SubExpr.Copy(fn, skip)
+       if typ == nil && subExpr == nil {
+               return nil
+       }
+       if typ == nil {
+               typ = so.Type
+       }
+       if subExpr == nil {
+               subExpr = so.SubExpr
+       }
+       so = &Subobject{
+               Type:      typ,
+               SubExpr:   subExpr,
+               Offset:    so.Offset,
+               Selectors: so.Selectors,
+               PastEnd:   so.PastEnd,
+       }
+       if r := fn(so); r != nil {
+               return r
+       }
+       return so
+}
+
+func (so *Subobject) GoString() string {
+       return so.goString(0, "")
+}
+
+func (so *Subobject) goString(indent int, field string) string {
+       var selectors string
+       for _, s := range so.Selectors {
+               selectors += fmt.Sprintf(" %d", s)
+       }
+       return fmt.Sprintf("%*s%sSubobject:\n%s\n%s\n%*sOffset: %d\n%*sSelectors:%s\n%*sPastEnd: %t",
+               indent, "", field,
+               so.Type.goString(indent+2, "Type: "),
+               so.SubExpr.goString(indent+2, "SubExpr: "),
+               indent+2, "", so.Offset,
+               indent+2, "", selectors,
+               indent+2, "", so.PastEnd)
+}
+
+// PtrMemCast is a conversion of an expression to a pointer-to-member
+// type.  This is used for C++20 manglings of class types used as the
+// type of non-type template arguments.
+//
+// See https://github.com/itanium-cxx-abi/cxx-abi/issues/47.
+type PtrMemCast struct {
+       Type   AST
+       Expr   AST
+       Offset int
+}
+
+func (pmc *PtrMemCast) print(ps *printState) {
+       ps.writeString("(")
+       ps.print(pmc.Type)
+       ps.writeString(")(")
+       ps.print(pmc.Expr)
+       ps.writeString(")")
+}
+
+func (pmc *PtrMemCast) Traverse(fn func(AST) bool) {
+       if fn(pmc) {
+               pmc.Type.Traverse(fn)
+               pmc.Expr.Traverse(fn)
+       }
+}
+
+func (pmc *PtrMemCast) Copy(fn func(AST) AST, skip func(AST) bool) AST {
+       if skip(pmc) {
+               return nil
+       }
+       typ := pmc.Type.Copy(fn, skip)
+       expr := pmc.Expr.Copy(fn, skip)
+       if typ == nil && expr == nil {
+               return nil
+       }
+       if typ == nil {
+               typ = pmc.Type
+       }
+       if expr == nil {
+               expr = pmc.Expr
+       }
+       pmc = &PtrMemCast{
+               Type:   typ,
+               Expr:   expr,
+               Offset: pmc.Offset,
+       }
+       if r := fn(pmc); r != nil {
+               return r
+       }
+       return pmc
+}
+
+func (pmc *PtrMemCast) GoString() string {
+       return pmc.goString(0, "")
+}
+
+func (pmc *PtrMemCast) goString(indent int, field string) string {
+       return fmt.Sprintf("%*s%sPtrMemCast:\n%s\n%s\n%*sOffset: %d",
+               indent, "", field,
+               pmc.Type.goString(indent+2, "Type: "),
+               pmc.Expr.goString(indent+2, "Expr: "),
+               indent+2, "", pmc.Offset)
+}
+
 // New is a use of operator new in an expression.
 type New struct {
        Op    AST
@@ -2609,7 +3244,11 @@ func (l *Literal) print(ps *printState) {
                                return
                        }
                } else if b.Name == "decltype(nullptr)" && l.Val == "" {
-                       ps.print(l.Type)
+                       if ps.llvmStyle {
+                               ps.writeString("nullptr")
+                       } else {
+                               ps.print(l.Type)
+                       }
                        return
                } else {
                        isFloat = builtinTypeFloat[b.Name]
@@ -2667,6 +3306,90 @@ func (l *Literal) goString(indent int, field string) string {
                indent+2, "", l.Val)
 }
 
+// StringLiteral is a string literal.
+type StringLiteral struct {
+       Type AST
+}
+
+func (sl *StringLiteral) print(ps *printState) {
+       ps.writeString(`"<`)
+       sl.Type.print(ps)
+       ps.writeString(`>"`)
+}
+
+func (sl *StringLiteral) Traverse(fn func(AST) bool) {
+       if fn(sl) {
+               sl.Type.Traverse(fn)
+       }
+}
+
+func (sl *StringLiteral) Copy(fn func(AST) AST, skip func(AST) bool) AST {
+       if skip(sl) {
+               return nil
+       }
+       typ := sl.Type.Copy(fn, skip)
+       if typ == nil {
+               return fn(sl)
+       }
+       sl = &StringLiteral{Type: typ}
+       if r := fn(sl); r != nil {
+               return r
+       }
+       return sl
+}
+
+func (sl *StringLiteral) GoString() string {
+       return sl.goString(0, "")
+}
+
+func (sl *StringLiteral) goString(indent int, field string) string {
+       return fmt.Sprintf("%*s%sStringLiteral:\n%s", indent, "", field,
+               sl.Type.goString(indent+2, ""))
+}
+
+// LambdaExpr is a literal that is a lambda expression.
+type LambdaExpr struct {
+       Type AST
+}
+
+func (le *LambdaExpr) print(ps *printState) {
+       ps.writeString("[]")
+       if cl, ok := le.Type.(*Closure); ok {
+               cl.printTypes(ps)
+       }
+       ps.writeString("{...}")
+}
+
+func (le *LambdaExpr) Traverse(fn func(AST) bool) {
+       if fn(le) {
+               le.Type.Traverse(fn)
+       }
+}
+
+func (le *LambdaExpr) Copy(fn func(AST) AST, skip func(AST) bool) AST {
+       if skip(le) {
+               return nil
+       }
+       typ := le.Type.Copy(fn, skip)
+       if typ == nil {
+               return fn(le)
+       }
+       le = &LambdaExpr{Type: typ}
+       if r := fn(le); r != nil {
+               return r
+       }
+       return le
+}
+
+func (le *LambdaExpr) GoString() string {
+       return le.goString(0, "")
+}
+
+func (le *LambdaExpr) goString(indent int, field string) string {
+       return fmt.Sprintf("%*s%sLambdaExpr:\n%s", indent, "", field,
+               le.Type.goString(indent+2, ""))
+}
+
 // ExprList is a list of expressions, typically arguments to a
 // function call in an expression.
 type ExprList struct {
@@ -2803,7 +3526,9 @@ type DefaultArg struct {
 }
 
 func (da *DefaultArg) print(ps *printState) {
-       fmt.Fprintf(&ps.buf, "{default arg#%d}::", da.Num+1)
+       if !ps.llvmStyle {
+               fmt.Fprintf(&ps.buf, "{default arg#%d}::", da.Num+1)
+       }
        ps.print(da.Arg)
 }
 
@@ -2839,23 +3564,53 @@ func (da *DefaultArg) goString(indent int, field string) string {
 
 // Closure is a closure, or lambda expression.
 type Closure struct {
-       Types []AST
-       Num   int
+       TemplateArgs []AST
+       Types        []AST
+       Num          int
 }
 
 func (cl *Closure) print(ps *printState) {
-       ps.writeString("{lambda(")
+       if ps.llvmStyle {
+               if cl.Num == 0 {
+                       ps.writeString("'lambda'")
+               } else {
+                       ps.writeString(fmt.Sprintf("'lambda%d'", cl.Num-1))
+               }
+       } else {
+               ps.writeString("{lambda")
+       }
+       cl.printTypes(ps)
+       if !ps.llvmStyle {
+               ps.writeString(fmt.Sprintf("#%d}", cl.Num+1))
+       }
+}
+
+func (cl *Closure) printTypes(ps *printState) {
+       if len(cl.TemplateArgs) > 0 {
+               ps.writeString("<")
+               for i, a := range cl.TemplateArgs {
+                       if i > 0 {
+                               ps.writeString(", ")
+                       }
+                       ps.print(a)
+               }
+               ps.writeString(">")
+       }
+       ps.writeString("(")
        for i, t := range cl.Types {
                if i > 0 {
                        ps.writeString(", ")
                }
                ps.print(t)
        }
-       ps.writeString(fmt.Sprintf(")#%d}", cl.Num+1))
+       ps.writeString(")")
 }
 
 func (cl *Closure) Traverse(fn func(AST) bool) {
        if fn(cl) {
+               for _, a := range cl.TemplateArgs {
+                       a.Traverse(fn)
+               }
                for _, t := range cl.Types {
                        t.Traverse(fn)
                }
@@ -2866,8 +3621,20 @@ func (cl *Closure) Copy(fn func(AST) AST, skip func(AST) bool) AST {
        if skip(cl) {
                return nil
        }
-       types := make([]AST, len(cl.Types))
        changed := false
+
+       args := make([]AST, len(cl.TemplateArgs))
+       for i, a := range cl.TemplateArgs {
+               ac := a.Copy(fn, skip)
+               if ac == nil {
+                       args[i] = a
+               } else {
+                       args[i] = ac
+                       changed = true
+               }
+       }
+
+       types := make([]AST, len(cl.Types))
        for i, t := range cl.Types {
                tc := t.Copy(fn, skip)
                if tc == nil {
@@ -2877,10 +3644,11 @@ func (cl *Closure) Copy(fn func(AST) AST, skip func(AST) bool) AST {
                        changed = true
                }
        }
+
        if !changed {
                return fn(cl)
        }
-       cl = &Closure{Types: types, Num: cl.Num}
+       cl = &Closure{TemplateArgs: args, Types: types, Num: cl.Num}
        if r := fn(cl); r != nil {
                return r
        }
@@ -2892,6 +3660,16 @@ func (cl *Closure) GoString() string {
 }
 
 func (cl *Closure) goString(indent int, field string) string {
+       var args string
+       if len(cl.TemplateArgs) == 0 {
+               args = fmt.Sprintf("%*sTemplateArgs: nil", indent+2, "")
+       } else {
+               args = fmt.Sprintf("%*sTemplateArgs:", indent+2, "")
+               for i, a := range cl.TemplateArgs {
+                       args += "\n"
+                       args += a.goString(indent+4, fmt.Sprintf("%d: ", i))
+               }
+       }
        var types string
        if len(cl.Types) == 0 {
                types = fmt.Sprintf("%*sTypes: nil", indent+2, "")
@@ -2902,7 +3680,71 @@ func (cl *Closure) goString(indent int, field string) string {
                        types += t.goString(indent+4, fmt.Sprintf("%d: ", i))
                }
        }
-       return fmt.Sprintf("%*s%sClosure: Num: %d\n%s", indent, "", field, cl.Num, types)
+       return fmt.Sprintf("%*s%sClosure: Num: %d\n%s\n%s", indent, "", field,
+               cl.Num, args, types)
+}
+
+// StructuredBindings is a structured binding declaration.
+type StructuredBindings struct {
+       Bindings []AST
+}
+
+func (sb *StructuredBindings) print(ps *printState) {
+       ps.writeString("[")
+       for i, b := range sb.Bindings {
+               if i > 0 {
+                       ps.writeString(", ")
+               }
+               b.print(ps)
+       }
+       ps.writeString("]")
+}
+
+func (sb *StructuredBindings) Traverse(fn func(AST) bool) {
+       if fn(sb) {
+               for _, b := range sb.Bindings {
+                       b.Traverse(fn)
+               }
+       }
+}
+
+func (sb *StructuredBindings) Copy(fn func(AST) AST, skip func(AST) bool) AST {
+       if skip(sb) {
+               return nil
+       }
+       changed := false
+       bindings := make([]AST, len(sb.Bindings))
+       for i, b := range sb.Bindings {
+               bc := b.Copy(fn, skip)
+               if bc == nil {
+                       bindings[i] = b
+               } else {
+                       bindings[i] = bc
+                       changed = true
+               }
+       }
+       if !changed {
+               return fn(sb)
+       }
+       sb = &StructuredBindings{Bindings: bindings}
+       if r := fn(sb); r != nil {
+               return r
+       }
+       return sb
+}
+
+func (sb *StructuredBindings) GoString() string {
+       return sb.goString(0, "")
+}
+
+func (sb *StructuredBindings) goString(indent int, field string) string {
+       var strb strings.Builder
+       fmt.Fprintf(&strb, "%*s%sStructuredBinding:", indent, "", field)
+       for _, b := range sb.Bindings {
+               strb.WriteByte('\n')
+               strb.WriteString(b.goString(indent+2, ""))
+       }
+       return strb.String()
 }
 
 // UnnamedType is an unnamed type, that just has an index.
@@ -2911,7 +3753,15 @@ type UnnamedType struct {
 }
 
 func (ut *UnnamedType) print(ps *printState) {
-       ps.writeString(fmt.Sprintf("{unnamed type#%d}", ut.Num+1))
+       if ps.llvmStyle {
+               if ut.Num == 0 {
+                       ps.writeString("'unnamed'")
+               } else {
+                       ps.writeString(fmt.Sprintf("'unnamed%d'", ut.Num-1))
+               }
+       } else {
+               ps.writeString(fmt.Sprintf("{unnamed type#%d}", ut.Num+1))
+       }
 }
 
 func (ut *UnnamedType) Traverse(fn func(AST) bool) {
@@ -2941,7 +3791,13 @@ type Clone struct {
 
 func (c *Clone) print(ps *printState) {
        ps.print(c.Base)
-       ps.writeString(fmt.Sprintf(" [clone %s]", c.Suffix))
+       if ps.llvmStyle {
+               ps.writeString(" (")
+               ps.writeString(c.Suffix)
+               ps.writeByte(')')
+       } else {
+               ps.writeString(fmt.Sprintf(" [clone %s]", c.Suffix))
+       }
 }
 
 func (c *Clone) Traverse(fn func(AST) bool) {
@@ -2982,7 +3838,16 @@ type Special struct {
 }
 
 func (s *Special) print(ps *printState) {
-       ps.writeString(s.Prefix)
+       prefix := s.Prefix
+       if ps.llvmStyle {
+               switch prefix {
+               case "TLS wrapper function for ":
+                       prefix = "thread-local wrapper routine for "
+               case "TLS init function for ":
+                       prefix = "thread-local initialization routine for "
+               }
+       }
+       ps.writeString(prefix)
        ps.print(s.Val)
 }
 
@@ -3194,7 +4059,12 @@ func (ps *printState) printOneInner(save *[]AST) {
 func (ps *printState) isEmpty(a AST) bool {
        switch a := a.(type) {
        case *ArgumentPack:
-               return len(a.Args) == 0
+               for _, a := range a.Args {
+                       if !ps.isEmpty(a) {
+                               return false
+                       }
+               }
+               return true
        case *ExprList:
                return len(a.Exprs) == 0
        case *PackExpansion:
index c2667446df07b34461bdb8b5ee4f99d37931ae9c..9eec0aa3c83921792418b06ed6513d95ee2e6502 100644 (file)
@@ -2,9 +2,12 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// Package demangle defines functions that demangle GCC/LLVM C++ symbol names.
+// Package demangle defines functions that demangle GCC/LLVM
+// C++ and Rust symbol names.
 // This package recognizes names that were mangled according to the C++ ABI
-// defined at http://codesourcery.com/cxx-abi/.
+// defined at http://codesourcery.com/cxx-abi/ and the Rust ABI
+// defined at
+// https://rust-lang.github.io/rfcs/2603-rust-symbol-name-mangling-v0.html
 //
 // Most programs will want to call Filter or ToString.
 package demangle
@@ -17,7 +20,7 @@ import (
 
 // ErrNotMangledName is returned by CheckedDemangle if the string does
 // not appear to be a C++ symbol name.
-var ErrNotMangledName = errors.New("not a C++ mangled name")
+var ErrNotMangledName = errors.New("not a C++ or Rust mangled name")
 
 // Option is the type of demangler options.
 type Option int
@@ -33,11 +36,23 @@ const (
        // NoParams implies NoClones.
        NoClones
 
+       // The NoRust option disables demangling of old-style Rust
+       // mangled names, which can be confused with C++ style mangled
+       // names. New style Rust mangled names are still recognized.
+       NoRust
+
        // The Verbose option turns on more verbose demangling.
        Verbose
+
+       // LLVMStyle tries to translate an AST to a string in the
+       // style of the LLVM demangler. This does not affect
+       // the parsing of the AST, only the conversion of the AST
+       // to a string.
+       LLVMStyle
 )
 
-// Filter demangles a C++ symbol name, returning the human-readable C++ name.
+// Filter demangles a C++ or Rust symbol name,
+// returning the human-readable C++ or Rust name.
 // If any error occurs during demangling, the input string is returned.
 func Filter(name string, options ...Option) string {
        ret, err := ToString(name, options...)
@@ -47,11 +62,34 @@ func Filter(name string, options ...Option) string {
        return ret
 }
 
-// ToString demangles a C++ symbol name, returning a human-readable C++
-// name or an error.
-// If the name does not appear to be a C++ symbol name at all, the
-// error will be ErrNotMangledName.
+// ToString demangles a C++ or Rust symbol name,
+// returning a human-readable C++ or Rust name or an error.
+// If the name does not appear to be a C++ or Rust symbol name at all,
+// the error will be ErrNotMangledName.
 func ToString(name string, options ...Option) (string, error) {
+       if strings.HasPrefix(name, "_R") {
+               return rustToString(name, options)
+       }
+
+       // Check for an old-style Rust mangled name.
+       // It starts with _ZN and ends with "17h" followed by 16 hex digits
+       // followed by "E".
+       if strings.HasPrefix(name, "_ZN") && strings.HasSuffix(name, "E") && len(name) > 23 && name[len(name)-20:len(name)-17] == "17h" {
+               noRust := false
+               for _, o := range options {
+                       if o == NoRust {
+                               noRust = true
+                               break
+                       }
+               }
+               if !noRust {
+                       s, ok := oldRustToString(name, options)
+                       if ok {
+                               return s, nil
+                       }
+               }
+       }
+
        a, err := ToAST(name, options...)
        if err != nil {
                return "", err
@@ -65,12 +103,37 @@ func ToString(name string, options ...Option) (string, error) {
 // the parameter types are not demangled.
 // If the name does not appear to be a C++ symbol name at all, the
 // error will be ErrNotMangledName.
+// This function does not currently support Rust symbol names.
 func ToAST(name string, options ...Option) (AST, error) {
        if strings.HasPrefix(name, "_Z") {
                a, err := doDemangle(name[2:], options...)
                return a, adjustErr(err, 2)
        }
 
+       if strings.HasPrefix(name, "___Z") {
+               // clang extensions
+               block := strings.LastIndex(name, "_block_invoke")
+               if block == -1 {
+                       return nil, ErrNotMangledName
+               }
+               a, err := doDemangle(name[4:block], options...)
+               if err != nil {
+                       return a, adjustErr(err, 4)
+               }
+               name = strings.TrimPrefix(name[block:], "_block_invoke")
+               if len(name) > 0 && name[0] == '_' {
+                       name = name[1:]
+               }
+               for len(name) > 0 && isDigit(name[0]) {
+                       name = name[1:]
+               }
+               if len(name) > 0 && name[0] != '.' {
+                       return nil, errors.New("unparsed characters at end of mangled name")
+               }
+               a = &Special{Prefix: "invocation function for block in ", Val: a}
+               return a, nil
+       }
+
        const prefix = "_GLOBAL_"
        if strings.HasPrefix(name, prefix) {
                // The standard demangler ignores NoParams for global
@@ -150,12 +213,13 @@ func doDemangle(name string, options ...Option) (ret AST, err error) {
                case NoParams:
                        params = false
                        clones = false
-               case NoTemplateParams:
-               // This is a valid option but only affect printing of the AST.
                case NoClones:
                        clones = false
                case Verbose:
                        verbose = true
+               case NoTemplateParams, LLVMStyle:
+                       // These are valid options but only affect
+                       // printing of the AST.
                default:
                        return nil, fmt.Errorf("unrecognized demangler option %v", o)
                }
@@ -185,7 +249,16 @@ type state struct {
        off       int           // offset of str within original string
        subs      substitutions // substitutions
        templates []*Template   // templates being processed
-       inLambda  int           // number of lambdas being parsed
+
+       // The number of entries in templates when we started parsing
+       // a lambda, plus 1 so that 0 means not parsing a lambda.
+       lambdaTemplateLevel int
+
+       // Counts of template parameters without template arguments,
+       // for lambdas.
+       typeTemplateParamCount     int
+       nonTypeTemplateParamCount  int
+       templateTemplateParamCount int
 }
 
 // copy returns a copy of the current state.
@@ -308,35 +381,40 @@ func (st *state) encoding(params bool, local forLocalNameType) AST {
                return a
        }
 
-       check := a
-       mwq, _ := check.(*MethodWithQualifiers)
-       if mwq != nil {
-               check = mwq.Method
-       }
+       mwq, _ := a.(*MethodWithQualifiers)
 
-       var template *Template
-       switch check := check.(type) {
-       case *Template:
-               template = check
-       case *Qualified:
-               if check.LocalName {
-                       n := check.Name
-                       if nmwq, ok := n.(*MethodWithQualifiers); ok {
-                               n = nmwq.Method
+       var findTemplate func(AST) *Template
+       findTemplate = func(check AST) *Template {
+               switch check := check.(type) {
+               case *Template:
+                       return check
+               case *Qualified:
+                       if check.LocalName {
+                               return findTemplate(check.Name)
+                       } else if _, ok := check.Name.(*Constructor); ok {
+                               return findTemplate(check.Name)
+                       }
+               case *MethodWithQualifiers:
+                       return findTemplate(check.Method)
+               case *Constructor:
+                       if check.Base != nil {
+                               return findTemplate(check.Base)
                        }
-                       template, _ = n.(*Template)
                }
+               return nil
        }
-       var oldInLambda int
+
+       template := findTemplate(a)
+       var oldLambdaTemplateLevel int
        if template != nil {
                st.templates = append(st.templates, template)
-               oldInLambda = st.inLambda
-               st.inLambda = 0
+               oldLambdaTemplateLevel = st.lambdaTemplateLevel
+               st.lambdaTemplateLevel = 0
        }
 
        // Checking for the enable_if attribute here is what the LLVM
        // demangler does.  This is not very general but perhaps it is
-       // sufficent.
+       // sufficient.
        const enableIfPrefix = "Ua9enable_ifI"
        var enableIfArgs []AST
        if strings.HasPrefix(st.str, enableIfPrefix) {
@@ -348,7 +426,7 @@ func (st *state) encoding(params bool, local forLocalNameType) AST {
 
        if template != nil {
                st.templates = st.templates[:len(st.templates)-1]
-               st.inLambda = oldInLambda
+               st.lambdaTemplateLevel = oldLambdaTemplateLevel
        }
 
        ft = simplify(ft)
@@ -357,7 +435,7 @@ func (st *state) encoding(params bool, local forLocalNameType) AST {
        // doesn't get confused with the top level return type.
        if local == forLocalName {
                if functype, ok := ft.(*FunctionType); ok {
-                       functype.Return = nil
+                       functype.ForLocalName = true
                }
        }
 
@@ -573,7 +651,7 @@ func (st *state) prefix() AST {
                var next AST
 
                c := st.str[0]
-               if isDigit(c) || isLower(c) || c == 'U' || c == 'L' {
+               if isDigit(c) || isLower(c) || c == 'U' || c == 'L' || (c == 'D' && len(st.str) > 1 && st.str[1] == 'C') {
                        un, isUnCast := st.unqualifiedName()
                        next = un
                        if isUnCast {
@@ -595,10 +673,17 @@ func (st *state) prefix() AST {
                                        st.fail("constructor before name is seen")
                                }
                                st.advance(1)
+                               var base AST
                                if inheriting {
-                                       last = st.demangleType(false)
+                                       base = st.demangleType(false)
+                               }
+                               next = &Constructor{
+                                       Name: getLast(last),
+                                       Base: base,
+                               }
+                               if len(st.str) > 0 && st.str[0] == 'B' {
+                                       next = st.taggedName(next)
                                }
-                               next = &Constructor{Name: getLast(last)}
                        case 'D':
                                if len(st.str) > 1 && (st.str[1] == 'T' || st.str[1] == 't') {
                                        next = st.demangleType(false)
@@ -611,6 +696,9 @@ func (st *state) prefix() AST {
                                        }
                                        st.advance(2)
                                        next = &Destructor{Name: getLast(last)}
+                                       if len(st.str) > 0 && st.str[0] == 'B' {
+                                               next = st.taggedName(next)
+                                       }
                                }
                        case 'S':
                                next = st.substitution(true)
@@ -713,6 +801,18 @@ func (st *state) unqualifiedName() (r AST, isCast bool) {
                        n := st.sourceName()
                        a = &Unary{Op: op, Expr: n, Suffix: false, SizeofType: false}
                }
+       } else if c == 'D' && len(st.str) > 1 && st.str[1] == 'C' {
+               var bindings []AST
+               st.advance(2)
+               for {
+                       binding := st.sourceName()
+                       bindings = append(bindings, binding)
+                       if len(st.str) > 0 && st.str[0] == 'E' {
+                               st.advance(1)
+                               break
+                       }
+               }
+               a = &StructuredBindings{Bindings: bindings}
        } else {
                switch c {
                case 'C', 'D':
@@ -728,6 +828,10 @@ func (st *state) unqualifiedName() (r AST, isCast bool) {
                        }
                        c := st.str[1]
                        switch c {
+                       case 'b':
+                               st.advance(2)
+                               st.compactNumber()
+                               a = &Name{Name: "'block-literal'"}
                        case 'l':
                                a = st.closureTypeName()
                        case 't':
@@ -802,6 +906,42 @@ func (st *state) number() int {
        return val
 }
 
+// <seq-id> ::= <0-9A-Z>+
+//
+// We expect this to be followed by an underscore.
+func (st *state) seqID(eofOK bool) int {
+       if len(st.str) > 0 && st.str[0] == '_' {
+               st.advance(1)
+               return 0
+       }
+       id := 0
+       for {
+               if len(st.str) == 0 {
+                       if eofOK {
+                               return id + 1
+                       }
+                       st.fail("missing end to sequence ID")
+               }
+               // Don't overflow a 32-bit int.
+               if id >= 0x80000000/36-36 {
+                       st.fail("sequence ID overflow")
+               }
+               c := st.str[0]
+               if c == '_' {
+                       st.advance(1)
+                       return id + 1
+               }
+               if isDigit(c) {
+                       id = id*36 + int(c-'0')
+               } else if isUpper(c) {
+                       id = id*36 + int(c-'A') + 10
+               } else {
+                       st.fail("invalid character in sequence ID")
+               }
+               st.advance(1)
+       }
+}
+
 // An operator is the demangled name, and the number of arguments it
 // takes in an expression.
 type operator struct {
@@ -864,6 +1004,7 @@ var operators = map[string]operator{
        "ng": {"-", 1},
        "nt": {"!", 1},
        "nw": {"new", 3},
+       "nx": {"noexcept", 1},
        "oR": {"|=", 2},
        "oo": {"||", 2},
        "or": {"|", 2},
@@ -1094,8 +1235,8 @@ func (st *state) specialName() AST {
                        return &Special{Prefix: "guard variable for ", Val: n}
                case 'R':
                        n := st.name()
-                       i := st.number()
-                       return &Special{Prefix: fmt.Sprintf("reference temporary #%d for ", i), Val: n}
+                       st.seqID(true)
+                       return &Special{Prefix: "reference temporary for ", Val: n}
                case 'A':
                        v := st.encoding(true, notForLocalName)
                        return &Special{Prefix: "hidden alias for ", Val: v}
@@ -1257,6 +1398,23 @@ func (st *state) demangleType(isCast bool) AST {
        case 'M':
                ret = st.pointerToMemberType(isCast)
        case 'T':
+               if len(st.str) > 1 && (st.str[1] == 's' || st.str[1] == 'u' || st.str[1] == 'e') {
+                       c = st.str[1]
+                       st.advance(2)
+                       ret = st.name()
+                       var kind string
+                       switch c {
+                       case 's':
+                               kind = "struct"
+                       case 'u':
+                               kind = "union"
+                       case 'e':
+                               kind = "enum"
+                       }
+                       ret = &ElaboratedType{Kind: kind, Type: ret}
+                       break
+               }
+
                ret = st.templateParam()
                if len(st.str) > 0 && st.str[0] == 'I' {
                        // See the function comment to explain this.
@@ -1681,7 +1839,11 @@ func (st *state) bareFunctionType(hasReturnType bool) AST {
                returnType = st.demangleType(false)
        }
        types := st.parmlist()
-       return &FunctionType{Return: returnType, Args: types}
+       return &FunctionType{
+               Return:       returnType,
+               Args:         types,
+               ForLocalName: false, // may be set later in encoding
+       }
 }
 
 // <array-type> ::= A <(positive dimension) number> _ <(element) type>
@@ -1798,6 +1960,8 @@ func (st *state) compactNumber() int {
 
 // <template-param> ::= T_
 //                  ::= T <(parameter-2 non-negative) number> _
+//                  ::= TL <level-1> __
+//                  ::= TL <level-1> _ <parameter-2 non-negative number> _
 //
 // When a template parameter is a substitution candidate, any
 // reference to that substitution refers to the template parameter
@@ -1805,22 +1969,27 @@ func (st *state) compactNumber() int {
 // whatever the template parameter would be expanded to here.  We sort
 // this out in substitution and simplify.
 func (st *state) templateParam() AST {
-       if len(st.templates) == 0 && st.inLambda == 0 {
-               st.fail("template parameter not in scope of template")
-       }
        off := st.off
-
        st.checkChar('T')
+
+       level := 0
+       if len(st.str) > 0 && st.str[0] == 'L' {
+               st.advance(1)
+               level = st.compactNumber()
+       }
+
        n := st.compactNumber()
 
-       if st.inLambda > 0 {
-               // g++ mangles lambda auto params as template params.
-               // Apparently we can't encounter a template within a lambda.
-               // See https://gcc.gnu.org/PR78252.
-               return &LambdaAuto{Index: n}
+       if level >= len(st.templates) {
+               if st.lambdaTemplateLevel > 0 && level == st.lambdaTemplateLevel-1 {
+                       // Lambda auto params are mangled as template params.
+                       // See https://gcc.gnu.org/PR78252.
+                       return &LambdaAuto{Index: n}
+               }
+               st.failEarlier(fmt.Sprintf("template parameter is not in scope of template (level %d >= %d)", level, len(st.templates)), st.off-off)
        }
 
-       template := st.templates[len(st.templates)-1]
+       template := st.templates[level]
 
        if template == nil {
                // We are parsing a cast operator.  If the cast is
@@ -1830,6 +1999,11 @@ func (st *state) templateParam() AST {
        }
 
        if n >= len(template.Args) {
+               if st.lambdaTemplateLevel > 0 && level == st.lambdaTemplateLevel-1 {
+                       // Lambda auto params are mangled as template params.
+                       // See https://gcc.gnu.org/PR78252.
+                       return &LambdaAuto{Index: n}
+               }
                st.failEarlier(fmt.Sprintf("template index out of range (%d >= %d)", n, len(template.Args)), st.off-off)
        }
 
@@ -1968,9 +2142,11 @@ func (st *state) exprList(stop byte) AST {
 //              ::= dc <type> <expression>
 //              ::= sc <type> <expression>
 //              ::= cc <type> <expression>
+//              ::= mc <parameter type> <expr> [<offset number>] E
 //              ::= rc <type> <expression>
 //              ::= ti <type>
 //              ::= te <expression>
+//              ::= so <referent type> <expr> [<offset number>] <union-selector>* [p] E
 //              ::= st <type>
 //              ::= sz <expression>
 //              ::= at <type>
@@ -1991,6 +2167,7 @@ func (st *state) exprList(stop byte) AST {
 //              ::= fR <binary operator-name> <expression> <expression>
 //              ::= tw <expression>
 //              ::= tr
+//              ::= u <source-name> <template-arg>* E
 //              ::= <unresolved-name>
 //              ::= <expr-primary>
 //
@@ -2013,6 +2190,9 @@ func (st *state) expression() AST {
                return st.exprPrimary()
        } else if st.str[0] == 'T' {
                return st.templateParam()
+       } else if st.str[0] == 's' && len(st.str) > 1 && st.str[1] == 'o' {
+               st.advance(2)
+               return st.subobject()
        } else if st.str[0] == 's' && len(st.str) > 1 && st.str[1] == 'r' {
                return st.unresolvedName()
        } else if st.str[0] == 's' && len(st.str) > 1 && st.str[1] == 'p' {
@@ -2063,6 +2243,23 @@ func (st *state) expression() AST {
                st.cvQualifiers()
                index := st.compactNumber()
                return &FunctionParam{Index: index + 1}
+       } else if st.str[0] == 'm' && len(st.str) > 1 && st.str[1] == 'c' {
+               st.advance(2)
+               typ := st.demangleType(false)
+               expr := st.expression()
+               offset := 0
+               if len(st.str) > 0 && (st.str[0] == 'n' || isDigit(st.str[0])) {
+                       offset = st.number()
+               }
+               if len(st.str) == 0 || st.str[0] != 'E' {
+                       st.fail("expected E after pointer-to-member conversion")
+               }
+               st.advance(1)
+               return &PtrMemCast{
+                       Type:   typ,
+                       Expr:   expr,
+                       Offset: offset,
+               }
        } else if isDigit(st.str[0]) || (st.str[0] == 'o' && len(st.str) > 1 && st.str[1] == 'n') {
                if st.str[0] == 'o' {
                        // Skip operator function ID.
@@ -2088,6 +2285,50 @@ func (st *state) expression() AST {
                o, _ := st.operatorName(true)
                t := st.demangleType(false)
                return &Unary{Op: o, Expr: t, Suffix: false, SizeofType: true}
+       } else if st.str[0] == 'u' {
+               st.advance(1)
+               name := st.sourceName()
+               // Special case __uuidof followed by type or
+               // expression, as used by LLVM.
+               if n, ok := name.(*Name); ok && n.Name == "__uuidof" {
+                       if len(st.str) < 2 {
+                               st.fail("missing uuidof argument")
+                       }
+                       var operand AST
+                       if st.str[0] == 't' {
+                               st.advance(1)
+                               operand = st.demangleType(false)
+                       } else if st.str[0] == 'z' {
+                               st.advance(1)
+                               operand = st.expression()
+                       }
+                       if operand != nil {
+                               return &Binary{
+                                       Op:   &Operator{Name: "()"},
+                                       Left: name,
+                                       Right: &ExprList{
+                                               Exprs: []AST{operand},
+                                       },
+                               }
+                       }
+               }
+               var args []AST
+               for {
+                       if len(st.str) == 0 {
+                               st.fail("missing argument in vendor extended expressoin")
+                       }
+                       if st.str[0] == 'E' {
+                               st.advance(1)
+                               break
+                       }
+                       arg := st.templateArg()
+                       args = append(args, arg)
+               }
+               return &Binary{
+                       Op:    &Operator{Name: "()"},
+                       Left:  name,
+                       Right: &ExprList{Exprs: args},
+               }
        } else {
                if len(st.str) < 2 {
                        st.fail("missing operator code")
@@ -2185,6 +2426,42 @@ func (st *state) expression() AST {
        }
 }
 
+// <expression> ::= so <referent type> <expr> [<offset number>] <union-selector>* [p] E
+// <union-selector> ::= _ [<number>]
+func (st *state) subobject() AST {
+       typ := st.demangleType(false)
+       expr := st.expression()
+       offset := 0
+       if len(st.str) > 0 && (st.str[0] == 'n' || isDigit(st.str[0])) {
+               offset = st.number()
+       }
+       var selectors []int
+       for len(st.str) > 0 && st.str[0] == '_' {
+               st.advance(1)
+               selector := 0
+               if len(st.str) > 0 && (st.str[0] == 'n' || isDigit(st.str[0])) {
+                       selector = st.number()
+               }
+               selectors = append(selectors, selector)
+       }
+       pastEnd := false
+       if len(st.str) > 0 && st.str[0] == 'p' {
+               st.advance(1)
+               pastEnd = true
+       }
+       if len(st.str) == 0 || st.str[0] != 'E' {
+               st.fail("expected E after subobject")
+       }
+       st.advance(1)
+       return &Subobject{
+               Type:      typ,
+               SubExpr:   expr,
+               Offset:    offset,
+               Selectors: selectors,
+               PastEnd:   pastEnd,
+       }
+}
+
 // <unresolved-name> ::= [gs] <base-unresolved-name>
 //                   ::= sr <unresolved-type> <base-unresolved-name>
 //                   ::= srN <unresolved-type> <unresolved-qualifier-level>+ E <base-unresolved-name>
@@ -2320,6 +2597,14 @@ func (st *state) exprPrimary() AST {
        } else {
                t := st.demangleType(false)
 
+               isArrayType := func(typ AST) bool {
+                       if twq, ok := typ.(*TypeWithQualifiers); ok {
+                               typ = twq.Base
+                       }
+                       _, ok := typ.(*ArrayType)
+                       return ok
+               }
+
                neg := false
                if len(st.str) > 0 && st.str[0] == 'n' {
                        neg = true
@@ -2331,6 +2616,13 @@ func (st *state) exprPrimary() AST {
                                // We accept one if present because GCC
                                // used to generate one.
                                // https://gcc.gnu.org/PR91979.
+                       } else if cl, ok := t.(*Closure); ok {
+                               // A closure doesn't have a value.
+                               st.advance(1)
+                               return &LambdaExpr{Type: cl}
+                       } else if isArrayType(t) {
+                               st.advance(1)
+                               return &StringLiteral{Type: t}
                        } else {
                                st.fail("missing literal value")
                        }
@@ -2354,6 +2646,15 @@ func (st *state) exprPrimary() AST {
 //                     __ <(non-negative) number> _ (when number >= 10)
 func (st *state) discriminator(a AST) AST {
        if len(st.str) == 0 || st.str[0] != '_' {
+               // clang can generate a discriminator at the end of
+               // the string with no underscore.
+               for i := 0; i < len(st.str); i++ {
+                       if !isDigit(st.str[i]) {
+                               return a
+                       }
+               }
+               // Skip the trailing digits.
+               st.advance(len(st.str))
                return a
        }
        off := st.off
@@ -2379,18 +2680,131 @@ func (st *state) discriminator(a AST) AST {
 }
 
 // <closure-type-name> ::= Ul <lambda-sig> E [ <nonnegative number> ] _
+// <lambda-sig> ::= <parameter type>+
 func (st *state) closureTypeName() AST {
        st.checkChar('U')
        st.checkChar('l')
-       st.inLambda++
+
+       oldLambdaTemplateLevel := st.lambdaTemplateLevel
+       st.lambdaTemplateLevel = len(st.templates) + 1
+
+       var templateArgs []AST
+       var template *Template
+       for len(st.str) > 1 && st.str[0] == 'T' {
+               arg, templateVal := st.templateParamDecl()
+               if arg == nil {
+                       break
+               }
+               templateArgs = append(templateArgs, arg)
+               if template == nil {
+                       template = &Template{
+                               Name: &Name{Name: "lambda"},
+                       }
+                       st.templates = append(st.templates, template)
+               }
+               template.Args = append(template.Args, templateVal)
+       }
+
        types := st.parmlist()
-       st.inLambda--
+
+       st.lambdaTemplateLevel = oldLambdaTemplateLevel
+
+       if template != nil {
+               st.templates = st.templates[:len(st.templates)-1]
+       }
+
        if len(st.str) == 0 || st.str[0] != 'E' {
                st.fail("expected E after closure type name")
        }
        st.advance(1)
        num := st.compactNumber()
-       return &Closure{Types: types, Num: num}
+       return &Closure{TemplateArgs: templateArgs, Types: types, Num: num}
+}
+
+// <template-param-decl> ::= Ty                          # type parameter
+//                       ::= Tn <type>                   # non-type parameter
+//                       ::= Tt <template-param-decl>* E # template parameter
+//                       ::= Tp <template-param-decl>    # parameter pack
+//
+// Returns the new AST to include in the AST we are building and the
+// new AST to add to the list of template parameters.
+//
+// Returns nil, nil if not looking at a template-param-decl.
+func (st *state) templateParamDecl() (AST, AST) {
+       if len(st.str) < 2 || st.str[0] != 'T' {
+               return nil, nil
+       }
+       mk := func(prefix string, p *int) AST {
+               idx := *p
+               (*p)++
+               return &TemplateParamName{
+                       Prefix: prefix,
+                       Index:  idx,
+               }
+       }
+       switch st.str[1] {
+       case 'y':
+               st.advance(2)
+               name := mk("$T", &st.typeTemplateParamCount)
+               tp := &TypeTemplateParam{
+                       Name: name,
+               }
+               return tp, name
+       case 'n':
+               st.advance(2)
+               name := mk("$N", &st.nonTypeTemplateParamCount)
+               typ := st.demangleType(false)
+               tp := &NonTypeTemplateParam{
+                       Name: name,
+                       Type: typ,
+               }
+               return tp, name
+       case 't':
+               st.advance(2)
+               name := mk("$TT", &st.templateTemplateParamCount)
+               var params []AST
+               var template *Template
+               for {
+                       if len(st.str) == 0 {
+                               st.fail("expected closure template parameter")
+                       }
+                       if st.str[0] == 'E' {
+                               st.advance(1)
+                               break
+                       }
+                       off := st.off
+                       param, templateVal := st.templateParamDecl()
+                       if param == nil {
+                               st.failEarlier("expected closure template parameter", st.off-off)
+                       }
+                       params = append(params, param)
+                       if template == nil {
+                               template = &Template{
+                                       Name: &Name{Name: "template_template"},
+                               }
+                               st.templates = append(st.templates, template)
+                       }
+                       template.Args = append(template.Args, templateVal)
+               }
+               if template != nil {
+                       st.templates = st.templates[:len(st.templates)-1]
+               }
+               tp := &TemplateTemplateParam{
+                       Name:   name,
+                       Params: params,
+               }
+               return tp, name
+       case 'p':
+               st.advance(2)
+               off := st.off
+               param, templateVal := st.templateParamDecl()
+               if param == nil {
+                       st.failEarlier("expected lambda template parameter", st.off-off)
+               }
+               return &TemplateParamPack{Param: param}, templateVal
+       default:
+               return nil, nil
+       }
 }
 
 // <unnamed-type-name> ::= Ut [ <nonnegative number> ] _
@@ -2504,36 +2918,11 @@ func (st *state) substitution(forPrefix bool) AST {
                st.fail("missing substitution index")
        }
        c := st.str[0]
-       st.advance(1)
-       dec := 1
+       off := st.off
        if c == '_' || isDigit(c) || isUpper(c) {
-               id := 0
-               if c != '_' {
-                       for c != '_' {
-                               // Don't overflow a 32-bit int.
-                               if id >= 0x80000000/36-36 {
-                                       st.fail("substitution index overflow")
-                               }
-                               if isDigit(c) {
-                                       id = id*36 + int(c-'0')
-                               } else if isUpper(c) {
-                                       id = id*36 + int(c-'A') + 10
-                               } else {
-                                       st.fail("invalid character in substitution index")
-                               }
-
-                               if len(st.str) == 0 {
-                                       st.fail("missing end to substitution index")
-                               }
-                               c = st.str[0]
-                               st.advance(1)
-                               dec++
-                       }
-                       id++
-               }
-
+               id := st.seqID(false)
                if id >= len(st.subs) {
-                       st.failEarlier(fmt.Sprintf("substitution index out of range (%d >= %d)", id, len(st.subs)), dec)
+                       st.failEarlier(fmt.Sprintf("substitution index out of range (%d >= %d)", id, len(st.subs)), st.off-off)
                }
 
                ret := st.subs[id]
@@ -2545,18 +2934,18 @@ func (st *state) substitution(forPrefix bool) AST {
                // When copying a Typed we may need to adjust
                // the templates.
                copyTemplates := st.templates
-               var oldInLambda []int
+               var oldLambdaTemplateLevel []int
 
                // pushTemplate is called from skip, popTemplate from copy.
                pushTemplate := func(template *Template) {
                        copyTemplates = append(copyTemplates, template)
-                       oldInLambda = append(oldInLambda, st.inLambda)
-                       st.inLambda = 0
+                       oldLambdaTemplateLevel = append(oldLambdaTemplateLevel, st.lambdaTemplateLevel)
+                       st.lambdaTemplateLevel = 0
                }
                popTemplate := func() {
                        copyTemplates = copyTemplates[:len(copyTemplates)-1]
-                       st.inLambda = oldInLambda[len(oldInLambda)-1]
-                       oldInLambda = oldInLambda[:len(oldInLambda)-1]
+                       st.lambdaTemplateLevel = oldLambdaTemplateLevel[len(oldLambdaTemplateLevel)-1]
+                       oldLambdaTemplateLevel = oldLambdaTemplateLevel[:len(oldLambdaTemplateLevel)-1]
                }
 
                copy := func(a AST) AST {
@@ -2569,8 +2958,9 @@ func (st *state) substitution(forPrefix bool) AST {
                                }
                                return nil
                        case *Closure:
-                               // Undo the decrement in skip.
-                               st.inLambda--
+                               // Undo the save in skip.
+                               st.lambdaTemplateLevel = oldLambdaTemplateLevel[len(oldLambdaTemplateLevel)-1]
+                               oldLambdaTemplateLevel = oldLambdaTemplateLevel[:len(oldLambdaTemplateLevel)-1]
                                return nil
                        case *TemplateParam:
                                index = a.Index
@@ -2582,7 +2972,7 @@ func (st *state) substitution(forPrefix bool) AST {
                        default:
                                return nil
                        }
-                       if st.inLambda > 0 {
+                       if st.lambdaTemplateLevel > 0 {
                                if _, ok := a.(*LambdaAuto); ok {
                                        return nil
                                }
@@ -2598,7 +2988,7 @@ func (st *state) substitution(forPrefix bool) AST {
                                // here.
                                template = rt
                        } else {
-                               st.failEarlier("substituted template parameter not in scope of template", dec)
+                               st.failEarlier("substituted template parameter not in scope of template", st.off-off)
                        }
                        if template == nil {
                                // This template parameter is within
@@ -2607,7 +2997,7 @@ func (st *state) substitution(forPrefix bool) AST {
                        }
 
                        if index >= len(template.Args) {
-                               st.failEarlier(fmt.Sprintf("substituted template index out of range (%d >= %d)", index, len(template.Args)), dec)
+                               st.failEarlier(fmt.Sprintf("substituted template index out of range (%d >= %d)", index, len(template.Args)), st.off-off)
                        }
 
                        return &TemplateParam{Index: index, Template: template}
@@ -2622,8 +3012,9 @@ func (st *state) substitution(forPrefix bool) AST {
                                }
                                return false
                        case *Closure:
-                               // This is decremented in copy.
-                               st.inLambda++
+                               // This is undone in copy.
+                               oldLambdaTemplateLevel = append(oldLambdaTemplateLevel, st.lambdaTemplateLevel)
+                               st.lambdaTemplateLevel = len(copyTemplates) + 1
                                return false
                        case *TemplateParam, *LambdaAuto:
                                return false
@@ -2643,6 +3034,7 @@ func (st *state) substitution(forPrefix bool) AST {
 
                return ret
        } else {
+               st.advance(1)
                m := subAST
                if st.verbose {
                        m = verboseAST
diff --git a/src/cmd/vendor/github.com/ianlancetaylor/demangle/rust.go b/src/cmd/vendor/github.com/ianlancetaylor/demangle/rust.go
new file mode 100644 (file)
index 0000000..140b631
--- /dev/null
@@ -0,0 +1,1069 @@
+// Copyright 2021 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package demangle
+
+import (
+       "fmt"
+       "math"
+       "math/bits"
+       "strings"
+       "unicode/utf8"
+)
+
+// rustToString demangles a Rust symbol.
+func rustToString(name string, options []Option) (ret string, err error) {
+       if !strings.HasPrefix(name, "_R") {
+               return "", ErrNotMangledName
+       }
+
+       // When the demangling routines encounter an error, they panic
+       // with a value of type demangleErr.
+       defer func() {
+               if r := recover(); r != nil {
+                       if de, ok := r.(demangleErr); ok {
+                               ret = ""
+                               err = de
+                               return
+                       }
+                       panic(r)
+               }
+       }()
+
+       suffix := ""
+       dot := strings.Index(name, ".")
+       if dot >= 0 {
+               suffix = name[dot:]
+               name = name[:dot]
+       }
+
+       name = name[2:]
+       rst := &rustState{orig: name, str: name}
+       rst.symbolName()
+
+       if len(rst.str) > 0 {
+               rst.fail("unparsed characters at end of mangled name")
+       }
+
+       if suffix != "" {
+               rst.skip = false
+               rst.writeString(" (")
+               rst.writeString(suffix)
+               rst.writeByte(')')
+       }
+
+       return rst.buf.String(), nil
+}
+
+// A rustState holds the current state of demangling a Rust string.
+type rustState struct {
+       orig      string          // the original string being demangled
+       str       string          // remainder of string to demangle
+       off       int             // offset of str within original string
+       buf       strings.Builder // demangled string being built
+       skip      bool            // don't print, just skip
+       lifetimes int64           // number of bound lifetimes
+       last      byte            // last byte written to buffer
+}
+
+// fail panics with demangleErr, to be caught in rustToString.
+func (rst *rustState) fail(err string) {
+       panic(demangleErr{err: err, off: rst.off})
+}
+
+// advance advances the current string offset.
+func (rst *rustState) advance(add int) {
+       if len(rst.str) < add {
+               panic("internal error")
+       }
+       rst.str = rst.str[add:]
+       rst.off += add
+}
+
+// checkChar requires that the next character in the string be c,
+// and advances past it.
+func (rst *rustState) checkChar(c byte) {
+       if len(rst.str) == 0 || rst.str[0] != c {
+               rst.fail("expected " + string(c))
+       }
+       rst.advance(1)
+}
+
+// writeByte writes a byte to the buffer.
+func (rst *rustState) writeByte(c byte) {
+       if rst.skip {
+               return
+       }
+       rst.last = c
+       rst.buf.WriteByte(c)
+}
+
+// writeString writes a string to the buffer.
+func (rst *rustState) writeString(s string) {
+       if rst.skip {
+               return
+       }
+       if len(s) > 0 {
+               rst.last = s[len(s)-1]
+               rst.buf.WriteString(s)
+       }
+}
+
+// <symbol-name> = "_R" [<decimal-number>] <path> [<instantiating-crate>]
+// <instantiating-crate> = <path>
+//
+// We've already skipped the "_R".
+func (rst *rustState) symbolName() {
+       if len(rst.str) < 1 {
+               rst.fail("expected symbol-name")
+       }
+
+       if isDigit(rst.str[0]) {
+               rst.fail("unsupported Rust encoding version")
+       }
+
+       rst.path(true)
+
+       if len(rst.str) > 0 {
+               rst.skip = true
+               rst.path(false)
+       }
+}
+
+// <path> = "C" <identifier>                    // crate root
+//        | "M" <impl-path> <type>              // <T> (inherent impl)
+//        | "X" <impl-path> <type> <path>       // <T as Trait> (trait impl)
+//        | "Y" <type> <path>                   // <T as Trait> (trait definition)
+//        | "N" <namespace> <path> <identifier> // ...::ident (nested path)
+//        | "I" <path> {<generic-arg>} "E"      // ...<T, U> (generic args)
+//        | <backref>
+// <namespace> = "C"      // closure
+//             | "S"      // shim
+//             | <A-Z>    // other special namespaces
+//             | <a-z>    // internal namespaces
+//
+// needsSeparator is true if we need to write out :: for a generic;
+// it is passed as false if we are in the middle of a type.
+func (rst *rustState) path(needsSeparator bool) {
+       if len(rst.str) < 1 {
+               rst.fail("expected path")
+       }
+       switch c := rst.str[0]; c {
+       case 'C':
+               rst.advance(1)
+               _, ident := rst.identifier()
+               rst.writeString(ident)
+       case 'M', 'X':
+               rst.advance(1)
+               rst.implPath()
+               rst.writeByte('<')
+               rst.demangleType()
+               if c == 'X' {
+                       rst.writeString(" as ")
+                       rst.path(false)
+               }
+               rst.writeByte('>')
+       case 'Y':
+               rst.advance(1)
+               rst.writeByte('<')
+               rst.demangleType()
+               rst.writeString(" as ")
+               rst.path(false)
+               rst.writeByte('>')
+       case 'N':
+               rst.advance(1)
+
+               if len(rst.str) < 1 {
+                       rst.fail("expected namespace")
+               }
+               ns := rst.str[0]
+               switch {
+               case ns >= 'a' && ns <= 'z':
+               case ns >= 'A' && ns <= 'Z':
+               default:
+                       rst.fail("invalid namespace character")
+               }
+               rst.advance(1)
+
+               rst.path(needsSeparator)
+
+               dis, ident := rst.identifier()
+
+               if ns >= 'A' && ns <= 'Z' {
+                       rst.writeString("::{")
+                       switch ns {
+                       case 'C':
+                               rst.writeString("closure")
+                       case 'S':
+                               rst.writeString("shim")
+                       default:
+                               rst.writeByte(ns)
+                       }
+                       if len(ident) > 0 {
+                               rst.writeByte(':')
+                               rst.writeString(ident)
+                       }
+                       if !rst.skip {
+                               fmt.Fprintf(&rst.buf, "#%d}", dis)
+                               rst.last = '}'
+                       }
+               } else {
+                       rst.writeString("::")
+                       rst.writeString(ident)
+               }
+       case 'I':
+               rst.advance(1)
+               rst.path(needsSeparator)
+               if needsSeparator {
+                       rst.writeString("::")
+               }
+               rst.writeByte('<')
+               first := true
+               for len(rst.str) > 0 && rst.str[0] != 'E' {
+                       if first {
+                               first = false
+                       } else {
+                               rst.writeString(", ")
+                       }
+                       rst.genericArg()
+               }
+               rst.writeByte('>')
+               rst.checkChar('E')
+       case 'B':
+               rst.backref(func() { rst.path(needsSeparator) })
+       default:
+               rst.fail("unrecognized letter in path")
+       }
+}
+
+// <impl-path> = [<disambiguator>] <path>
+func (rst *rustState) implPath() {
+       // This path is not part of the demangled string.
+       hold := rst.skip
+       rst.skip = true
+       defer func() {
+               rst.skip = hold
+       }()
+
+       rst.disambiguator()
+       rst.path(false)
+}
+
+// <identifier> = [<disambiguator>] <undisambiguated-identifier>
+// Returns the disambiguator and the identifier.
+func (rst *rustState) identifier() (int64, string) {
+       dis := rst.disambiguator()
+       ident := rst.undisambiguatedIdentifier()
+       return dis, ident
+}
+
+// <disambiguator> = "s" <base-62-number>
+// This is optional.
+func (rst *rustState) disambiguator() int64 {
+       if len(rst.str) == 0 || rst.str[0] != 's' {
+               return 0
+       }
+       rst.advance(1)
+       return rst.base62Number() + 1
+}
+
+// <undisambiguated-identifier> = ["u"] <decimal-number> ["_"] <bytes>
+func (rst *rustState) undisambiguatedIdentifier() string {
+       punycode := false
+       if len(rst.str) > 0 && rst.str[0] == 'u' {
+               rst.advance(1)
+               punycode = true
+       }
+
+       val := rst.decimalNumber()
+
+       if len(rst.str) > 0 && rst.str[0] == '_' {
+               rst.advance(1)
+       }
+
+       if len(rst.str) < val {
+               rst.fail("not enough characters for identifier")
+       }
+       id := rst.str[:val]
+       rst.advance(val)
+
+       for i := 0; i < len(id); i++ {
+               c := id[i]
+               switch {
+               case c >= '0' && c <= '9':
+               case c >= 'A' && c <= 'Z':
+               case c >= 'a' && c <= 'z':
+               case c == '_':
+               default:
+                       rst.fail("invalid character in identifier")
+               }
+       }
+
+       if punycode {
+               id = rst.expandPunycode(id)
+       }
+
+       return id
+}
+
+// expandPunycode decodes the Rust version of punycode.
+// This algorithm is taken from RFC 3492 section 6.2.
+func (rst *rustState) expandPunycode(s string) string {
+       const (
+               base        = 36
+               tmin        = 1
+               tmax        = 26
+               skew        = 38
+               damp        = 700
+               initialBias = 72
+               initialN    = 128
+       )
+
+       idx := strings.LastIndex(s, "_")
+       if idx < 0 {
+               rst.fail("missing underscore in punycode string")
+       }
+
+       output := []rune(s[:idx])
+       encoding := s[idx+1:]
+
+       i := 0
+       n := initialN
+       bias := initialBias
+
+       pos := 0
+       for pos < len(encoding) {
+               oldI := i
+               w := 1
+               for k := base; ; k += base {
+                       if pos == len(encoding) {
+                               rst.fail("unterminated punycode")
+                       }
+
+                       var digit byte
+                       d := encoding[pos]
+                       pos++
+                       switch {
+                       case '0' <= d && d <= '9':
+                               digit = d - '0' + 26
+                       case 'A' <= d && d <= 'Z':
+                               digit = d - 'A'
+                       case 'a' <= d && d <= 'z':
+                               digit = d - 'a'
+                       default:
+                               rst.fail("invalid punycode digit")
+                       }
+
+                       i += int(digit) * w
+                       if i < 0 {
+                               rst.fail("punycode number overflow")
+                       }
+
+                       var t int
+                       if k <= bias {
+                               t = tmin
+                       } else if k > bias+tmax {
+                               t = tmax
+                       } else {
+                               t = k - bias
+                       }
+
+                       if int(digit) < t {
+                               break
+                       }
+
+                       if w >= math.MaxInt32/base {
+                               rst.fail("punycode number overflow")
+                       }
+                       w *= base - t
+               }
+
+               delta := i - oldI
+               numPoints := len(output) + 1
+               firstTime := oldI == 0
+               if firstTime {
+                       delta /= damp
+               } else {
+                       delta /= 2
+               }
+               delta += delta / numPoints
+               k := 0
+               for delta > ((base-tmin)*tmax)/2 {
+                       delta /= base - tmin
+                       k += base
+               }
+               bias = k + ((base-tmin+1)*delta)/(delta+skew)
+
+               n += i / (len(output) + 1)
+               if n > utf8.MaxRune {
+                       rst.fail("punycode rune overflow")
+               }
+               i %= len(output) + 1
+               output = append(output, 0)
+               copy(output[i+1:], output[i:])
+               output[i] = rune(n)
+               i++
+       }
+
+       return string(output)
+}
+
+// <generic-arg> = <lifetime>
+//               | <type>
+//               | "K" <const> // forward-compat for const generics
+// <lifetime> = "L" <base-62-number>
+func (rst *rustState) genericArg() {
+       if len(rst.str) < 1 {
+               rst.fail("expected generic-arg")
+       }
+       if rst.str[0] == 'L' {
+               rst.advance(1)
+               rst.writeLifetime(rst.base62Number())
+       } else if rst.str[0] == 'K' {
+               rst.advance(1)
+               rst.demangleConst()
+       } else {
+               rst.demangleType()
+       }
+}
+
+// <binder> = "G" <base-62-number>
+// This is optional.
+func (rst *rustState) binder() {
+       if len(rst.str) < 1 || rst.str[0] != 'G' {
+               return
+       }
+       rst.advance(1)
+
+       binderLifetimes := rst.base62Number() + 1
+
+       // Every bound lifetime should be referenced later.
+       if binderLifetimes >= int64(len(rst.str))-rst.lifetimes {
+               rst.fail("binder lifetimes overflow")
+       }
+
+       rst.writeString("for<")
+       for i := int64(0); i < binderLifetimes; i++ {
+               if i > 0 {
+                       rst.writeString(", ")
+               }
+               rst.lifetimes++
+               rst.writeLifetime(1)
+       }
+       rst.writeString("> ")
+}
+
+// <type> = <basic-type>
+//        | <path>                      // named type
+//        | "A" <type> <const>          // [T; N]
+//        | "S" <type>                  // [T]
+//        | "T" {<type>} "E"            // (T1, T2, T3, ...)
+//        | "R" [<lifetime>] <type>     // &T
+//        | "Q" [<lifetime>] <type>     // &mut T
+//        | "P" <type>                  // *const T
+//        | "O" <type>                  // *mut T
+//        | "F" <fn-sig>                // fn(...) -> ...
+//        | "D" <dyn-bounds> <lifetime> // dyn Trait<Assoc = X> + Send + 'a
+//        | <backref>
+func (rst *rustState) demangleType() {
+       if len(rst.str) < 1 {
+               rst.fail("expected type")
+       }
+       c := rst.str[0]
+       if c >= 'a' && c <= 'z' {
+               rst.basicType()
+               return
+       }
+       switch c {
+       case 'C', 'M', 'X', 'Y', 'N', 'I':
+               rst.path(false)
+       case 'A', 'S':
+               rst.advance(1)
+               rst.writeByte('[')
+               rst.demangleType()
+               if c == 'A' {
+                       rst.writeString("; ")
+                       rst.demangleConst()
+               }
+               rst.writeByte(']')
+       case 'T':
+               rst.advance(1)
+               rst.writeByte('(')
+               c := 0
+               for len(rst.str) > 0 && rst.str[0] != 'E' {
+                       if c > 0 {
+                               rst.writeString(", ")
+                       }
+                       c++
+                       rst.demangleType()
+               }
+               if c == 1 {
+                       rst.writeByte(',')
+               }
+               rst.writeByte(')')
+               rst.checkChar('E')
+       case 'R', 'Q':
+               rst.advance(1)
+               rst.writeByte('&')
+               if len(rst.str) > 0 && rst.str[0] == 'L' {
+                       rst.advance(1)
+                       if lifetime := rst.base62Number(); lifetime > 0 {
+                               rst.writeLifetime(lifetime)
+                               rst.writeByte(' ')
+                       }
+               }
+               if c == 'Q' {
+                       rst.writeString("mut ")
+               }
+               rst.demangleType()
+       case 'P':
+               rst.advance(1)
+               rst.writeString("*const ")
+               rst.demangleType()
+       case 'O':
+               rst.advance(1)
+               rst.writeString("*mut ")
+               rst.demangleType()
+       case 'F':
+               rst.advance(1)
+               hold := rst.lifetimes
+               rst.fnSig()
+               rst.lifetimes = hold
+       case 'D':
+               rst.advance(1)
+               hold := rst.lifetimes
+               rst.dynBounds()
+               rst.lifetimes = hold
+               if len(rst.str) == 0 || rst.str[0] != 'L' {
+                       rst.fail("expected L")
+               }
+               rst.advance(1)
+               if lifetime := rst.base62Number(); lifetime > 0 {
+                       if rst.last != ' ' {
+                               rst.writeByte(' ')
+                       }
+                       rst.writeString("+ ")
+                       rst.writeLifetime(lifetime)
+               }
+       case 'B':
+               rst.backref(rst.demangleType)
+       default:
+               rst.fail("unrecognized character in type")
+       }
+}
+
+var rustBasicTypes = map[byte]string{
+       'a': "i8",
+       'b': "bool",
+       'c': "char",
+       'd': "f64",
+       'e': "str",
+       'f': "f32",
+       'h': "u8",
+       'i': "isize",
+       'j': "usize",
+       'l': "i32",
+       'm': "u32",
+       'n': "i128",
+       'o': "u128",
+       'p': "_",
+       's': "i16",
+       't': "u16",
+       'u': "()",
+       'v': "...",
+       'x': "i64",
+       'y': "u64",
+       'z': "!",
+}
+
+// <basic-type>
+func (rst *rustState) basicType() {
+       if len(rst.str) < 1 {
+               rst.fail("expected basic type")
+       }
+       str, ok := rustBasicTypes[rst.str[0]]
+       if !ok {
+               rst.fail("unrecognized basic type character")
+       }
+       rst.advance(1)
+       rst.writeString(str)
+}
+
+// <fn-sig> = [<binder>] ["U"] ["K" <abi>] {<type>} "E" <type>
+// <abi> = "C"
+//       | <undisambiguated-identifier>
+func (rst *rustState) fnSig() {
+       rst.binder()
+       if len(rst.str) > 0 && rst.str[0] == 'U' {
+               rst.advance(1)
+               rst.writeString("unsafe ")
+       }
+       if len(rst.str) > 0 && rst.str[0] == 'K' {
+               rst.advance(1)
+               if len(rst.str) > 0 && rst.str[0] == 'C' {
+                       rst.advance(1)
+                       rst.writeString(`extern "C" `)
+               } else {
+                       rst.writeString(`extern "`)
+                       id := rst.undisambiguatedIdentifier()
+                       id = strings.ReplaceAll(id, "_", "-")
+                       rst.writeString(id)
+                       rst.writeString(`" `)
+               }
+       }
+       rst.writeString("fn(")
+       first := true
+       for len(rst.str) > 0 && rst.str[0] != 'E' {
+               if first {
+                       first = false
+               } else {
+                       rst.writeString(", ")
+               }
+               rst.demangleType()
+       }
+       rst.checkChar('E')
+       rst.writeByte(')')
+       if len(rst.str) > 0 && rst.str[0] == 'u' {
+               rst.advance(1)
+       } else {
+               rst.writeString(" -> ")
+               rst.demangleType()
+       }
+}
+
+// <dyn-bounds> = [<binder>] {<dyn-trait>} "E"
+func (rst *rustState) dynBounds() {
+       rst.writeString("dyn ")
+       rst.binder()
+       first := true
+       for len(rst.str) > 0 && rst.str[0] != 'E' {
+               if first {
+                       first = false
+               } else {
+                       rst.writeString(" + ")
+               }
+               rst.dynTrait()
+       }
+       rst.checkChar('E')
+}
+
+// <dyn-trait> = <path> {<dyn-trait-assoc-binding>}
+// <dyn-trait-assoc-binding> = "p" <undisambiguated-identifier> <type>
+func (rst *rustState) dynTrait() {
+       started := rst.pathStartGenerics()
+       for len(rst.str) > 0 && rst.str[0] == 'p' {
+               rst.advance(1)
+               if started {
+                       rst.writeString(", ")
+               } else {
+                       rst.writeByte('<')
+                       started = true
+               }
+               rst.writeString(rst.undisambiguatedIdentifier())
+               rst.writeString(" = ")
+               rst.demangleType()
+       }
+       if started {
+               rst.writeByte('>')
+       }
+}
+
+// pathStartGenerics is like path but if it sees an I to start generic
+// arguments it won't close them. It reports whether it started generics.
+func (rst *rustState) pathStartGenerics() bool {
+       if len(rst.str) < 1 {
+               rst.fail("expected path")
+       }
+       switch rst.str[0] {
+       case 'I':
+               rst.advance(1)
+               rst.path(false)
+               rst.writeByte('<')
+               first := true
+               for len(rst.str) > 0 && rst.str[0] != 'E' {
+                       if first {
+                               first = false
+                       } else {
+                               rst.writeString(", ")
+                       }
+                       rst.genericArg()
+               }
+               rst.checkChar('E')
+               return true
+       case 'B':
+               var started bool
+               rst.backref(func() { started = rst.pathStartGenerics() })
+               return started
+       default:
+               rst.path(false)
+               return false
+       }
+}
+
+// writeLifetime writes out a lifetime binding.
+func (rst *rustState) writeLifetime(lifetime int64) {
+       rst.writeByte('\'')
+       if lifetime == 0 {
+               rst.writeByte('_')
+               return
+       }
+       depth := rst.lifetimes - lifetime
+       if depth < 0 {
+               rst.fail("invalid lifetime")
+       } else if depth < 26 {
+               rst.writeByte('a' + byte(depth))
+       } else {
+               rst.writeByte('z')
+               if !rst.skip {
+                       fmt.Fprintf(&rst.buf, "%d", depth-26+1)
+                       rst.last = '0'
+               }
+       }
+}
+
+// <const> = <type> <const-data>
+//         | "p" // placeholder, shown as _
+//         | <backref>
+// <const-data> = ["n"] {<hex-digit>} "_"
+func (rst *rustState) demangleConst() {
+       if len(rst.str) < 1 {
+               rst.fail("expected constant")
+       }
+
+       if rst.str[0] == 'B' {
+               rst.backref(rst.demangleConst)
+               return
+       }
+
+       if rst.str[0] == 'p' {
+               rst.advance(1)
+               rst.writeByte('_')
+               return
+       }
+
+       typ := rst.str[0]
+
+       const (
+               invalid = iota
+               signedInt
+               unsignedInt
+               boolean
+               character
+       )
+
+       var kind int
+       switch typ {
+       case 'a', 's', 'l', 'x', 'n', 'i':
+               kind = signedInt
+       case 'h', 't', 'm', 'y', 'o', 'j':
+               kind = unsignedInt
+       case 'b':
+               kind = boolean
+       case 'c':
+               kind = character
+       default:
+               rst.fail("unrecognized constant type")
+       }
+
+       rst.advance(1)
+
+       if kind == signedInt && len(rst.str) > 0 && rst.str[0] == 'n' {
+               rst.advance(1)
+               rst.writeByte('-')
+       }
+
+       start := rst.str
+       digits := 0
+       val := uint64(0)
+digitLoop:
+       for len(rst.str) > 0 {
+               c := rst.str[0]
+               var digit uint64
+               switch {
+               case c >= '0' && c <= '9':
+                       digit = uint64(c - '0')
+               case c >= 'a' && c <= 'f':
+                       digit = uint64(c - 'a' + 10)
+               case c == '_':
+                       rst.advance(1)
+                       break digitLoop
+               default:
+                       rst.fail("expected hex digit or _")
+               }
+               rst.advance(1)
+               if val == 0 && digit == 0 && (len(rst.str) == 0 || rst.str[0] != '_') {
+                       rst.fail("invalid leading 0 in constant")
+               }
+               val *= 16
+               val += digit
+               digits++
+       }
+
+       if digits == 0 {
+               rst.fail("expected constant")
+       }
+
+       switch kind {
+       case signedInt, unsignedInt:
+               if digits > 16 {
+                       // Value too big, just write out the string.
+                       rst.writeString("0x")
+                       rst.writeString(start[:digits])
+               } else {
+                       if !rst.skip {
+                               fmt.Fprintf(&rst.buf, "%d", val)
+                               rst.last = '0'
+                       }
+               }
+       case boolean:
+               if digits > 1 {
+                       rst.fail("boolean value too large")
+               } else if val == 0 {
+                       rst.writeString("false")
+               } else if val == 1 {
+                       rst.writeString("true")
+               } else {
+                       rst.fail("invalid boolean value")
+               }
+       case character:
+               if digits > 6 {
+                       rst.fail("character value too large")
+               }
+               rst.writeByte('\'')
+               if val == '\t' {
+                       rst.writeString(`\t`)
+               } else if val == '\r' {
+                       rst.writeString(`\r`)
+               } else if val == '\n' {
+                       rst.writeString(`\n`)
+               } else if val == '\\' {
+                       rst.writeString(`\\`)
+               } else if val == '\'' {
+                       rst.writeString(`\'`)
+               } else if val >= ' ' && val <= '~' {
+                       // printable ASCII character
+                       rst.writeByte(byte(val))
+               } else {
+                       if !rst.skip {
+                               fmt.Fprintf(&rst.buf, `\u{%x}`, val)
+                               rst.last = '}'
+                       }
+               }
+               rst.writeByte('\'')
+       default:
+               panic("internal error")
+       }
+}
+
+// <base-62-number> = {<0-9a-zA-Z>} "_"
+func (rst *rustState) base62Number() int64 {
+       if len(rst.str) > 0 && rst.str[0] == '_' {
+               rst.advance(1)
+               return 0
+       }
+       val := int64(0)
+       for len(rst.str) > 0 {
+               c := rst.str[0]
+               rst.advance(1)
+               if c == '_' {
+                       return val + 1
+               }
+               val *= 62
+               if c >= '0' && c <= '9' {
+                       val += int64(c - '0')
+               } else if c >= 'a' && c <= 'z' {
+                       val += int64(c - 'a' + 10)
+               } else if c >= 'A' && c <= 'Z' {
+                       val += int64(c - 'A' + 36)
+               } else {
+                       rst.fail("invalid digit in base 62 number")
+               }
+       }
+       rst.fail("expected _ after base 62 number")
+       return 0
+}
+
+// <backref> = "B" <base-62-number>
+func (rst *rustState) backref(demangle func()) {
+       backoff := rst.off
+
+       rst.checkChar('B')
+       idx64 := rst.base62Number()
+
+       if rst.skip {
+               return
+       }
+
+       idx := int(idx64)
+       if int64(idx) != idx64 {
+               rst.fail("backref index overflow")
+       }
+       if idx < 0 || idx >= backoff {
+               rst.fail("invalid backref index")
+       }
+
+       holdStr := rst.str
+       holdOff := rst.off
+       rst.str = rst.orig[idx:backoff]
+       rst.off = idx
+       defer func() {
+               rst.str = holdStr
+               rst.off = holdOff
+       }()
+
+       demangle()
+}
+
+func (rst *rustState) decimalNumber() int {
+       if len(rst.str) == 0 {
+               rst.fail("expected number")
+       }
+
+       val := 0
+       for len(rst.str) > 0 && isDigit(rst.str[0]) {
+               add := int(rst.str[0] - '0')
+               if val >= math.MaxInt32/10-add {
+                       rst.fail("decimal number overflow")
+               }
+               val *= 10
+               val += add
+               rst.advance(1)
+       }
+       return val
+}
+
+// oldRustToString demangles a Rust symbol using the old demangling.
+// The second result reports whether this is a valid Rust mangled name.
+func oldRustToString(name string, options []Option) (string, bool) {
+       // We know that the string starts with _ZN.
+       name = name[3:]
+
+       hexDigit := func(c byte) (byte, bool) {
+               switch {
+               case c >= '0' && c <= '9':
+                       return c - '0', true
+               case c >= 'a' && c <= 'f':
+                       return c - 'a' + 10, true
+               default:
+                       return 0, false
+               }
+       }
+
+       // We know that the strings end with "17h" followed by 16 characters
+       // followed by "E". We check that the 16 characters are all hex digits.
+       // Also the hex digits must contain at least 5 distinct digits.
+       seen := uint16(0)
+       for i := len(name) - 17; i < len(name) - 1; i++ {
+               digit, ok := hexDigit(name[i])
+               if !ok {
+                       return "", false
+               }
+               seen |= 1 << digit
+       }
+       if bits.OnesCount16(seen) < 5 {
+               return "", false
+       }
+       name = name[:len(name)-20]
+
+       // The name is a sequence of length-preceded identifiers.
+       var sb strings.Builder
+       for len(name) > 0 {
+               if !isDigit(name[0]) {
+                       return "", false
+               }
+
+               val := 0
+               for len(name) > 0 && isDigit(name[0]) {
+                       add := int(name[0] - '0')
+                       if val >= math.MaxInt32/10-add {
+                               return "", false
+                       }
+                       val *= 10
+                       val += add
+                       name = name[1:]
+               }
+
+               // An optional trailing underscore can separate the
+               // length from the identifier.
+               if len(name) > 0 && name[0] == '_' {
+                       name = name[1:]
+                       val--
+               }
+
+               if len(name) < val {
+                       return "", false
+               }
+
+               id := name[:val]
+               name = name[val:]
+
+               if sb.Len() > 0 {
+                       sb.WriteString("::")
+               }
+
+               // Ignore leading underscores preceding escape sequences.
+               if strings.HasPrefix(id, "_$") {
+                       id = id[1:]
+               }
+
+               // The identifier can have escape sequences.
+       escape:
+               for len(id) > 0 {
+                       switch c := id[0]; c {
+                       case '$':
+                               codes := map[string]byte {
+                                       "SP": '@',
+                                       "BP": '*',
+                                       "RF": '&',
+                                       "LT": '<',
+                                       "GT": '>',
+                                       "LP": '(',
+                                       "RP": ')',
+                               }
+
+                               valid := true
+                               if len(id) > 2 && id[1] == 'C' && id[2] == '$' {
+                                       sb.WriteByte(',')
+                                       id = id[3:]
+                               } else if len(id) > 4 && id[1] == 'u' && id[4] == '$' {
+                                       dig1, ok1 := hexDigit(id[2])
+                                       dig2, ok2 := hexDigit(id[3])
+                                       val := (dig1 << 4) | dig2
+                                       if !ok1 || !ok2 || dig1 > 7 || val < ' ' {
+                                               valid = false
+                                       } else {
+                                               sb.WriteByte(val)
+                                               id = id[5:]
+                                       }
+                               } else if len(id) > 3 && id[3] == '$' {
+                                       if code, ok := codes[id[1:3]]; !ok {
+                                               valid = false
+                                       } else {
+                                               sb.WriteByte(code)
+                                               id = id[4:]
+                                       }
+                               } else {
+                                       valid = false
+                               }
+                               if !valid {
+                                       sb.WriteString(id)
+                                       break escape
+                               }
+                       case '.':
+                               if strings.HasPrefix(id, "..") {
+                                       sb.WriteString("::")
+                                       id = id[2:]
+                               } else {
+                                       sb.WriteByte(c)
+                                       id = id[1:]
+                               }
+                       default:
+                               sb.WriteByte(c)
+                               id = id[1:]
+                       }
+               }
+       }
+
+       return sb.String(), true
+}
index 0bcb8c32260d5501c6f9eb64985aa3a8e074f6f1..a74ef58f8c62d289b36f68eb29737e0f6fe8cd4d 100644 (file)
@@ -54,7 +54,7 @@ includes_AIX='
 
 includes_Darwin='
 #define _DARWIN_C_SOURCE
-#define KERNEL
+#define KERNEL 1
 #define _DARWIN_USE_64_BIT_INODE
 #define __APPLE_USE_RFC_3542
 #include <stdint.h>
@@ -75,6 +75,7 @@ includes_Darwin='
 #include <sys/utsname.h>
 #include <sys/wait.h>
 #include <sys/xattr.h>
+#include <sys/vsock.h>
 #include <net/bpf.h>
 #include <net/if.h>
 #include <net/if_types.h>
@@ -82,6 +83,9 @@ includes_Darwin='
 #include <netinet/in.h>
 #include <netinet/ip.h>
 #include <termios.h>
+
+// for backwards compatibility because moved TIOCREMOTE to Kernel.framework after MacOSX12.0.sdk.
+#define TIOCREMOTE 0x80047469
 '
 
 includes_DragonFly='
@@ -229,6 +233,7 @@ struct ltchars {
 #include <linux/input.h>
 #include <linux/kexec.h>
 #include <linux/keyctl.h>
+#include <linux/landlock.h>
 #include <linux/loop.h>
 #include <linux/lwtunnel.h>
 #include <linux/magic.h>
@@ -465,7 +470,6 @@ ccflags="$@"
                $2 !~ /^EQUIV_/ &&
                $2 !~ /^EXPR_/ &&
                $2 !~ /^EVIOC/ &&
-               $2 !~ /^EV_/ &&
                $2 ~ /^E[A-Z0-9_]+$/ ||
                $2 ~ /^B[0-9_]+$/ ||
                $2 ~ /^(OLD|NEW)DEV$/ ||
@@ -497,6 +501,7 @@ ccflags="$@"
                $2 ~ /^O?XTABS$/ ||
                $2 ~ /^TC[IO](ON|OFF)$/ ||
                $2 ~ /^IN_/ ||
+               $2 ~ /^LANDLOCK_/ ||
                $2 ~ /^LOCK_(SH|EX|NB|UN)$/ ||
                $2 ~ /^LO_(KEY|NAME)_SIZE$/ ||
                $2 ~ /^LOOP_(CLR|CTL|GET|SET)_/ ||
index 23f6b57606b4efe0c00835c9d1d3548f667cf847..a8c13317d75d55c781ebaed986eea1b0fcf0e716 100644 (file)
@@ -48,6 +48,30 @@ func (sa *SockaddrCtl) sockaddr() (unsafe.Pointer, _Socklen, error) {
        return unsafe.Pointer(&sa.raw), SizeofSockaddrCtl, nil
 }
 
+// SockaddrVM implements the Sockaddr interface for AF_VSOCK type sockets.
+// SockaddrVM provides access to Darwin VM sockets: a mechanism that enables
+// bidirectional communication between a hypervisor and its guest virtual
+// machines.
+type SockaddrVM struct {
+       // CID and Port specify a context ID and port address for a VM socket.
+       // Guests have a unique CID, and hosts may have a well-known CID of:
+       //  - VMADDR_CID_HYPERVISOR: refers to the hypervisor process.
+       //  - VMADDR_CID_LOCAL: refers to local communication (loopback).
+       //  - VMADDR_CID_HOST: refers to other processes on the host.
+       CID  uint32
+       Port uint32
+       raw  RawSockaddrVM
+}
+
+func (sa *SockaddrVM) sockaddr() (unsafe.Pointer, _Socklen, error) {
+       sa.raw.Len = SizeofSockaddrVM
+       sa.raw.Family = AF_VSOCK
+       sa.raw.Port = sa.Port
+       sa.raw.Cid = sa.CID
+
+       return unsafe.Pointer(&sa.raw), SizeofSockaddrVM, nil
+}
+
 func anyToSockaddrGOOS(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
        switch rsa.Addr.Family {
        case AF_SYSTEM:
@@ -58,6 +82,13 @@ func anyToSockaddrGOOS(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
                        sa.Unit = pp.Sc_unit
                        return sa, nil
                }
+       case AF_VSOCK:
+               pp := (*RawSockaddrVM)(unsafe.Pointer(rsa))
+               sa := &SockaddrVM{
+                       CID:  pp.Cid,
+                       Port: pp.Port,
+               }
+               return sa, nil
        }
        return nil, EAFNOSUPPORT
 }
@@ -433,6 +464,11 @@ func SysctlKinfoProcSlice(name string) ([]KinfoProc, error) {
 
 //sys  sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error)
 
+//sys  shmat(id int, addr uintptr, flag int) (ret uintptr, err error)
+//sys  shmctl(id int, cmd int, buf *SysvShmDesc) (result int, err error)
+//sys  shmdt(addr uintptr) (err error)
+//sys  shmget(key int, size int, flag int) (id int, err error)
+
 /*
  * Exposed directly
  */
@@ -590,10 +626,6 @@ func SysctlKinfoProcSlice(name string) ([]KinfoProc, error) {
 // Msgget
 // Msgsnd
 // Msgrcv
-// Shmat
-// Shmctl
-// Shmdt
-// Shmget
 // Shm_open
 // Shm_unlink
 // Sem_open
index 8c535768352743581bf0de05566e7a84c8480de6..8d5f294c425047719923573422cc5e4f6c383b98 100644 (file)
@@ -162,6 +162,14 @@ func (l *Lifreq) GetLifruInt() int {
        return *(*int)(unsafe.Pointer(&l.Lifru[0]))
 }
 
+func (l *Lifreq) SetLifruUint(d uint) {
+       *(*uint)(unsafe.Pointer(&l.Lifru[0])) = d
+}
+
+func (l *Lifreq) GetLifruUint() uint {
+       return *(*uint)(unsafe.Pointer(&l.Lifru[0]))
+}
+
 func IoctlLifreq(fd int, req uint, l *Lifreq) error {
        return ioctl(fd, req, uintptr(unsafe.Pointer(l)))
 }
index 2839435e3db398b205fe68ca4542f06928644552..fff38a84c9c4dafc06c469b77d77186778bb9e02 100644 (file)
@@ -13,7 +13,6 @@ package unix
 
 import (
        "encoding/binary"
-       "runtime"
        "syscall"
        "unsafe"
 )
@@ -38,6 +37,13 @@ func Creat(path string, mode uint32) (fd int, err error) {
        return Open(path, O_CREAT|O_WRONLY|O_TRUNC, mode)
 }
 
+func EpollCreate(size int) (fd int, err error) {
+       if size <= 0 {
+               return -1, EINVAL
+       }
+       return EpollCreate1(0)
+}
+
 //sys  FanotifyInit(flags uint, event_f_flags uint) (fd int, err error)
 //sys  fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error)
 
@@ -66,6 +72,10 @@ func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
        return fchmodat(dirfd, path, mode)
 }
 
+func InotifyInit() (fd int, err error) {
+       return InotifyInit1(0)
+}
+
 //sys  ioctl(fd int, req uint, arg uintptr) (err error) = SYS_IOCTL
 //sys  ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) = SYS_IOCTL
 
@@ -109,6 +119,23 @@ func Openat2(dirfd int, path string, how *OpenHow) (fd int, err error) {
        return openat2(dirfd, path, how, SizeofOpenHow)
 }
 
+func Pipe(p []int) error {
+       return Pipe2(p, 0)
+}
+
+//sysnb        pipe2(p *[2]_C_int, flags int) (err error)
+
+func Pipe2(p []int, flags int) error {
+       if len(p) != 2 {
+               return EINVAL
+       }
+       var pp [2]_C_int
+       err := pipe2(&pp, flags)
+       p[0] = int(pp[0])
+       p[1] = int(pp[1])
+       return err
+}
+
 //sys  ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error)
 
 func Ppoll(fds []PollFd, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
@@ -118,6 +145,15 @@ func Ppoll(fds []PollFd, timeout *Timespec, sigmask *Sigset_t) (n int, err error
        return ppoll(&fds[0], len(fds), timeout, sigmask)
 }
 
+func Poll(fds []PollFd, timeout int) (n int, err error) {
+       var ts *Timespec
+       if timeout >= 0 {
+               ts = new(Timespec)
+               *ts = NsecToTimespec(int64(timeout) * 1e6)
+       }
+       return Ppoll(fds, ts, nil)
+}
+
 //sys  Readlinkat(dirfd int, path string, buf []byte) (n int, err error)
 
 func Readlink(path string, buf []byte) (n int, err error) {
@@ -168,27 +204,7 @@ func Utimes(path string, tv []Timeval) error {
 //sys  utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error)
 
 func UtimesNano(path string, ts []Timespec) error {
-       if ts == nil {
-               err := utimensat(AT_FDCWD, path, nil, 0)
-               if err != ENOSYS {
-                       return err
-               }
-               return utimes(path, nil)
-       }
-       if len(ts) != 2 {
-               return EINVAL
-       }
-       err := utimensat(AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0)
-       if err != ENOSYS {
-               return err
-       }
-       // If the utimensat syscall isn't available (utimensat was added to Linux
-       // in 2.6.22, Released, 8 July 2007) then fall back to utimes
-       var tv [2]Timeval
-       for i := 0; i < 2; i++ {
-               tv[i] = NsecToTimeval(TimespecToNsec(ts[i]))
-       }
-       return utimes(path, (*[2]Timeval)(unsafe.Pointer(&tv[0])))
+       return UtimesNanoAt(AT_FDCWD, path, ts, 0)
 }
 
 func UtimesNanoAt(dirfd int, path string, ts []Timespec, flags int) error {
@@ -1229,11 +1245,7 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
 func Accept(fd int) (nfd int, sa Sockaddr, err error) {
        var rsa RawSockaddrAny
        var len _Socklen = SizeofSockaddrAny
-       // Try accept4 first for Android, then try accept for kernel older than 2.6.28
        nfd, err = accept4(fd, &rsa, &len, 0)
-       if err == ENOSYS {
-               nfd, err = accept(fd, &rsa, &len)
-       }
        if err != nil {
                return
        }
@@ -1816,11 +1828,7 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
 //sys  Dup(oldfd int) (fd int, err error)
 
 func Dup2(oldfd, newfd int) error {
-       // Android O and newer blocks dup2; riscv and arm64 don't implement dup2.
-       if runtime.GOOS == "android" || runtime.GOARCH == "riscv64" || runtime.GOARCH == "arm64" {
-               return Dup3(oldfd, newfd, 0)
-       }
-       return dup2(oldfd, newfd)
+       return Dup3(oldfd, newfd, 0)
 }
 
 //sys  Dup3(oldfd int, newfd int, flags int) (err error)
@@ -2308,6 +2316,14 @@ type RemoteIovec struct {
 //sys  ProcessVMReadv(pid int, localIov []Iovec, remoteIov []RemoteIovec, flags uint) (n int, err error) = SYS_PROCESS_VM_READV
 //sys  ProcessVMWritev(pid int, localIov []Iovec, remoteIov []RemoteIovec, flags uint) (n int, err error) = SYS_PROCESS_VM_WRITEV
 
+//sys  PidfdOpen(pid int, flags int) (fd int, err error) = SYS_PIDFD_OPEN
+//sys  PidfdGetfd(pidfd int, targetfd int, flags int) (fd int, err error) = SYS_PIDFD_GETFD
+
+//sys  shmat(id int, addr uintptr, flag int) (ret uintptr, err error)
+//sys  shmctl(id int, cmd int, buf *SysvShmDesc) (result int, err error)
+//sys  shmdt(addr uintptr) (err error)
+//sys  shmget(key int, size int, flag int) (id int, err error)
+
 /*
  * Unimplemented
  */
@@ -2389,10 +2405,6 @@ type RemoteIovec struct {
 // SetRobustList
 // SetThreadArea
 // SetTidAddress
-// Shmat
-// Shmctl
-// Shmdt
-// Shmget
 // Sigaltstack
 // Swapoff
 // Swapon
index 91317d749a9b6efd488bb613dd0d7fcde9834f8a..5f757e8aa770632541210c36ba7dd9e1f600924a 100644 (file)
@@ -19,36 +19,8 @@ func setTimeval(sec, usec int64) Timeval {
        return Timeval{Sec: int32(sec), Usec: int32(usec)}
 }
 
-//sysnb        pipe(p *[2]_C_int) (err error)
-
-func Pipe(p []int) (err error) {
-       if len(p) != 2 {
-               return EINVAL
-       }
-       var pp [2]_C_int
-       err = pipe(&pp)
-       p[0] = int(pp[0])
-       p[1] = int(pp[1])
-       return
-}
-
-//sysnb        pipe2(p *[2]_C_int, flags int) (err error)
-
-func Pipe2(p []int, flags int) (err error) {
-       if len(p) != 2 {
-               return EINVAL
-       }
-       var pp [2]_C_int
-       err = pipe2(&pp, flags)
-       p[0] = int(pp[0])
-       p[1] = int(pp[1])
-       return
-}
-
 // 64-bit file system and 32-bit uid calls
 // (386 default is 32-bit file system and 16-bit uid).
-//sys  dup2(oldfd int, newfd int) (err error)
-//sysnb        EpollCreate(size int) (fd int, err error)
 //sys  EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
 //sys  Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64_64
 //sys  Fchown(fd int, uid int, gid int) (err error) = SYS_FCHOWN32
@@ -59,7 +31,6 @@ func Pipe2(p []int, flags int) (err error) {
 //sysnb        Geteuid() (euid int) = SYS_GETEUID32
 //sysnb        Getgid() (gid int) = SYS_GETGID32
 //sysnb        Getuid() (uid int) = SYS_GETUID32
-//sysnb        InotifyInit() (fd int, err error)
 //sys  Ioperm(from int, num int, on int) (err error)
 //sys  Iopl(level int) (err error)
 //sys  Lchown(path string, uid int, gid int) (err error) = SYS_LCHOWN32
@@ -381,12 +352,3 @@ func (cmsg *Cmsghdr) SetLen(length int) {
 func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
        rsa.Service_name_len = uint32(length)
 }
-
-//sys  poll(fds *PollFd, nfds int, timeout int) (n int, err error)
-
-func Poll(fds []PollFd, timeout int) (n int, err error) {
-       if len(fds) == 0 {
-               return poll(nil, 0, timeout)
-       }
-       return poll(&fds[0], len(fds), timeout)
-}
index 85cd97da094901dbffbdab48127e34fb5d2445c9..4299125aa7cca0af1a6a33b2e4596a2b6008ec58 100644 (file)
@@ -7,8 +7,6 @@
 
 package unix
 
-//sys  dup2(oldfd int, newfd int) (err error)
-//sysnb        EpollCreate(size int) (fd int, err error)
 //sys  EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
 //sys  Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
 //sys  Fchown(fd int, uid int, gid int) (err error)
@@ -21,17 +19,6 @@ package unix
 //sysnb        Getgid() (gid int)
 //sysnb        Getrlimit(resource int, rlim *Rlimit) (err error)
 //sysnb        Getuid() (uid int)
-//sysnb        inotifyInit() (fd int, err error)
-
-func InotifyInit() (fd int, err error) {
-       // First try inotify_init1, because Android's seccomp policy blocks the latter.
-       fd, err = InotifyInit1(0)
-       if err == ENOSYS {
-               fd, err = inotifyInit()
-       }
-       return
-}
-
 //sys  Ioperm(from int, num int, on int) (err error)
 //sys  Iopl(level int) (err error)
 //sys  Lchown(path string, uid int, gid int) (err error)
@@ -126,32 +113,6 @@ func setTimeval(sec, usec int64) Timeval {
        return Timeval{Sec: sec, Usec: usec}
 }
 
-//sysnb        pipe(p *[2]_C_int) (err error)
-
-func Pipe(p []int) (err error) {
-       if len(p) != 2 {
-               return EINVAL
-       }
-       var pp [2]_C_int
-       err = pipe(&pp)
-       p[0] = int(pp[0])
-       p[1] = int(pp[1])
-       return
-}
-
-//sysnb        pipe2(p *[2]_C_int, flags int) (err error)
-
-func Pipe2(p []int, flags int) (err error) {
-       if len(p) != 2 {
-               return EINVAL
-       }
-       var pp [2]_C_int
-       err = pipe2(&pp, flags)
-       p[0] = int(pp[0])
-       p[1] = int(pp[1])
-       return
-}
-
 func (r *PtraceRegs) PC() uint64 { return r.Rip }
 
 func (r *PtraceRegs) SetPC(pc uint64) { r.Rip = pc }
@@ -176,15 +137,6 @@ func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
        rsa.Service_name_len = uint64(length)
 }
 
-//sys  poll(fds *PollFd, nfds int, timeout int) (n int, err error)
-
-func Poll(fds []PollFd, timeout int) (n int, err error) {
-       if len(fds) == 0 {
-               return poll(nil, 0, timeout)
-       }
-       return poll(&fds[0], len(fds), timeout)
-}
-
 //sys  kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error)
 
 func KexecFileLoad(kernelFd int, initrdFd int, cmdline string, flags int) error {
index b961a620e942f233267df9a65c15ee4377f86a96..79edeb9cb14a5723c613901a13744acdf0a5daa2 100644 (file)
@@ -19,36 +19,6 @@ func setTimeval(sec, usec int64) Timeval {
        return Timeval{Sec: int32(sec), Usec: int32(usec)}
 }
 
-//sysnb        pipe(p *[2]_C_int) (err error)
-
-func Pipe(p []int) (err error) {
-       if len(p) != 2 {
-               return EINVAL
-       }
-       var pp [2]_C_int
-       // Try pipe2 first for Android O, then try pipe for kernel 2.6.23.
-       err = pipe2(&pp, 0)
-       if err == ENOSYS {
-               err = pipe(&pp)
-       }
-       p[0] = int(pp[0])
-       p[1] = int(pp[1])
-       return
-}
-
-//sysnb        pipe2(p *[2]_C_int, flags int) (err error)
-
-func Pipe2(p []int, flags int) (err error) {
-       if len(p) != 2 {
-               return EINVAL
-       }
-       var pp [2]_C_int
-       err = pipe2(&pp, flags)
-       p[0] = int(pp[0])
-       p[1] = int(pp[1])
-       return
-}
-
 func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
        newoffset, errno := seek(fd, offset, whence)
        if errno != 0 {
@@ -76,8 +46,6 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
 
 // 64-bit file system and 32-bit uid calls
 // (16-bit uid calls are not always supported in newer kernels)
-//sys  dup2(oldfd int, newfd int) (err error)
-//sysnb        EpollCreate(size int) (fd int, err error)
 //sys  EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
 //sys  Fchown(fd int, uid int, gid int) (err error) = SYS_FCHOWN32
 //sys  Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64
@@ -86,7 +54,6 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
 //sysnb        Geteuid() (euid int) = SYS_GETEUID32
 //sysnb        Getgid() (gid int) = SYS_GETGID32
 //sysnb        Getuid() (uid int) = SYS_GETUID32
-//sysnb        InotifyInit() (fd int, err error)
 //sys  Lchown(path string, uid int, gid int) (err error) = SYS_LCHOWN32
 //sys  Listen(s int, n int) (err error)
 //sys  Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64
@@ -260,15 +227,6 @@ func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
        rsa.Service_name_len = uint32(length)
 }
 
-//sys  poll(fds *PollFd, nfds int, timeout int) (n int, err error)
-
-func Poll(fds []PollFd, timeout int) (n int, err error) {
-       if len(fds) == 0 {
-               return poll(nil, 0, timeout)
-       }
-       return poll(&fds[0], len(fds), timeout)
-}
-
 //sys  armSyncFileRange(fd int, flags int, off int64, n int64) (err error) = SYS_ARM_SYNC_FILE_RANGE
 
 func SyncFileRange(fd int, off int64, n int64, flags int) error {
index 4b977ba44b27868a2fa9c7edfc5b5bfa668930cb..862890de29bf224582a6c89fa46fd67f4942e238 100644 (file)
@@ -9,13 +9,6 @@ package unix
 
 import "unsafe"
 
-func EpollCreate(size int) (fd int, err error) {
-       if size <= 0 {
-               return -1, EINVAL
-       }
-       return EpollCreate1(0)
-}
-
 //sys  EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) = SYS_EPOLL_PWAIT
 //sys  Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
 //sys  Fchown(fd int, uid int, gid int) (err error)
@@ -145,30 +138,6 @@ func utimes(path string, tv *[2]Timeval) (err error) {
        return utimensat(AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0)
 }
 
-func Pipe(p []int) (err error) {
-       if len(p) != 2 {
-               return EINVAL
-       }
-       var pp [2]_C_int
-       err = pipe2(&pp, 0)
-       p[0] = int(pp[0])
-       p[1] = int(pp[1])
-       return
-}
-
-//sysnb        pipe2(p *[2]_C_int, flags int) (err error)
-
-func Pipe2(p []int, flags int) (err error) {
-       if len(p) != 2 {
-               return EINVAL
-       }
-       var pp [2]_C_int
-       err = pipe2(&pp, flags)
-       p[0] = int(pp[0])
-       p[1] = int(pp[1])
-       return
-}
-
 // Getrlimit prefers the prlimit64 system call. See issue 38604.
 func Getrlimit(resource int, rlim *Rlimit) error {
        err := Prlimit(0, resource, nil, rlim)
@@ -211,31 +180,11 @@ func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
        rsa.Service_name_len = uint64(length)
 }
 
-func InotifyInit() (fd int, err error) {
-       return InotifyInit1(0)
-}
-
-// dup2 exists because func Dup3 in syscall_linux.go references
-// it in an unreachable path. dup2 isn't available on arm64.
-func dup2(oldfd int, newfd int) error
-
 func Pause() error {
        _, err := ppoll(nil, 0, nil, nil)
        return err
 }
 
-func Poll(fds []PollFd, timeout int) (n int, err error) {
-       var ts *Timespec
-       if timeout >= 0 {
-               ts = new(Timespec)
-               *ts = NsecToTimespec(int64(timeout) * 1e6)
-       }
-       if len(fds) == 0 {
-               return ppoll(nil, 0, ts, nil)
-       }
-       return ppoll(&fds[0], len(fds), ts, nil)
-}
-
 //sys  kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error)
 
 func KexecFileLoad(kernelFd int, initrdFd int, cmdline string, flags int) error {
index 27aee81d97d42aa56f4432a273f32f492f5bef31..8932e34ad2ad7ddc811c2eee83624a782fd5d659 100644 (file)
@@ -8,8 +8,6 @@
 
 package unix
 
-//sys  dup2(oldfd int, newfd int) (err error)
-//sysnb        EpollCreate(size int) (fd int, err error)
 //sys  EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
 //sys  Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
 //sys  Fchown(fd int, uid int, gid int) (err error)
@@ -94,30 +92,6 @@ func setTimeval(sec, usec int64) Timeval {
        return Timeval{Sec: sec, Usec: usec}
 }
 
-func Pipe(p []int) (err error) {
-       if len(p) != 2 {
-               return EINVAL
-       }
-       var pp [2]_C_int
-       err = pipe2(&pp, 0)
-       p[0] = int(pp[0])
-       p[1] = int(pp[1])
-       return
-}
-
-//sysnb        pipe2(p *[2]_C_int, flags int) (err error)
-
-func Pipe2(p []int, flags int) (err error) {
-       if len(p) != 2 {
-               return EINVAL
-       }
-       var pp [2]_C_int
-       err = pipe2(&pp, flags)
-       p[0] = int(pp[0])
-       p[1] = int(pp[1])
-       return
-}
-
 func Ioperm(from int, num int, on int) (err error) {
        return ENOSYS
 }
@@ -220,16 +194,3 @@ func (cmsg *Cmsghdr) SetLen(length int) {
 func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
        rsa.Service_name_len = uint64(length)
 }
-
-func InotifyInit() (fd int, err error) {
-       return InotifyInit1(0)
-}
-
-//sys  poll(fds *PollFd, nfds int, timeout int) (n int, err error)
-
-func Poll(fds []PollFd, timeout int) (n int, err error) {
-       if len(fds) == 0 {
-               return poll(nil, 0, timeout)
-       }
-       return poll(&fds[0], len(fds), timeout)
-}
index 21d74e2fbe5a44e49b397c88a69740fff416b436..7821c25d9f778fce7fc6452bef05193ed6ecd38d 100644 (file)
@@ -15,8 +15,6 @@ import (
 
 func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
 
-//sys  dup2(oldfd int, newfd int) (err error)
-//sysnb        EpollCreate(size int) (fd int, err error)
 //sys  EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
 //sys  Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
 //sys  Fchown(fd int, uid int, gid int) (err error)
@@ -60,7 +58,6 @@ func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr,
 //sys  recvmsg(s int, msg *Msghdr, flags int) (n int, err error)
 //sys  sendmsg(s int, msg *Msghdr, flags int) (n int, err error)
 
-//sysnb        InotifyInit() (fd int, err error)
 //sys  Ioperm(from int, num int, on int) (err error)
 //sys  Iopl(level int) (err error)
 
@@ -113,29 +110,6 @@ func setTimeval(sec, usec int64) Timeval {
        return Timeval{Sec: int32(sec), Usec: int32(usec)}
 }
 
-//sysnb        pipe2(p *[2]_C_int, flags int) (err error)
-
-func Pipe2(p []int, flags int) (err error) {
-       if len(p) != 2 {
-               return EINVAL
-       }
-       var pp [2]_C_int
-       err = pipe2(&pp, flags)
-       p[0] = int(pp[0])
-       p[1] = int(pp[1])
-       return
-}
-
-//sysnb        pipe() (p1 int, p2 int, err error)
-
-func Pipe(p []int) (err error) {
-       if len(p) != 2 {
-               return EINVAL
-       }
-       p[0], p[1], err = pipe()
-       return
-}
-
 //sys  mmap2(addr uintptr, length uintptr, prot int, flags int, fd int, pageOffset uintptr) (xaddr uintptr, err error)
 
 func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {
@@ -232,12 +206,3 @@ func (cmsg *Cmsghdr) SetLen(length int) {
 func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
        rsa.Service_name_len = uint32(length)
 }
-
-//sys  poll(fds *PollFd, nfds int, timeout int) (n int, err error)
-
-func Poll(fds []PollFd, timeout int) (n int, err error) {
-       if len(fds) == 0 {
-               return poll(nil, 0, timeout)
-       }
-       return poll(&fds[0], len(fds), timeout)
-}
index 6f1fc581ed60cc6569d75d66fc0d9153b3ce63c4..c5053a0f03fdc5414803a2cfc473b313bc379548 100644 (file)
@@ -12,8 +12,6 @@ import (
        "unsafe"
 )
 
-//sys  dup2(oldfd int, newfd int) (err error)
-//sysnb        EpollCreate(size int) (fd int, err error)
 //sys  EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
 //sys  Fchown(fd int, uid int, gid int) (err error)
 //sys  Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64
@@ -23,7 +21,6 @@ import (
 //sysnb        Geteuid() (euid int)
 //sysnb        Getgid() (gid int)
 //sysnb        Getuid() (uid int)
-//sysnb        InotifyInit() (fd int, err error)
 //sys  Ioperm(from int, num int, on int) (err error)
 //sys  Iopl(level int) (err error)
 //sys  Lchown(path string, uid int, gid int) (err error)
@@ -218,41 +215,6 @@ func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
        rsa.Service_name_len = uint32(length)
 }
 
-//sysnb        pipe(p *[2]_C_int) (err error)
-
-func Pipe(p []int) (err error) {
-       if len(p) != 2 {
-               return EINVAL
-       }
-       var pp [2]_C_int
-       err = pipe(&pp)
-       p[0] = int(pp[0])
-       p[1] = int(pp[1])
-       return
-}
-
-//sysnb        pipe2(p *[2]_C_int, flags int) (err error)
-
-func Pipe2(p []int, flags int) (err error) {
-       if len(p) != 2 {
-               return EINVAL
-       }
-       var pp [2]_C_int
-       err = pipe2(&pp, flags)
-       p[0] = int(pp[0])
-       p[1] = int(pp[1])
-       return
-}
-
-//sys  poll(fds *PollFd, nfds int, timeout int) (n int, err error)
-
-func Poll(fds []PollFd, timeout int) (n int, err error) {
-       if len(fds) == 0 {
-               return poll(nil, 0, timeout)
-       }
-       return poll(&fds[0], len(fds), timeout)
-}
-
 //sys  syncFileRange2(fd int, flags int, off int64, n int64) (err error) = SYS_SYNC_FILE_RANGE2
 
 func SyncFileRange(fd int, off int64, n int64, flags int) error {
index 5259a5feaf453d9540c92849be31ac098dae7f59..25786c4216b514abcda12d9d46d3040324da3b06 100644 (file)
@@ -8,8 +8,6 @@
 
 package unix
 
-//sys  dup2(oldfd int, newfd int) (err error)
-//sysnb        EpollCreate(size int) (fd int, err error)
 //sys  EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
 //sys  Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
 //sys  Fchown(fd int, uid int, gid int) (err error)
@@ -22,7 +20,6 @@ package unix
 //sysnb        Getgid() (gid int)
 //sysnb        Getrlimit(resource int, rlim *Rlimit) (err error) = SYS_UGETRLIMIT
 //sysnb        Getuid() (uid int)
-//sysnb        InotifyInit() (fd int, err error)
 //sys  Ioperm(from int, num int, on int) (err error)
 //sys  Iopl(level int) (err error)
 //sys  Lchown(path string, uid int, gid int) (err error)
@@ -104,41 +101,6 @@ func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
        rsa.Service_name_len = uint64(length)
 }
 
-//sysnb        pipe(p *[2]_C_int) (err error)
-
-func Pipe(p []int) (err error) {
-       if len(p) != 2 {
-               return EINVAL
-       }
-       var pp [2]_C_int
-       err = pipe(&pp)
-       p[0] = int(pp[0])
-       p[1] = int(pp[1])
-       return
-}
-
-//sysnb        pipe2(p *[2]_C_int, flags int) (err error)
-
-func Pipe2(p []int, flags int) (err error) {
-       if len(p) != 2 {
-               return EINVAL
-       }
-       var pp [2]_C_int
-       err = pipe2(&pp, flags)
-       p[0] = int(pp[0])
-       p[1] = int(pp[1])
-       return
-}
-
-//sys  poll(fds *PollFd, nfds int, timeout int) (n int, err error)
-
-func Poll(fds []PollFd, timeout int) (n int, err error) {
-       if len(fds) == 0 {
-               return poll(nil, 0, timeout)
-       }
-       return poll(&fds[0], len(fds), timeout)
-}
-
 //sys  syncFileRange2(fd int, flags int, off int64, n int64) (err error) = SYS_SYNC_FILE_RANGE2
 
 func SyncFileRange(fd int, off int64, n int64, flags int) error {
index 8ef821e5daa8376df8a1d45f8c7d1632981c5913..6f9f710414f0672420d101ee43f2e3dd43847828 100644 (file)
@@ -9,13 +9,6 @@ package unix
 
 import "unsafe"
 
-func EpollCreate(size int) (fd int, err error) {
-       if size <= 0 {
-               return -1, EINVAL
-       }
-       return EpollCreate1(0)
-}
-
 //sys  EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) = SYS_EPOLL_PWAIT
 //sys  Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
 //sys  Fchown(fd int, uid int, gid int) (err error)
@@ -144,30 +137,6 @@ func utimes(path string, tv *[2]Timeval) (err error) {
        return utimensat(AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0)
 }
 
-func Pipe(p []int) (err error) {
-       if len(p) != 2 {
-               return EINVAL
-       }
-       var pp [2]_C_int
-       err = pipe2(&pp, 0)
-       p[0] = int(pp[0])
-       p[1] = int(pp[1])
-       return
-}
-
-//sysnb        pipe2(p *[2]_C_int, flags int) (err error)
-
-func Pipe2(p []int, flags int) (err error) {
-       if len(p) != 2 {
-               return EINVAL
-       }
-       var pp [2]_C_int
-       err = pipe2(&pp, flags)
-       p[0] = int(pp[0])
-       p[1] = int(pp[1])
-       return
-}
-
 func (r *PtraceRegs) PC() uint64 { return r.Pc }
 
 func (r *PtraceRegs) SetPC(pc uint64) { r.Pc = pc }
@@ -192,27 +161,11 @@ func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
        rsa.Service_name_len = uint64(length)
 }
 
-func InotifyInit() (fd int, err error) {
-       return InotifyInit1(0)
-}
-
 func Pause() error {
        _, err := ppoll(nil, 0, nil, nil)
        return err
 }
 
-func Poll(fds []PollFd, timeout int) (n int, err error) {
-       var ts *Timespec
-       if timeout >= 0 {
-               ts = new(Timespec)
-               *ts = NsecToTimespec(int64(timeout) * 1e6)
-       }
-       if len(fds) == 0 {
-               return ppoll(nil, 0, ts, nil)
-       }
-       return ppoll(&fds[0], len(fds), ts, nil)
-}
-
 func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
        return Renameat2(olddirfd, oldpath, newdirfd, newpath, 0)
 }
@@ -229,7 +182,3 @@ func KexecFileLoad(kernelFd int, initrdFd int, cmdline string, flags int) error
        }
        return kexecFileLoad(kernelFd, initrdFd, cmdlineLen, cmdline, flags)
 }
-
-// dup2 exists because func Dup3 in syscall_linux.go references
-// it in an unreachable path. dup2 isn't available on arm64.
-func dup2(oldfd int, newfd int) error
index a1c0574b584ee9dc4260eb53bfb9f266f62d8776..6aa59cb270db00b3c7a79cecaab6e37c47c87f56 100644 (file)
@@ -11,8 +11,6 @@ import (
        "unsafe"
 )
 
-//sys  dup2(oldfd int, newfd int) (err error)
-//sysnb        EpollCreate(size int) (fd int, err error)
 //sys  EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
 //sys  Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
 //sys  Fchown(fd int, uid int, gid int) (err error)
@@ -25,7 +23,6 @@ import (
 //sysnb        Getgid() (gid int)
 //sysnb        Getrlimit(resource int, rlim *Rlimit) (err error)
 //sysnb        Getuid() (uid int)
-//sysnb        InotifyInit() (fd int, err error)
 //sys  Lchown(path string, uid int, gid int) (err error)
 //sys  Lstat(path string, stat *Stat_t) (err error)
 //sys  Pause() (err error)
@@ -77,30 +74,6 @@ func setTimeval(sec, usec int64) Timeval {
        return Timeval{Sec: sec, Usec: usec}
 }
 
-//sysnb        pipe2(p *[2]_C_int, flags int) (err error)
-
-func Pipe(p []int) (err error) {
-       if len(p) != 2 {
-               return EINVAL
-       }
-       var pp [2]_C_int
-       err = pipe2(&pp, 0) // pipe2 is the same as pipe when flags are set to 0.
-       p[0] = int(pp[0])
-       p[1] = int(pp[1])
-       return
-}
-
-func Pipe2(p []int, flags int) (err error) {
-       if len(p) != 2 {
-               return EINVAL
-       }
-       var pp [2]_C_int
-       err = pipe2(&pp, flags)
-       p[0] = int(pp[0])
-       p[1] = int(pp[1])
-       return
-}
-
 func Ioperm(from int, num int, on int) (err error) {
        return ENOSYS
 }
@@ -324,15 +297,6 @@ func Shutdown(s, how int) error {
        return nil
 }
 
-//sys  poll(fds *PollFd, nfds int, timeout int) (n int, err error)
-
-func Poll(fds []PollFd, timeout int) (n int, err error) {
-       if len(fds) == 0 {
-               return poll(nil, 0, timeout)
-       }
-       return poll(&fds[0], len(fds), timeout)
-}
-
 //sys  kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error)
 
 func KexecFileLoad(kernelFd int, initrdFd int, cmdline string, flags int) error {
index de14b8898390915f147233b95f9a7f30013117f0..bbe8d174f8c12ebbe0eb87a77b70ed73fcc49336 100644 (file)
@@ -9,7 +9,6 @@ package unix
 
 //sys  EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
 //sys  Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
-//sys  dup2(oldfd int, newfd int) (err error)
 //sys  Fchown(fd int, uid int, gid int) (err error)
 //sys  Fstat(fd int, stat *Stat_t) (err error)
 //sys  Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) = SYS_FSTATAT64
@@ -20,7 +19,6 @@ package unix
 //sysnb        Getgid() (gid int)
 //sysnb        Getrlimit(resource int, rlim *Rlimit) (err error)
 //sysnb        Getuid() (uid int)
-//sysnb        InotifyInit() (fd int, err error)
 //sys  Lchown(path string, uid int, gid int) (err error)
 //sys  Listen(s int, n int) (err error)
 //sys  Lstat(path string, stat *Stat_t) (err error)
@@ -119,38 +117,3 @@ func (cmsg *Cmsghdr) SetLen(length int) {
 func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
        rsa.Service_name_len = uint64(length)
 }
-
-//sysnb        pipe(p *[2]_C_int) (err error)
-
-func Pipe(p []int) (err error) {
-       if len(p) != 2 {
-               return EINVAL
-       }
-       var pp [2]_C_int
-       err = pipe(&pp)
-       p[0] = int(pp[0])
-       p[1] = int(pp[1])
-       return
-}
-
-//sysnb        pipe2(p *[2]_C_int, flags int) (err error)
-
-func Pipe2(p []int, flags int) (err error) {
-       if len(p) != 2 {
-               return EINVAL
-       }
-       var pp [2]_C_int
-       err = pipe2(&pp, flags)
-       p[0] = int(pp[0])
-       p[1] = int(pp[1])
-       return
-}
-
-//sys  poll(fds *PollFd, nfds int, timeout int) (n int, err error)
-
-func Poll(fds []PollFd, timeout int) (n int, err error) {
-       if len(fds) == 0 {
-               return poll(nil, 0, timeout)
-       }
-       return poll(&fds[0], len(fds), timeout)
-}
diff --git a/src/cmd/vendor/golang.org/x/sys/unix/sysvshm_linux.go b/src/cmd/vendor/golang.org/x/sys/unix/sysvshm_linux.go
new file mode 100644 (file)
index 0000000..2c3a443
--- /dev/null
@@ -0,0 +1,21 @@
+// Copyright 2021 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build linux
+// +build linux
+
+package unix
+
+import "runtime"
+
+// SysvShmCtl performs control operations on the shared memory segment
+// specified by id.
+func SysvShmCtl(id, cmd int, desc *SysvShmDesc) (result int, err error) {
+       if runtime.GOARCH == "arm" ||
+               runtime.GOARCH == "mips64" || runtime.GOARCH == "mips64le" {
+               cmd |= ipc_64
+       }
+
+       return shmctl(id, cmd, desc)
+}
diff --git a/src/cmd/vendor/golang.org/x/sys/unix/sysvshm_unix.go b/src/cmd/vendor/golang.org/x/sys/unix/sysvshm_unix.go
new file mode 100644 (file)
index 0000000..0bb4c8d
--- /dev/null
@@ -0,0 +1,61 @@
+// Copyright 2021 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build (darwin && !ios) || linux
+// +build darwin,!ios linux
+
+package unix
+
+import (
+       "unsafe"
+
+       "golang.org/x/sys/internal/unsafeheader"
+)
+
+// SysvShmAttach attaches the Sysv shared memory segment associated with the
+// shared memory identifier id.
+func SysvShmAttach(id int, addr uintptr, flag int) ([]byte, error) {
+       addr, errno := shmat(id, addr, flag)
+       if errno != nil {
+               return nil, errno
+       }
+
+       // Retrieve the size of the shared memory to enable slice creation
+       var info SysvShmDesc
+
+       _, err := SysvShmCtl(id, IPC_STAT, &info)
+       if err != nil {
+               // release the shared memory if we can't find the size
+
+               // ignoring error from shmdt as there's nothing sensible to return here
+               shmdt(addr)
+               return nil, err
+       }
+
+       // Use unsafe to convert addr into a []byte.
+       // TODO: convert to unsafe.Slice once we can assume Go 1.17
+       var b []byte
+       hdr := (*unsafeheader.Slice)(unsafe.Pointer(&b))
+       hdr.Data = unsafe.Pointer(addr)
+       hdr.Cap = int(info.Segsz)
+       hdr.Len = int(info.Segsz)
+       return b, nil
+}
+
+// SysvShmDetach unmaps the shared memory slice returned from SysvShmAttach.
+//
+// It is not safe to use the slice after calling this function.
+func SysvShmDetach(data []byte) error {
+       if len(data) == 0 {
+               return EINVAL
+       }
+
+       return shmdt(uintptr(unsafe.Pointer(&data[0])))
+}
+
+// SysvShmGet returns the Sysv shared memory identifier associated with key.
+// If the IPC_CREAT flag is specified a new segment is created.
+func SysvShmGet(key, size, flag int) (id int, err error) {
+       return shmget(key, size, flag)
+}
diff --git a/src/cmd/vendor/golang.org/x/sys/unix/sysvshm_unix_other.go b/src/cmd/vendor/golang.org/x/sys/unix/sysvshm_unix_other.go
new file mode 100644 (file)
index 0000000..71bddef
--- /dev/null
@@ -0,0 +1,14 @@
+// Copyright 2021 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build darwin && !ios
+// +build darwin,!ios
+
+package unix
+
+// SysvShmCtl performs control operations on the shared memory segment
+// specified by id.
+func SysvShmCtl(id, cmd int, desc *SysvShmDesc) (result int, err error) {
+       return shmctl(id, cmd, desc)
+}
index a3a45fec59501ad6aad9bef7392df81561707b48..476a1c7e77c52814aced93d4bf22f50bd36431d3 100644 (file)
@@ -12,1556 +12,1582 @@ package unix
 import "syscall"
 
 const (
-       AF_APPLETALK                      = 0x10
-       AF_CCITT                          = 0xa
-       AF_CHAOS                          = 0x5
-       AF_CNT                            = 0x15
-       AF_COIP                           = 0x14
-       AF_DATAKIT                        = 0x9
-       AF_DECnet                         = 0xc
-       AF_DLI                            = 0xd
-       AF_E164                           = 0x1c
-       AF_ECMA                           = 0x8
-       AF_HYLINK                         = 0xf
-       AF_IEEE80211                      = 0x25
-       AF_IMPLINK                        = 0x3
-       AF_INET                           = 0x2
-       AF_INET6                          = 0x1e
-       AF_IPX                            = 0x17
-       AF_ISDN                           = 0x1c
-       AF_ISO                            = 0x7
-       AF_LAT                            = 0xe
-       AF_LINK                           = 0x12
-       AF_LOCAL                          = 0x1
-       AF_MAX                            = 0x29
-       AF_NATM                           = 0x1f
-       AF_NDRV                           = 0x1b
-       AF_NETBIOS                        = 0x21
-       AF_NS                             = 0x6
-       AF_OSI                            = 0x7
-       AF_PPP                            = 0x22
-       AF_PUP                            = 0x4
-       AF_RESERVED_36                    = 0x24
-       AF_ROUTE                          = 0x11
-       AF_SIP                            = 0x18
-       AF_SNA                            = 0xb
-       AF_SYSTEM                         = 0x20
-       AF_SYS_CONTROL                    = 0x2
-       AF_UNIX                           = 0x1
-       AF_UNSPEC                         = 0x0
-       AF_UTUN                           = 0x26
-       AF_VSOCK                          = 0x28
-       ALTWERASE                         = 0x200
-       ATTR_BIT_MAP_COUNT                = 0x5
-       ATTR_CMN_ACCESSMASK               = 0x20000
-       ATTR_CMN_ACCTIME                  = 0x1000
-       ATTR_CMN_ADDEDTIME                = 0x10000000
-       ATTR_CMN_BKUPTIME                 = 0x2000
-       ATTR_CMN_CHGTIME                  = 0x800
-       ATTR_CMN_CRTIME                   = 0x200
-       ATTR_CMN_DATA_PROTECT_FLAGS       = 0x40000000
-       ATTR_CMN_DEVID                    = 0x2
-       ATTR_CMN_DOCUMENT_ID              = 0x100000
-       ATTR_CMN_ERROR                    = 0x20000000
-       ATTR_CMN_EXTENDED_SECURITY        = 0x400000
-       ATTR_CMN_FILEID                   = 0x2000000
-       ATTR_CMN_FLAGS                    = 0x40000
-       ATTR_CMN_FNDRINFO                 = 0x4000
-       ATTR_CMN_FSID                     = 0x4
-       ATTR_CMN_FULLPATH                 = 0x8000000
-       ATTR_CMN_GEN_COUNT                = 0x80000
-       ATTR_CMN_GRPID                    = 0x10000
-       ATTR_CMN_GRPUUID                  = 0x1000000
-       ATTR_CMN_MODTIME                  = 0x400
-       ATTR_CMN_NAME                     = 0x1
-       ATTR_CMN_NAMEDATTRCOUNT           = 0x80000
-       ATTR_CMN_NAMEDATTRLIST            = 0x100000
-       ATTR_CMN_OBJID                    = 0x20
-       ATTR_CMN_OBJPERMANENTID           = 0x40
-       ATTR_CMN_OBJTAG                   = 0x10
-       ATTR_CMN_OBJTYPE                  = 0x8
-       ATTR_CMN_OWNERID                  = 0x8000
-       ATTR_CMN_PARENTID                 = 0x4000000
-       ATTR_CMN_PAROBJID                 = 0x80
-       ATTR_CMN_RETURNED_ATTRS           = 0x80000000
-       ATTR_CMN_SCRIPT                   = 0x100
-       ATTR_CMN_SETMASK                  = 0x51c7ff00
-       ATTR_CMN_USERACCESS               = 0x200000
-       ATTR_CMN_UUID                     = 0x800000
-       ATTR_CMN_VALIDMASK                = 0xffffffff
-       ATTR_CMN_VOLSETMASK               = 0x6700
-       ATTR_FILE_ALLOCSIZE               = 0x4
-       ATTR_FILE_CLUMPSIZE               = 0x10
-       ATTR_FILE_DATAALLOCSIZE           = 0x400
-       ATTR_FILE_DATAEXTENTS             = 0x800
-       ATTR_FILE_DATALENGTH              = 0x200
-       ATTR_FILE_DEVTYPE                 = 0x20
-       ATTR_FILE_FILETYPE                = 0x40
-       ATTR_FILE_FORKCOUNT               = 0x80
-       ATTR_FILE_FORKLIST                = 0x100
-       ATTR_FILE_IOBLOCKSIZE             = 0x8
-       ATTR_FILE_LINKCOUNT               = 0x1
-       ATTR_FILE_RSRCALLOCSIZE           = 0x2000
-       ATTR_FILE_RSRCEXTENTS             = 0x4000
-       ATTR_FILE_RSRCLENGTH              = 0x1000
-       ATTR_FILE_SETMASK                 = 0x20
-       ATTR_FILE_TOTALSIZE               = 0x2
-       ATTR_FILE_VALIDMASK               = 0x37ff
-       ATTR_VOL_ALLOCATIONCLUMP          = 0x40
-       ATTR_VOL_ATTRIBUTES               = 0x40000000
-       ATTR_VOL_CAPABILITIES             = 0x20000
-       ATTR_VOL_DIRCOUNT                 = 0x400
-       ATTR_VOL_ENCODINGSUSED            = 0x10000
-       ATTR_VOL_FILECOUNT                = 0x200
-       ATTR_VOL_FSTYPE                   = 0x1
-       ATTR_VOL_INFO                     = 0x80000000
-       ATTR_VOL_IOBLOCKSIZE              = 0x80
-       ATTR_VOL_MAXOBJCOUNT              = 0x800
-       ATTR_VOL_MINALLOCATION            = 0x20
-       ATTR_VOL_MOUNTEDDEVICE            = 0x8000
-       ATTR_VOL_MOUNTFLAGS               = 0x4000
-       ATTR_VOL_MOUNTPOINT               = 0x1000
-       ATTR_VOL_NAME                     = 0x2000
-       ATTR_VOL_OBJCOUNT                 = 0x100
-       ATTR_VOL_QUOTA_SIZE               = 0x10000000
-       ATTR_VOL_RESERVED_SIZE            = 0x20000000
-       ATTR_VOL_SETMASK                  = 0x80002000
-       ATTR_VOL_SIGNATURE                = 0x2
-       ATTR_VOL_SIZE                     = 0x4
-       ATTR_VOL_SPACEAVAIL               = 0x10
-       ATTR_VOL_SPACEFREE                = 0x8
-       ATTR_VOL_UUID                     = 0x40000
-       ATTR_VOL_VALIDMASK                = 0xf007ffff
-       B0                                = 0x0
-       B110                              = 0x6e
-       B115200                           = 0x1c200
-       B1200                             = 0x4b0
-       B134                              = 0x86
-       B14400                            = 0x3840
-       B150                              = 0x96
-       B1800                             = 0x708
-       B19200                            = 0x4b00
-       B200                              = 0xc8
-       B230400                           = 0x38400
-       B2400                             = 0x960
-       B28800                            = 0x7080
-       B300                              = 0x12c
-       B38400                            = 0x9600
-       B4800                             = 0x12c0
-       B50                               = 0x32
-       B57600                            = 0xe100
-       B600                              = 0x258
-       B7200                             = 0x1c20
-       B75                               = 0x4b
-       B76800                            = 0x12c00
-       B9600                             = 0x2580
-       BIOCFLUSH                         = 0x20004268
-       BIOCGBLEN                         = 0x40044266
-       BIOCGDLT                          = 0x4004426a
-       BIOCGDLTLIST                      = 0xc00c4279
-       BIOCGETIF                         = 0x4020426b
-       BIOCGHDRCMPLT                     = 0x40044274
-       BIOCGRSIG                         = 0x40044272
-       BIOCGRTIMEOUT                     = 0x4010426e
-       BIOCGSEESENT                      = 0x40044276
-       BIOCGSTATS                        = 0x4008426f
-       BIOCIMMEDIATE                     = 0x80044270
-       BIOCPROMISC                       = 0x20004269
-       BIOCSBLEN                         = 0xc0044266
-       BIOCSDLT                          = 0x80044278
-       BIOCSETF                          = 0x80104267
-       BIOCSETFNR                        = 0x8010427e
-       BIOCSETIF                         = 0x8020426c
-       BIOCSHDRCMPLT                     = 0x80044275
-       BIOCSRSIG                         = 0x80044273
-       BIOCSRTIMEOUT                     = 0x8010426d
-       BIOCSSEESENT                      = 0x80044277
-       BIOCVERSION                       = 0x40044271
-       BPF_A                             = 0x10
-       BPF_ABS                           = 0x20
-       BPF_ADD                           = 0x0
-       BPF_ALIGNMENT                     = 0x4
-       BPF_ALU                           = 0x4
-       BPF_AND                           = 0x50
-       BPF_B                             = 0x10
-       BPF_DIV                           = 0x30
-       BPF_H                             = 0x8
-       BPF_IMM                           = 0x0
-       BPF_IND                           = 0x40
-       BPF_JA                            = 0x0
-       BPF_JEQ                           = 0x10
-       BPF_JGE                           = 0x30
-       BPF_JGT                           = 0x20
-       BPF_JMP                           = 0x5
-       BPF_JSET                          = 0x40
-       BPF_K                             = 0x0
-       BPF_LD                            = 0x0
-       BPF_LDX                           = 0x1
-       BPF_LEN                           = 0x80
-       BPF_LSH                           = 0x60
-       BPF_MAJOR_VERSION                 = 0x1
-       BPF_MAXBUFSIZE                    = 0x80000
-       BPF_MAXINSNS                      = 0x200
-       BPF_MEM                           = 0x60
-       BPF_MEMWORDS                      = 0x10
-       BPF_MINBUFSIZE                    = 0x20
-       BPF_MINOR_VERSION                 = 0x1
-       BPF_MISC                          = 0x7
-       BPF_MSH                           = 0xa0
-       BPF_MUL                           = 0x20
-       BPF_NEG                           = 0x80
-       BPF_OR                            = 0x40
-       BPF_RELEASE                       = 0x30bb6
-       BPF_RET                           = 0x6
-       BPF_RSH                           = 0x70
-       BPF_ST                            = 0x2
-       BPF_STX                           = 0x3
-       BPF_SUB                           = 0x10
-       BPF_TAX                           = 0x0
-       BPF_TXA                           = 0x80
-       BPF_W                             = 0x0
-       BPF_X                             = 0x8
-       BRKINT                            = 0x2
-       BS0                               = 0x0
-       BS1                               = 0x8000
-       BSDLY                             = 0x8000
-       CFLUSH                            = 0xf
-       CLOCAL                            = 0x8000
-       CLOCK_MONOTONIC                   = 0x6
-       CLOCK_MONOTONIC_RAW               = 0x4
-       CLOCK_MONOTONIC_RAW_APPROX        = 0x5
-       CLOCK_PROCESS_CPUTIME_ID          = 0xc
-       CLOCK_REALTIME                    = 0x0
-       CLOCK_THREAD_CPUTIME_ID           = 0x10
-       CLOCK_UPTIME_RAW                  = 0x8
-       CLOCK_UPTIME_RAW_APPROX           = 0x9
-       CLONE_NOFOLLOW                    = 0x1
-       CLONE_NOOWNERCOPY                 = 0x2
-       CR0                               = 0x0
-       CR1                               = 0x1000
-       CR2                               = 0x2000
-       CR3                               = 0x3000
-       CRDLY                             = 0x3000
-       CREAD                             = 0x800
-       CRTSCTS                           = 0x30000
-       CS5                               = 0x0
-       CS6                               = 0x100
-       CS7                               = 0x200
-       CS8                               = 0x300
-       CSIZE                             = 0x300
-       CSTART                            = 0x11
-       CSTATUS                           = 0x14
-       CSTOP                             = 0x13
-       CSTOPB                            = 0x400
-       CSUSP                             = 0x1a
-       CTLIOCGINFO                       = 0xc0644e03
-       CTL_HW                            = 0x6
-       CTL_KERN                          = 0x1
-       CTL_MAXNAME                       = 0xc
-       CTL_NET                           = 0x4
-       DLT_A429                          = 0xb8
-       DLT_A653_ICM                      = 0xb9
-       DLT_AIRONET_HEADER                = 0x78
-       DLT_AOS                           = 0xde
-       DLT_APPLE_IP_OVER_IEEE1394        = 0x8a
-       DLT_ARCNET                        = 0x7
-       DLT_ARCNET_LINUX                  = 0x81
-       DLT_ATM_CLIP                      = 0x13
-       DLT_ATM_RFC1483                   = 0xb
-       DLT_AURORA                        = 0x7e
-       DLT_AX25                          = 0x3
-       DLT_AX25_KISS                     = 0xca
-       DLT_BACNET_MS_TP                  = 0xa5
-       DLT_BLUETOOTH_HCI_H4              = 0xbb
-       DLT_BLUETOOTH_HCI_H4_WITH_PHDR    = 0xc9
-       DLT_CAN20B                        = 0xbe
-       DLT_CAN_SOCKETCAN                 = 0xe3
-       DLT_CHAOS                         = 0x5
-       DLT_CHDLC                         = 0x68
-       DLT_CISCO_IOS                     = 0x76
-       DLT_C_HDLC                        = 0x68
-       DLT_C_HDLC_WITH_DIR               = 0xcd
-       DLT_DBUS                          = 0xe7
-       DLT_DECT                          = 0xdd
-       DLT_DOCSIS                        = 0x8f
-       DLT_DVB_CI                        = 0xeb
-       DLT_ECONET                        = 0x73
-       DLT_EN10MB                        = 0x1
-       DLT_EN3MB                         = 0x2
-       DLT_ENC                           = 0x6d
-       DLT_ERF                           = 0xc5
-       DLT_ERF_ETH                       = 0xaf
-       DLT_ERF_POS                       = 0xb0
-       DLT_FC_2                          = 0xe0
-       DLT_FC_2_WITH_FRAME_DELIMS        = 0xe1
-       DLT_FDDI                          = 0xa
-       DLT_FLEXRAY                       = 0xd2
-       DLT_FRELAY                        = 0x6b
-       DLT_FRELAY_WITH_DIR               = 0xce
-       DLT_GCOM_SERIAL                   = 0xad
-       DLT_GCOM_T1E1                     = 0xac
-       DLT_GPF_F                         = 0xab
-       DLT_GPF_T                         = 0xaa
-       DLT_GPRS_LLC                      = 0xa9
-       DLT_GSMTAP_ABIS                   = 0xda
-       DLT_GSMTAP_UM                     = 0xd9
-       DLT_HHDLC                         = 0x79
-       DLT_IBM_SN                        = 0x92
-       DLT_IBM_SP                        = 0x91
-       DLT_IEEE802                       = 0x6
-       DLT_IEEE802_11                    = 0x69
-       DLT_IEEE802_11_RADIO              = 0x7f
-       DLT_IEEE802_11_RADIO_AVS          = 0xa3
-       DLT_IEEE802_15_4                  = 0xc3
-       DLT_IEEE802_15_4_LINUX            = 0xbf
-       DLT_IEEE802_15_4_NOFCS            = 0xe6
-       DLT_IEEE802_15_4_NONASK_PHY       = 0xd7
-       DLT_IEEE802_16_MAC_CPS            = 0xbc
-       DLT_IEEE802_16_MAC_CPS_RADIO      = 0xc1
-       DLT_IPFILTER                      = 0x74
-       DLT_IPMB                          = 0xc7
-       DLT_IPMB_LINUX                    = 0xd1
-       DLT_IPNET                         = 0xe2
-       DLT_IPOIB                         = 0xf2
-       DLT_IPV4                          = 0xe4
-       DLT_IPV6                          = 0xe5
-       DLT_IP_OVER_FC                    = 0x7a
-       DLT_JUNIPER_ATM1                  = 0x89
-       DLT_JUNIPER_ATM2                  = 0x87
-       DLT_JUNIPER_ATM_CEMIC             = 0xee
-       DLT_JUNIPER_CHDLC                 = 0xb5
-       DLT_JUNIPER_ES                    = 0x84
-       DLT_JUNIPER_ETHER                 = 0xb2
-       DLT_JUNIPER_FIBRECHANNEL          = 0xea
-       DLT_JUNIPER_FRELAY                = 0xb4
-       DLT_JUNIPER_GGSN                  = 0x85
-       DLT_JUNIPER_ISM                   = 0xc2
-       DLT_JUNIPER_MFR                   = 0x86
-       DLT_JUNIPER_MLFR                  = 0x83
-       DLT_JUNIPER_MLPPP                 = 0x82
-       DLT_JUNIPER_MONITOR               = 0xa4
-       DLT_JUNIPER_PIC_PEER              = 0xae
-       DLT_JUNIPER_PPP                   = 0xb3
-       DLT_JUNIPER_PPPOE                 = 0xa7
-       DLT_JUNIPER_PPPOE_ATM             = 0xa8
-       DLT_JUNIPER_SERVICES              = 0x88
-       DLT_JUNIPER_SRX_E2E               = 0xe9
-       DLT_JUNIPER_ST                    = 0xc8
-       DLT_JUNIPER_VP                    = 0xb7
-       DLT_JUNIPER_VS                    = 0xe8
-       DLT_LAPB_WITH_DIR                 = 0xcf
-       DLT_LAPD                          = 0xcb
-       DLT_LIN                           = 0xd4
-       DLT_LINUX_EVDEV                   = 0xd8
-       DLT_LINUX_IRDA                    = 0x90
-       DLT_LINUX_LAPD                    = 0xb1
-       DLT_LINUX_PPP_WITHDIRECTION       = 0xa6
-       DLT_LINUX_SLL                     = 0x71
-       DLT_LOOP                          = 0x6c
-       DLT_LTALK                         = 0x72
-       DLT_MATCHING_MAX                  = 0x10a
-       DLT_MATCHING_MIN                  = 0x68
-       DLT_MFR                           = 0xb6
-       DLT_MOST                          = 0xd3
-       DLT_MPEG_2_TS                     = 0xf3
-       DLT_MPLS                          = 0xdb
-       DLT_MTP2                          = 0x8c
-       DLT_MTP2_WITH_PHDR                = 0x8b
-       DLT_MTP3                          = 0x8d
-       DLT_MUX27010                      = 0xec
-       DLT_NETANALYZER                   = 0xf0
-       DLT_NETANALYZER_TRANSPARENT       = 0xf1
-       DLT_NFC_LLCP                      = 0xf5
-       DLT_NFLOG                         = 0xef
-       DLT_NG40                          = 0xf4
-       DLT_NULL                          = 0x0
-       DLT_PCI_EXP                       = 0x7d
-       DLT_PFLOG                         = 0x75
-       DLT_PFSYNC                        = 0x12
-       DLT_PPI                           = 0xc0
-       DLT_PPP                           = 0x9
-       DLT_PPP_BSDOS                     = 0x10
-       DLT_PPP_ETHER                     = 0x33
-       DLT_PPP_PPPD                      = 0xa6
-       DLT_PPP_SERIAL                    = 0x32
-       DLT_PPP_WITH_DIR                  = 0xcc
-       DLT_PPP_WITH_DIRECTION            = 0xa6
-       DLT_PRISM_HEADER                  = 0x77
-       DLT_PRONET                        = 0x4
-       DLT_RAIF1                         = 0xc6
-       DLT_RAW                           = 0xc
-       DLT_RIO                           = 0x7c
-       DLT_SCCP                          = 0x8e
-       DLT_SITA                          = 0xc4
-       DLT_SLIP                          = 0x8
-       DLT_SLIP_BSDOS                    = 0xf
-       DLT_STANAG_5066_D_PDU             = 0xed
-       DLT_SUNATM                        = 0x7b
-       DLT_SYMANTEC_FIREWALL             = 0x63
-       DLT_TZSP                          = 0x80
-       DLT_USB                           = 0xba
-       DLT_USB_DARWIN                    = 0x10a
-       DLT_USB_LINUX                     = 0xbd
-       DLT_USB_LINUX_MMAPPED             = 0xdc
-       DLT_USER0                         = 0x93
-       DLT_USER1                         = 0x94
-       DLT_USER10                        = 0x9d
-       DLT_USER11                        = 0x9e
-       DLT_USER12                        = 0x9f
-       DLT_USER13                        = 0xa0
-       DLT_USER14                        = 0xa1
-       DLT_USER15                        = 0xa2
-       DLT_USER2                         = 0x95
-       DLT_USER3                         = 0x96
-       DLT_USER4                         = 0x97
-       DLT_USER5                         = 0x98
-       DLT_USER6                         = 0x99
-       DLT_USER7                         = 0x9a
-       DLT_USER8                         = 0x9b
-       DLT_USER9                         = 0x9c
-       DLT_WIHART                        = 0xdf
-       DLT_X2E_SERIAL                    = 0xd5
-       DLT_X2E_XORAYA                    = 0xd6
-       DT_BLK                            = 0x6
-       DT_CHR                            = 0x2
-       DT_DIR                            = 0x4
-       DT_FIFO                           = 0x1
-       DT_LNK                            = 0xa
-       DT_REG                            = 0x8
-       DT_SOCK                           = 0xc
-       DT_UNKNOWN                        = 0x0
-       DT_WHT                            = 0xe
-       ECHO                              = 0x8
-       ECHOCTL                           = 0x40
-       ECHOE                             = 0x2
-       ECHOK                             = 0x4
-       ECHOKE                            = 0x1
-       ECHONL                            = 0x10
-       ECHOPRT                           = 0x20
-       EVFILT_AIO                        = -0x3
-       EVFILT_EXCEPT                     = -0xf
-       EVFILT_FS                         = -0x9
-       EVFILT_MACHPORT                   = -0x8
-       EVFILT_PROC                       = -0x5
-       EVFILT_READ                       = -0x1
-       EVFILT_SIGNAL                     = -0x6
-       EVFILT_SYSCOUNT                   = 0x11
-       EVFILT_THREADMARKER               = 0x11
-       EVFILT_TIMER                      = -0x7
-       EVFILT_USER                       = -0xa
-       EVFILT_VM                         = -0xc
-       EVFILT_VNODE                      = -0x4
-       EVFILT_WRITE                      = -0x2
-       EV_ADD                            = 0x1
-       EV_CLEAR                          = 0x20
-       EV_DELETE                         = 0x2
-       EV_DISABLE                        = 0x8
-       EV_DISPATCH                       = 0x80
-       EV_DISPATCH2                      = 0x180
-       EV_ENABLE                         = 0x4
-       EV_EOF                            = 0x8000
-       EV_ERROR                          = 0x4000
-       EV_FLAG0                          = 0x1000
-       EV_FLAG1                          = 0x2000
-       EV_ONESHOT                        = 0x10
-       EV_OOBAND                         = 0x2000
-       EV_POLL                           = 0x1000
-       EV_RECEIPT                        = 0x40
-       EV_SYSFLAGS                       = 0xf000
-       EV_UDATA_SPECIFIC                 = 0x100
-       EV_VANISHED                       = 0x200
-       EXTA                              = 0x4b00
-       EXTB                              = 0x9600
-       EXTPROC                           = 0x800
-       FD_CLOEXEC                        = 0x1
-       FD_SETSIZE                        = 0x400
-       FF0                               = 0x0
-       FF1                               = 0x4000
-       FFDLY                             = 0x4000
-       FLUSHO                            = 0x800000
-       FSOPT_ATTR_CMN_EXTENDED           = 0x20
-       FSOPT_NOFOLLOW                    = 0x1
-       FSOPT_NOINMEMUPDATE               = 0x2
-       FSOPT_PACK_INVAL_ATTRS            = 0x8
-       FSOPT_REPORT_FULLSIZE             = 0x4
-       FSOPT_RETURN_REALDEV              = 0x200
-       F_ADDFILESIGS                     = 0x3d
-       F_ADDFILESIGS_FOR_DYLD_SIM        = 0x53
-       F_ADDFILESIGS_INFO                = 0x67
-       F_ADDFILESIGS_RETURN              = 0x61
-       F_ADDFILESUPPL                    = 0x68
-       F_ADDSIGS                         = 0x3b
-       F_ALLOCATEALL                     = 0x4
-       F_ALLOCATECONTIG                  = 0x2
-       F_BARRIERFSYNC                    = 0x55
-       F_CHECK_LV                        = 0x62
-       F_CHKCLEAN                        = 0x29
-       F_DUPFD                           = 0x0
-       F_DUPFD_CLOEXEC                   = 0x43
-       F_FINDSIGS                        = 0x4e
-       F_FLUSH_DATA                      = 0x28
-       F_FREEZE_FS                       = 0x35
-       F_FULLFSYNC                       = 0x33
-       F_GETCODEDIR                      = 0x48
-       F_GETFD                           = 0x1
-       F_GETFL                           = 0x3
-       F_GETLK                           = 0x7
-       F_GETLKPID                        = 0x42
-       F_GETNOSIGPIPE                    = 0x4a
-       F_GETOWN                          = 0x5
-       F_GETPATH                         = 0x32
-       F_GETPATH_MTMINFO                 = 0x47
-       F_GETPATH_NOFIRMLINK              = 0x66
-       F_GETPROTECTIONCLASS              = 0x3f
-       F_GETPROTECTIONLEVEL              = 0x4d
-       F_GETSIGSINFO                     = 0x69
-       F_GLOBAL_NOCACHE                  = 0x37
-       F_LOG2PHYS                        = 0x31
-       F_LOG2PHYS_EXT                    = 0x41
-       F_NOCACHE                         = 0x30
-       F_NODIRECT                        = 0x3e
-       F_OK                              = 0x0
-       F_PATHPKG_CHECK                   = 0x34
-       F_PEOFPOSMODE                     = 0x3
-       F_PREALLOCATE                     = 0x2a
-       F_PUNCHHOLE                       = 0x63
-       F_RDADVISE                        = 0x2c
-       F_RDAHEAD                         = 0x2d
-       F_RDLCK                           = 0x1
-       F_SETBACKINGSTORE                 = 0x46
-       F_SETFD                           = 0x2
-       F_SETFL                           = 0x4
-       F_SETLK                           = 0x8
-       F_SETLKW                          = 0x9
-       F_SETLKWTIMEOUT                   = 0xa
-       F_SETNOSIGPIPE                    = 0x49
-       F_SETOWN                          = 0x6
-       F_SETPROTECTIONCLASS              = 0x40
-       F_SETSIZE                         = 0x2b
-       F_SINGLE_WRITER                   = 0x4c
-       F_SPECULATIVE_READ                = 0x65
-       F_THAW_FS                         = 0x36
-       F_TRANSCODEKEY                    = 0x4b
-       F_TRIM_ACTIVE_FILE                = 0x64
-       F_UNLCK                           = 0x2
-       F_VOLPOSMODE                      = 0x4
-       F_WRLCK                           = 0x3
-       HUPCL                             = 0x4000
-       HW_MACHINE                        = 0x1
-       ICANON                            = 0x100
-       ICMP6_FILTER                      = 0x12
-       ICRNL                             = 0x100
-       IEXTEN                            = 0x400
-       IFF_ALLMULTI                      = 0x200
-       IFF_ALTPHYS                       = 0x4000
-       IFF_BROADCAST                     = 0x2
-       IFF_DEBUG                         = 0x4
-       IFF_LINK0                         = 0x1000
-       IFF_LINK1                         = 0x2000
-       IFF_LINK2                         = 0x4000
-       IFF_LOOPBACK                      = 0x8
-       IFF_MULTICAST                     = 0x8000
-       IFF_NOARP                         = 0x80
-       IFF_NOTRAILERS                    = 0x20
-       IFF_OACTIVE                       = 0x400
-       IFF_POINTOPOINT                   = 0x10
-       IFF_PROMISC                       = 0x100
-       IFF_RUNNING                       = 0x40
-       IFF_SIMPLEX                       = 0x800
-       IFF_UP                            = 0x1
-       IFNAMSIZ                          = 0x10
-       IFT_1822                          = 0x2
-       IFT_6LOWPAN                       = 0x40
-       IFT_AAL5                          = 0x31
-       IFT_ARCNET                        = 0x23
-       IFT_ARCNETPLUS                    = 0x24
-       IFT_ATM                           = 0x25
-       IFT_BRIDGE                        = 0xd1
-       IFT_CARP                          = 0xf8
-       IFT_CELLULAR                      = 0xff
-       IFT_CEPT                          = 0x13
-       IFT_DS3                           = 0x1e
-       IFT_ENC                           = 0xf4
-       IFT_EON                           = 0x19
-       IFT_ETHER                         = 0x6
-       IFT_FAITH                         = 0x38
-       IFT_FDDI                          = 0xf
-       IFT_FRELAY                        = 0x20
-       IFT_FRELAYDCE                     = 0x2c
-       IFT_GIF                           = 0x37
-       IFT_HDH1822                       = 0x3
-       IFT_HIPPI                         = 0x2f
-       IFT_HSSI                          = 0x2e
-       IFT_HY                            = 0xe
-       IFT_IEEE1394                      = 0x90
-       IFT_IEEE8023ADLAG                 = 0x88
-       IFT_ISDNBASIC                     = 0x14
-       IFT_ISDNPRIMARY                   = 0x15
-       IFT_ISO88022LLC                   = 0x29
-       IFT_ISO88023                      = 0x7
-       IFT_ISO88024                      = 0x8
-       IFT_ISO88025                      = 0x9
-       IFT_ISO88026                      = 0xa
-       IFT_L2VLAN                        = 0x87
-       IFT_LAPB                          = 0x10
-       IFT_LOCALTALK                     = 0x2a
-       IFT_LOOP                          = 0x18
-       IFT_MIOX25                        = 0x26
-       IFT_MODEM                         = 0x30
-       IFT_NSIP                          = 0x1b
-       IFT_OTHER                         = 0x1
-       IFT_P10                           = 0xc
-       IFT_P80                           = 0xd
-       IFT_PARA                          = 0x22
-       IFT_PDP                           = 0xff
-       IFT_PFLOG                         = 0xf5
-       IFT_PFSYNC                        = 0xf6
-       IFT_PKTAP                         = 0xfe
-       IFT_PPP                           = 0x17
-       IFT_PROPMUX                       = 0x36
-       IFT_PROPVIRTUAL                   = 0x35
-       IFT_PTPSERIAL                     = 0x16
-       IFT_RS232                         = 0x21
-       IFT_SDLC                          = 0x11
-       IFT_SIP                           = 0x1f
-       IFT_SLIP                          = 0x1c
-       IFT_SMDSDXI                       = 0x2b
-       IFT_SMDSICIP                      = 0x34
-       IFT_SONET                         = 0x27
-       IFT_SONETPATH                     = 0x32
-       IFT_SONETVT                       = 0x33
-       IFT_STARLAN                       = 0xb
-       IFT_STF                           = 0x39
-       IFT_T1                            = 0x12
-       IFT_ULTRA                         = 0x1d
-       IFT_V35                           = 0x2d
-       IFT_X25                           = 0x5
-       IFT_X25DDN                        = 0x4
-       IFT_X25PLE                        = 0x28
-       IFT_XETHER                        = 0x1a
-       IGNBRK                            = 0x1
-       IGNCR                             = 0x80
-       IGNPAR                            = 0x4
-       IMAXBEL                           = 0x2000
-       INLCR                             = 0x40
-       INPCK                             = 0x10
-       IN_CLASSA_HOST                    = 0xffffff
-       IN_CLASSA_MAX                     = 0x80
-       IN_CLASSA_NET                     = 0xff000000
-       IN_CLASSA_NSHIFT                  = 0x18
-       IN_CLASSB_HOST                    = 0xffff
-       IN_CLASSB_MAX                     = 0x10000
-       IN_CLASSB_NET                     = 0xffff0000
-       IN_CLASSB_NSHIFT                  = 0x10
-       IN_CLASSC_HOST                    = 0xff
-       IN_CLASSC_NET                     = 0xffffff00
-       IN_CLASSC_NSHIFT                  = 0x8
-       IN_CLASSD_HOST                    = 0xfffffff
-       IN_CLASSD_NET                     = 0xf0000000
-       IN_CLASSD_NSHIFT                  = 0x1c
-       IN_LINKLOCALNETNUM                = 0xa9fe0000
-       IN_LOOPBACKNET                    = 0x7f
-       IPPROTO_3PC                       = 0x22
-       IPPROTO_ADFS                      = 0x44
-       IPPROTO_AH                        = 0x33
-       IPPROTO_AHIP                      = 0x3d
-       IPPROTO_APES                      = 0x63
-       IPPROTO_ARGUS                     = 0xd
-       IPPROTO_AX25                      = 0x5d
-       IPPROTO_BHA                       = 0x31
-       IPPROTO_BLT                       = 0x1e
-       IPPROTO_BRSATMON                  = 0x4c
-       IPPROTO_CFTP                      = 0x3e
-       IPPROTO_CHAOS                     = 0x10
-       IPPROTO_CMTP                      = 0x26
-       IPPROTO_CPHB                      = 0x49
-       IPPROTO_CPNX                      = 0x48
-       IPPROTO_DDP                       = 0x25
-       IPPROTO_DGP                       = 0x56
-       IPPROTO_DIVERT                    = 0xfe
-       IPPROTO_DONE                      = 0x101
-       IPPROTO_DSTOPTS                   = 0x3c
-       IPPROTO_EGP                       = 0x8
-       IPPROTO_EMCON                     = 0xe
-       IPPROTO_ENCAP                     = 0x62
-       IPPROTO_EON                       = 0x50
-       IPPROTO_ESP                       = 0x32
-       IPPROTO_ETHERIP                   = 0x61
-       IPPROTO_FRAGMENT                  = 0x2c
-       IPPROTO_GGP                       = 0x3
-       IPPROTO_GMTP                      = 0x64
-       IPPROTO_GRE                       = 0x2f
-       IPPROTO_HELLO                     = 0x3f
-       IPPROTO_HMP                       = 0x14
-       IPPROTO_HOPOPTS                   = 0x0
-       IPPROTO_ICMP                      = 0x1
-       IPPROTO_ICMPV6                    = 0x3a
-       IPPROTO_IDP                       = 0x16
-       IPPROTO_IDPR                      = 0x23
-       IPPROTO_IDRP                      = 0x2d
-       IPPROTO_IGMP                      = 0x2
-       IPPROTO_IGP                       = 0x55
-       IPPROTO_IGRP                      = 0x58
-       IPPROTO_IL                        = 0x28
-       IPPROTO_INLSP                     = 0x34
-       IPPROTO_INP                       = 0x20
-       IPPROTO_IP                        = 0x0
-       IPPROTO_IPCOMP                    = 0x6c
-       IPPROTO_IPCV                      = 0x47
-       IPPROTO_IPEIP                     = 0x5e
-       IPPROTO_IPIP                      = 0x4
-       IPPROTO_IPPC                      = 0x43
-       IPPROTO_IPV4                      = 0x4
-       IPPROTO_IPV6                      = 0x29
-       IPPROTO_IRTP                      = 0x1c
-       IPPROTO_KRYPTOLAN                 = 0x41
-       IPPROTO_LARP                      = 0x5b
-       IPPROTO_LEAF1                     = 0x19
-       IPPROTO_LEAF2                     = 0x1a
-       IPPROTO_MAX                       = 0x100
-       IPPROTO_MAXID                     = 0x34
-       IPPROTO_MEAS                      = 0x13
-       IPPROTO_MHRP                      = 0x30
-       IPPROTO_MICP                      = 0x5f
-       IPPROTO_MTP                       = 0x5c
-       IPPROTO_MUX                       = 0x12
-       IPPROTO_ND                        = 0x4d
-       IPPROTO_NHRP                      = 0x36
-       IPPROTO_NONE                      = 0x3b
-       IPPROTO_NSP                       = 0x1f
-       IPPROTO_NVPII                     = 0xb
-       IPPROTO_OSPFIGP                   = 0x59
-       IPPROTO_PGM                       = 0x71
-       IPPROTO_PIGP                      = 0x9
-       IPPROTO_PIM                       = 0x67
-       IPPROTO_PRM                       = 0x15
-       IPPROTO_PUP                       = 0xc
-       IPPROTO_PVP                       = 0x4b
-       IPPROTO_RAW                       = 0xff
-       IPPROTO_RCCMON                    = 0xa
-       IPPROTO_RDP                       = 0x1b
-       IPPROTO_ROUTING                   = 0x2b
-       IPPROTO_RSVP                      = 0x2e
-       IPPROTO_RVD                       = 0x42
-       IPPROTO_SATEXPAK                  = 0x40
-       IPPROTO_SATMON                    = 0x45
-       IPPROTO_SCCSP                     = 0x60
-       IPPROTO_SCTP                      = 0x84
-       IPPROTO_SDRP                      = 0x2a
-       IPPROTO_SEP                       = 0x21
-       IPPROTO_SRPC                      = 0x5a
-       IPPROTO_ST                        = 0x7
-       IPPROTO_SVMTP                     = 0x52
-       IPPROTO_SWIPE                     = 0x35
-       IPPROTO_TCF                       = 0x57
-       IPPROTO_TCP                       = 0x6
-       IPPROTO_TP                        = 0x1d
-       IPPROTO_TPXX                      = 0x27
-       IPPROTO_TRUNK1                    = 0x17
-       IPPROTO_TRUNK2                    = 0x18
-       IPPROTO_TTP                       = 0x54
-       IPPROTO_UDP                       = 0x11
-       IPPROTO_VINES                     = 0x53
-       IPPROTO_VISA                      = 0x46
-       IPPROTO_VMTP                      = 0x51
-       IPPROTO_WBEXPAK                   = 0x4f
-       IPPROTO_WBMON                     = 0x4e
-       IPPROTO_WSN                       = 0x4a
-       IPPROTO_XNET                      = 0xf
-       IPPROTO_XTP                       = 0x24
-       IPV6_2292DSTOPTS                  = 0x17
-       IPV6_2292HOPLIMIT                 = 0x14
-       IPV6_2292HOPOPTS                  = 0x16
-       IPV6_2292NEXTHOP                  = 0x15
-       IPV6_2292PKTINFO                  = 0x13
-       IPV6_2292PKTOPTIONS               = 0x19
-       IPV6_2292RTHDR                    = 0x18
-       IPV6_3542DSTOPTS                  = 0x32
-       IPV6_3542HOPLIMIT                 = 0x2f
-       IPV6_3542HOPOPTS                  = 0x31
-       IPV6_3542NEXTHOP                  = 0x30
-       IPV6_3542PKTINFO                  = 0x2e
-       IPV6_3542RTHDR                    = 0x33
-       IPV6_ADDR_MC_FLAGS_PREFIX         = 0x20
-       IPV6_ADDR_MC_FLAGS_TRANSIENT      = 0x10
-       IPV6_ADDR_MC_FLAGS_UNICAST_BASED  = 0x30
-       IPV6_AUTOFLOWLABEL                = 0x3b
-       IPV6_BINDV6ONLY                   = 0x1b
-       IPV6_BOUND_IF                     = 0x7d
-       IPV6_CHECKSUM                     = 0x1a
-       IPV6_DEFAULT_MULTICAST_HOPS       = 0x1
-       IPV6_DEFAULT_MULTICAST_LOOP       = 0x1
-       IPV6_DEFHLIM                      = 0x40
-       IPV6_DONTFRAG                     = 0x3e
-       IPV6_DSTOPTS                      = 0x32
-       IPV6_FAITH                        = 0x1d
-       IPV6_FLOWINFO_MASK                = 0xffffff0f
-       IPV6_FLOWLABEL_MASK               = 0xffff0f00
-       IPV6_FLOW_ECN_MASK                = 0x3000
-       IPV6_FRAGTTL                      = 0x3c
-       IPV6_FW_ADD                       = 0x1e
-       IPV6_FW_DEL                       = 0x1f
-       IPV6_FW_FLUSH                     = 0x20
-       IPV6_FW_GET                       = 0x22
-       IPV6_FW_ZERO                      = 0x21
-       IPV6_HLIMDEC                      = 0x1
-       IPV6_HOPLIMIT                     = 0x2f
-       IPV6_HOPOPTS                      = 0x31
-       IPV6_IPSEC_POLICY                 = 0x1c
-       IPV6_JOIN_GROUP                   = 0xc
-       IPV6_LEAVE_GROUP                  = 0xd
-       IPV6_MAXHLIM                      = 0xff
-       IPV6_MAXOPTHDR                    = 0x800
-       IPV6_MAXPACKET                    = 0xffff
-       IPV6_MAX_GROUP_SRC_FILTER         = 0x200
-       IPV6_MAX_MEMBERSHIPS              = 0xfff
-       IPV6_MAX_SOCK_SRC_FILTER          = 0x80
-       IPV6_MIN_MEMBERSHIPS              = 0x1f
-       IPV6_MMTU                         = 0x500
-       IPV6_MSFILTER                     = 0x4a
-       IPV6_MULTICAST_HOPS               = 0xa
-       IPV6_MULTICAST_IF                 = 0x9
-       IPV6_MULTICAST_LOOP               = 0xb
-       IPV6_NEXTHOP                      = 0x30
-       IPV6_PATHMTU                      = 0x2c
-       IPV6_PKTINFO                      = 0x2e
-       IPV6_PORTRANGE                    = 0xe
-       IPV6_PORTRANGE_DEFAULT            = 0x0
-       IPV6_PORTRANGE_HIGH               = 0x1
-       IPV6_PORTRANGE_LOW                = 0x2
-       IPV6_PREFER_TEMPADDR              = 0x3f
-       IPV6_RECVDSTOPTS                  = 0x28
-       IPV6_RECVHOPLIMIT                 = 0x25
-       IPV6_RECVHOPOPTS                  = 0x27
-       IPV6_RECVPATHMTU                  = 0x2b
-       IPV6_RECVPKTINFO                  = 0x3d
-       IPV6_RECVRTHDR                    = 0x26
-       IPV6_RECVTCLASS                   = 0x23
-       IPV6_RTHDR                        = 0x33
-       IPV6_RTHDRDSTOPTS                 = 0x39
-       IPV6_RTHDR_LOOSE                  = 0x0
-       IPV6_RTHDR_STRICT                 = 0x1
-       IPV6_RTHDR_TYPE_0                 = 0x0
-       IPV6_SOCKOPT_RESERVED1            = 0x3
-       IPV6_TCLASS                       = 0x24
-       IPV6_UNICAST_HOPS                 = 0x4
-       IPV6_USE_MIN_MTU                  = 0x2a
-       IPV6_V6ONLY                       = 0x1b
-       IPV6_VERSION                      = 0x60
-       IPV6_VERSION_MASK                 = 0xf0
-       IP_ADD_MEMBERSHIP                 = 0xc
-       IP_ADD_SOURCE_MEMBERSHIP          = 0x46
-       IP_BLOCK_SOURCE                   = 0x48
-       IP_BOUND_IF                       = 0x19
-       IP_DEFAULT_MULTICAST_LOOP         = 0x1
-       IP_DEFAULT_MULTICAST_TTL          = 0x1
-       IP_DF                             = 0x4000
-       IP_DONTFRAG                       = 0x1c
-       IP_DROP_MEMBERSHIP                = 0xd
-       IP_DROP_SOURCE_MEMBERSHIP         = 0x47
-       IP_DUMMYNET_CONFIGURE             = 0x3c
-       IP_DUMMYNET_DEL                   = 0x3d
-       IP_DUMMYNET_FLUSH                 = 0x3e
-       IP_DUMMYNET_GET                   = 0x40
-       IP_FAITH                          = 0x16
-       IP_FW_ADD                         = 0x28
-       IP_FW_DEL                         = 0x29
-       IP_FW_FLUSH                       = 0x2a
-       IP_FW_GET                         = 0x2c
-       IP_FW_RESETLOG                    = 0x2d
-       IP_FW_ZERO                        = 0x2b
-       IP_HDRINCL                        = 0x2
-       IP_IPSEC_POLICY                   = 0x15
-       IP_MAXPACKET                      = 0xffff
-       IP_MAX_GROUP_SRC_FILTER           = 0x200
-       IP_MAX_MEMBERSHIPS                = 0xfff
-       IP_MAX_SOCK_MUTE_FILTER           = 0x80
-       IP_MAX_SOCK_SRC_FILTER            = 0x80
-       IP_MF                             = 0x2000
-       IP_MIN_MEMBERSHIPS                = 0x1f
-       IP_MSFILTER                       = 0x4a
-       IP_MSS                            = 0x240
-       IP_MULTICAST_IF                   = 0x9
-       IP_MULTICAST_IFINDEX              = 0x42
-       IP_MULTICAST_LOOP                 = 0xb
-       IP_MULTICAST_TTL                  = 0xa
-       IP_MULTICAST_VIF                  = 0xe
-       IP_NAT__XXX                       = 0x37
-       IP_OFFMASK                        = 0x1fff
-       IP_OLD_FW_ADD                     = 0x32
-       IP_OLD_FW_DEL                     = 0x33
-       IP_OLD_FW_FLUSH                   = 0x34
-       IP_OLD_FW_GET                     = 0x36
-       IP_OLD_FW_RESETLOG                = 0x38
-       IP_OLD_FW_ZERO                    = 0x35
-       IP_OPTIONS                        = 0x1
-       IP_PKTINFO                        = 0x1a
-       IP_PORTRANGE                      = 0x13
-       IP_PORTRANGE_DEFAULT              = 0x0
-       IP_PORTRANGE_HIGH                 = 0x1
-       IP_PORTRANGE_LOW                  = 0x2
-       IP_RECVDSTADDR                    = 0x7
-       IP_RECVIF                         = 0x14
-       IP_RECVOPTS                       = 0x5
-       IP_RECVPKTINFO                    = 0x1a
-       IP_RECVRETOPTS                    = 0x6
-       IP_RECVTOS                        = 0x1b
-       IP_RECVTTL                        = 0x18
-       IP_RETOPTS                        = 0x8
-       IP_RF                             = 0x8000
-       IP_RSVP_OFF                       = 0x10
-       IP_RSVP_ON                        = 0xf
-       IP_RSVP_VIF_OFF                   = 0x12
-       IP_RSVP_VIF_ON                    = 0x11
-       IP_STRIPHDR                       = 0x17
-       IP_TOS                            = 0x3
-       IP_TRAFFIC_MGT_BACKGROUND         = 0x41
-       IP_TTL                            = 0x4
-       IP_UNBLOCK_SOURCE                 = 0x49
-       ISIG                              = 0x80
-       ISTRIP                            = 0x20
-       IUTF8                             = 0x4000
-       IXANY                             = 0x800
-       IXOFF                             = 0x400
-       IXON                              = 0x200
-       KERN_HOSTNAME                     = 0xa
-       KERN_OSRELEASE                    = 0x2
-       KERN_OSTYPE                       = 0x1
-       KERN_VERSION                      = 0x4
-       LOCAL_PEERCRED                    = 0x1
-       LOCAL_PEEREPID                    = 0x3
-       LOCAL_PEEREUUID                   = 0x5
-       LOCAL_PEERPID                     = 0x2
-       LOCAL_PEERTOKEN                   = 0x6
-       LOCAL_PEERUUID                    = 0x4
-       LOCK_EX                           = 0x2
-       LOCK_NB                           = 0x4
-       LOCK_SH                           = 0x1
-       LOCK_UN                           = 0x8
-       MADV_CAN_REUSE                    = 0x9
-       MADV_DONTNEED                     = 0x4
-       MADV_FREE                         = 0x5
-       MADV_FREE_REUSABLE                = 0x7
-       MADV_FREE_REUSE                   = 0x8
-       MADV_NORMAL                       = 0x0
-       MADV_PAGEOUT                      = 0xa
-       MADV_RANDOM                       = 0x1
-       MADV_SEQUENTIAL                   = 0x2
-       MADV_WILLNEED                     = 0x3
-       MADV_ZERO_WIRED_PAGES             = 0x6
-       MAP_32BIT                         = 0x8000
-       MAP_ANON                          = 0x1000
-       MAP_ANONYMOUS                     = 0x1000
-       MAP_COPY                          = 0x2
-       MAP_FILE                          = 0x0
-       MAP_FIXED                         = 0x10
-       MAP_HASSEMAPHORE                  = 0x200
-       MAP_JIT                           = 0x800
-       MAP_NOCACHE                       = 0x400
-       MAP_NOEXTEND                      = 0x100
-       MAP_NORESERVE                     = 0x40
-       MAP_PRIVATE                       = 0x2
-       MAP_RENAME                        = 0x20
-       MAP_RESERVED0080                  = 0x80
-       MAP_RESILIENT_CODESIGN            = 0x2000
-       MAP_RESILIENT_MEDIA               = 0x4000
-       MAP_SHARED                        = 0x1
-       MAP_TRANSLATED_ALLOW_EXECUTE      = 0x20000
-       MAP_UNIX03                        = 0x40000
-       MCAST_BLOCK_SOURCE                = 0x54
-       MCAST_EXCLUDE                     = 0x2
-       MCAST_INCLUDE                     = 0x1
-       MCAST_JOIN_GROUP                  = 0x50
-       MCAST_JOIN_SOURCE_GROUP           = 0x52
-       MCAST_LEAVE_GROUP                 = 0x51
-       MCAST_LEAVE_SOURCE_GROUP          = 0x53
-       MCAST_UNBLOCK_SOURCE              = 0x55
-       MCAST_UNDEFINED                   = 0x0
-       MCL_CURRENT                       = 0x1
-       MCL_FUTURE                        = 0x2
-       MNT_ASYNC                         = 0x40
-       MNT_AUTOMOUNTED                   = 0x400000
-       MNT_CMDFLAGS                      = 0xf0000
-       MNT_CPROTECT                      = 0x80
-       MNT_DEFWRITE                      = 0x2000000
-       MNT_DONTBROWSE                    = 0x100000
-       MNT_DOVOLFS                       = 0x8000
-       MNT_DWAIT                         = 0x4
-       MNT_EXPORTED                      = 0x100
-       MNT_EXT_ROOT_DATA_VOL             = 0x1
-       MNT_FORCE                         = 0x80000
-       MNT_IGNORE_OWNERSHIP              = 0x200000
-       MNT_JOURNALED                     = 0x800000
-       MNT_LOCAL                         = 0x1000
-       MNT_MULTILABEL                    = 0x4000000
-       MNT_NOATIME                       = 0x10000000
-       MNT_NOBLOCK                       = 0x20000
-       MNT_NODEV                         = 0x10
-       MNT_NOEXEC                        = 0x4
-       MNT_NOSUID                        = 0x8
-       MNT_NOUSERXATTR                   = 0x1000000
-       MNT_NOWAIT                        = 0x2
-       MNT_QUARANTINE                    = 0x400
-       MNT_QUOTA                         = 0x2000
-       MNT_RDONLY                        = 0x1
-       MNT_RELOAD                        = 0x40000
-       MNT_REMOVABLE                     = 0x200
-       MNT_ROOTFS                        = 0x4000
-       MNT_SNAPSHOT                      = 0x40000000
-       MNT_STRICTATIME                   = 0x80000000
-       MNT_SYNCHRONOUS                   = 0x2
-       MNT_UNION                         = 0x20
-       MNT_UNKNOWNPERMISSIONS            = 0x200000
-       MNT_UPDATE                        = 0x10000
-       MNT_VISFLAGMASK                   = 0xd7f0f7ff
-       MNT_WAIT                          = 0x1
-       MSG_CTRUNC                        = 0x20
-       MSG_DONTROUTE                     = 0x4
-       MSG_DONTWAIT                      = 0x80
-       MSG_EOF                           = 0x100
-       MSG_EOR                           = 0x8
-       MSG_FLUSH                         = 0x400
-       MSG_HAVEMORE                      = 0x2000
-       MSG_HOLD                          = 0x800
-       MSG_NEEDSA                        = 0x10000
-       MSG_NOSIGNAL                      = 0x80000
-       MSG_OOB                           = 0x1
-       MSG_PEEK                          = 0x2
-       MSG_RCVMORE                       = 0x4000
-       MSG_SEND                          = 0x1000
-       MSG_TRUNC                         = 0x10
-       MSG_WAITALL                       = 0x40
-       MSG_WAITSTREAM                    = 0x200
-       MS_ASYNC                          = 0x1
-       MS_DEACTIVATE                     = 0x8
-       MS_INVALIDATE                     = 0x2
-       MS_KILLPAGES                      = 0x4
-       MS_SYNC                           = 0x10
-       NAME_MAX                          = 0xff
-       NET_RT_DUMP                       = 0x1
-       NET_RT_DUMP2                      = 0x7
-       NET_RT_FLAGS                      = 0x2
-       NET_RT_FLAGS_PRIV                 = 0xa
-       NET_RT_IFLIST                     = 0x3
-       NET_RT_IFLIST2                    = 0x6
-       NET_RT_MAXID                      = 0xb
-       NET_RT_STAT                       = 0x4
-       NET_RT_TRASH                      = 0x5
-       NFDBITS                           = 0x20
-       NL0                               = 0x0
-       NL1                               = 0x100
-       NL2                               = 0x200
-       NL3                               = 0x300
-       NLDLY                             = 0x300
-       NOFLSH                            = 0x80000000
-       NOKERNINFO                        = 0x2000000
-       NOTE_ABSOLUTE                     = 0x8
-       NOTE_ATTRIB                       = 0x8
-       NOTE_BACKGROUND                   = 0x40
-       NOTE_CHILD                        = 0x4
-       NOTE_CRITICAL                     = 0x20
-       NOTE_DELETE                       = 0x1
-       NOTE_EXEC                         = 0x20000000
-       NOTE_EXIT                         = 0x80000000
-       NOTE_EXITSTATUS                   = 0x4000000
-       NOTE_EXIT_CSERROR                 = 0x40000
-       NOTE_EXIT_DECRYPTFAIL             = 0x10000
-       NOTE_EXIT_DETAIL                  = 0x2000000
-       NOTE_EXIT_DETAIL_MASK             = 0x70000
-       NOTE_EXIT_MEMORY                  = 0x20000
-       NOTE_EXIT_REPARENTED              = 0x80000
-       NOTE_EXTEND                       = 0x4
-       NOTE_FFAND                        = 0x40000000
-       NOTE_FFCOPY                       = 0xc0000000
-       NOTE_FFCTRLMASK                   = 0xc0000000
-       NOTE_FFLAGSMASK                   = 0xffffff
-       NOTE_FFNOP                        = 0x0
-       NOTE_FFOR                         = 0x80000000
-       NOTE_FORK                         = 0x40000000
-       NOTE_FUNLOCK                      = 0x100
-       NOTE_LEEWAY                       = 0x10
-       NOTE_LINK                         = 0x10
-       NOTE_LOWAT                        = 0x1
-       NOTE_MACHTIME                     = 0x100
-       NOTE_MACH_CONTINUOUS_TIME         = 0x80
-       NOTE_NONE                         = 0x80
-       NOTE_NSECONDS                     = 0x4
-       NOTE_OOB                          = 0x2
-       NOTE_PCTRLMASK                    = -0x100000
-       NOTE_PDATAMASK                    = 0xfffff
-       NOTE_REAP                         = 0x10000000
-       NOTE_RENAME                       = 0x20
-       NOTE_REVOKE                       = 0x40
-       NOTE_SECONDS                      = 0x1
-       NOTE_SIGNAL                       = 0x8000000
-       NOTE_TRACK                        = 0x1
-       NOTE_TRACKERR                     = 0x2
-       NOTE_TRIGGER                      = 0x1000000
-       NOTE_USECONDS                     = 0x2
-       NOTE_VM_ERROR                     = 0x10000000
-       NOTE_VM_PRESSURE                  = 0x80000000
-       NOTE_VM_PRESSURE_SUDDEN_TERMINATE = 0x20000000
-       NOTE_VM_PRESSURE_TERMINATE        = 0x40000000
-       NOTE_WRITE                        = 0x2
-       OCRNL                             = 0x10
-       OFDEL                             = 0x20000
-       OFILL                             = 0x80
-       ONLCR                             = 0x2
-       ONLRET                            = 0x40
-       ONOCR                             = 0x20
-       ONOEOT                            = 0x8
-       OPOST                             = 0x1
-       OXTABS                            = 0x4
-       O_ACCMODE                         = 0x3
-       O_ALERT                           = 0x20000000
-       O_APPEND                          = 0x8
-       O_ASYNC                           = 0x40
-       O_CLOEXEC                         = 0x1000000
-       O_CREAT                           = 0x200
-       O_DIRECTORY                       = 0x100000
-       O_DP_GETRAWENCRYPTED              = 0x1
-       O_DP_GETRAWUNENCRYPTED            = 0x2
-       O_DSYNC                           = 0x400000
-       O_EVTONLY                         = 0x8000
-       O_EXCL                            = 0x800
-       O_EXLOCK                          = 0x20
-       O_FSYNC                           = 0x80
-       O_NDELAY                          = 0x4
-       O_NOCTTY                          = 0x20000
-       O_NOFOLLOW                        = 0x100
-       O_NOFOLLOW_ANY                    = 0x20000000
-       O_NONBLOCK                        = 0x4
-       O_POPUP                           = 0x80000000
-       O_RDONLY                          = 0x0
-       O_RDWR                            = 0x2
-       O_SHLOCK                          = 0x10
-       O_SYMLINK                         = 0x200000
-       O_SYNC                            = 0x80
-       O_TRUNC                           = 0x400
-       O_WRONLY                          = 0x1
-       PARENB                            = 0x1000
-       PARMRK                            = 0x8
-       PARODD                            = 0x2000
-       PENDIN                            = 0x20000000
-       PRIO_PGRP                         = 0x1
-       PRIO_PROCESS                      = 0x0
-       PRIO_USER                         = 0x2
-       PROT_EXEC                         = 0x4
-       PROT_NONE                         = 0x0
-       PROT_READ                         = 0x1
-       PROT_WRITE                        = 0x2
-       PT_ATTACH                         = 0xa
-       PT_ATTACHEXC                      = 0xe
-       PT_CONTINUE                       = 0x7
-       PT_DENY_ATTACH                    = 0x1f
-       PT_DETACH                         = 0xb
-       PT_FIRSTMACH                      = 0x20
-       PT_FORCEQUOTA                     = 0x1e
-       PT_KILL                           = 0x8
-       PT_READ_D                         = 0x2
-       PT_READ_I                         = 0x1
-       PT_READ_U                         = 0x3
-       PT_SIGEXC                         = 0xc
-       PT_STEP                           = 0x9
-       PT_THUPDATE                       = 0xd
-       PT_TRACE_ME                       = 0x0
-       PT_WRITE_D                        = 0x5
-       PT_WRITE_I                        = 0x4
-       PT_WRITE_U                        = 0x6
-       RLIMIT_AS                         = 0x5
-       RLIMIT_CORE                       = 0x4
-       RLIMIT_CPU                        = 0x0
-       RLIMIT_CPU_USAGE_MONITOR          = 0x2
-       RLIMIT_DATA                       = 0x2
-       RLIMIT_FSIZE                      = 0x1
-       RLIMIT_MEMLOCK                    = 0x6
-       RLIMIT_NOFILE                     = 0x8
-       RLIMIT_NPROC                      = 0x7
-       RLIMIT_RSS                        = 0x5
-       RLIMIT_STACK                      = 0x3
-       RLIM_INFINITY                     = 0x7fffffffffffffff
-       RTAX_AUTHOR                       = 0x6
-       RTAX_BRD                          = 0x7
-       RTAX_DST                          = 0x0
-       RTAX_GATEWAY                      = 0x1
-       RTAX_GENMASK                      = 0x3
-       RTAX_IFA                          = 0x5
-       RTAX_IFP                          = 0x4
-       RTAX_MAX                          = 0x8
-       RTAX_NETMASK                      = 0x2
-       RTA_AUTHOR                        = 0x40
-       RTA_BRD                           = 0x80
-       RTA_DST                           = 0x1
-       RTA_GATEWAY                       = 0x2
-       RTA_GENMASK                       = 0x8
-       RTA_IFA                           = 0x20
-       RTA_IFP                           = 0x10
-       RTA_NETMASK                       = 0x4
-       RTF_BLACKHOLE                     = 0x1000
-       RTF_BROADCAST                     = 0x400000
-       RTF_CLONING                       = 0x100
-       RTF_CONDEMNED                     = 0x2000000
-       RTF_DEAD                          = 0x20000000
-       RTF_DELCLONE                      = 0x80
-       RTF_DONE                          = 0x40
-       RTF_DYNAMIC                       = 0x10
-       RTF_GATEWAY                       = 0x2
-       RTF_GLOBAL                        = 0x40000000
-       RTF_HOST                          = 0x4
-       RTF_IFREF                         = 0x4000000
-       RTF_IFSCOPE                       = 0x1000000
-       RTF_LLDATA                        = 0x400
-       RTF_LLINFO                        = 0x400
-       RTF_LOCAL                         = 0x200000
-       RTF_MODIFIED                      = 0x20
-       RTF_MULTICAST                     = 0x800000
-       RTF_NOIFREF                       = 0x2000
-       RTF_PINNED                        = 0x100000
-       RTF_PRCLONING                     = 0x10000
-       RTF_PROTO1                        = 0x8000
-       RTF_PROTO2                        = 0x4000
-       RTF_PROTO3                        = 0x40000
-       RTF_PROXY                         = 0x8000000
-       RTF_REJECT                        = 0x8
-       RTF_ROUTER                        = 0x10000000
-       RTF_STATIC                        = 0x800
-       RTF_UP                            = 0x1
-       RTF_WASCLONED                     = 0x20000
-       RTF_XRESOLVE                      = 0x200
-       RTM_ADD                           = 0x1
-       RTM_CHANGE                        = 0x3
-       RTM_DELADDR                       = 0xd
-       RTM_DELETE                        = 0x2
-       RTM_DELMADDR                      = 0x10
-       RTM_GET                           = 0x4
-       RTM_GET2                          = 0x14
-       RTM_IFINFO                        = 0xe
-       RTM_IFINFO2                       = 0x12
-       RTM_LOCK                          = 0x8
-       RTM_LOSING                        = 0x5
-       RTM_MISS                          = 0x7
-       RTM_NEWADDR                       = 0xc
-       RTM_NEWMADDR                      = 0xf
-       RTM_NEWMADDR2                     = 0x13
-       RTM_OLDADD                        = 0x9
-       RTM_OLDDEL                        = 0xa
-       RTM_REDIRECT                      = 0x6
-       RTM_RESOLVE                       = 0xb
-       RTM_RTTUNIT                       = 0xf4240
-       RTM_VERSION                       = 0x5
-       RTV_EXPIRE                        = 0x4
-       RTV_HOPCOUNT                      = 0x2
-       RTV_MTU                           = 0x1
-       RTV_RPIPE                         = 0x8
-       RTV_RTT                           = 0x40
-       RTV_RTTVAR                        = 0x80
-       RTV_SPIPE                         = 0x10
-       RTV_SSTHRESH                      = 0x20
-       RUSAGE_CHILDREN                   = -0x1
-       RUSAGE_SELF                       = 0x0
-       SCM_CREDS                         = 0x3
-       SCM_RIGHTS                        = 0x1
-       SCM_TIMESTAMP                     = 0x2
-       SCM_TIMESTAMP_MONOTONIC           = 0x4
-       SEEK_CUR                          = 0x1
-       SEEK_DATA                         = 0x4
-       SEEK_END                          = 0x2
-       SEEK_HOLE                         = 0x3
-       SEEK_SET                          = 0x0
-       SHUT_RD                           = 0x0
-       SHUT_RDWR                         = 0x2
-       SHUT_WR                           = 0x1
-       SIOCADDMULTI                      = 0x80206931
-       SIOCAIFADDR                       = 0x8040691a
-       SIOCARPIPLL                       = 0xc0206928
-       SIOCATMARK                        = 0x40047307
-       SIOCAUTOADDR                      = 0xc0206926
-       SIOCAUTONETMASK                   = 0x80206927
-       SIOCDELMULTI                      = 0x80206932
-       SIOCDIFADDR                       = 0x80206919
-       SIOCDIFPHYADDR                    = 0x80206941
-       SIOCGDRVSPEC                      = 0xc028697b
-       SIOCGETVLAN                       = 0xc020697f
-       SIOCGHIWAT                        = 0x40047301
-       SIOCGIF6LOWPAN                    = 0xc02069c5
-       SIOCGIFADDR                       = 0xc0206921
-       SIOCGIFALTMTU                     = 0xc0206948
-       SIOCGIFASYNCMAP                   = 0xc020697c
-       SIOCGIFBOND                       = 0xc0206947
-       SIOCGIFBRDADDR                    = 0xc0206923
-       SIOCGIFCAP                        = 0xc020695b
-       SIOCGIFCONF                       = 0xc00c6924
-       SIOCGIFDEVMTU                     = 0xc0206944
-       SIOCGIFDSTADDR                    = 0xc0206922
-       SIOCGIFFLAGS                      = 0xc0206911
-       SIOCGIFFUNCTIONALTYPE             = 0xc02069ad
-       SIOCGIFGENERIC                    = 0xc020693a
-       SIOCGIFKPI                        = 0xc0206987
-       SIOCGIFMAC                        = 0xc0206982
-       SIOCGIFMEDIA                      = 0xc02c6938
-       SIOCGIFMETRIC                     = 0xc0206917
-       SIOCGIFMTU                        = 0xc0206933
-       SIOCGIFNETMASK                    = 0xc0206925
-       SIOCGIFPDSTADDR                   = 0xc0206940
-       SIOCGIFPHYS                       = 0xc0206935
-       SIOCGIFPSRCADDR                   = 0xc020693f
-       SIOCGIFSTATUS                     = 0xc331693d
-       SIOCGIFVLAN                       = 0xc020697f
-       SIOCGIFWAKEFLAGS                  = 0xc0206988
-       SIOCGIFXMEDIA                     = 0xc02c6948
-       SIOCGLOWAT                        = 0x40047303
-       SIOCGPGRP                         = 0x40047309
-       SIOCIFCREATE                      = 0xc0206978
-       SIOCIFCREATE2                     = 0xc020697a
-       SIOCIFDESTROY                     = 0x80206979
-       SIOCIFGCLONERS                    = 0xc0106981
-       SIOCRSLVMULTI                     = 0xc010693b
-       SIOCSDRVSPEC                      = 0x8028697b
-       SIOCSETVLAN                       = 0x8020697e
-       SIOCSHIWAT                        = 0x80047300
-       SIOCSIF6LOWPAN                    = 0x802069c4
-       SIOCSIFADDR                       = 0x8020690c
-       SIOCSIFALTMTU                     = 0x80206945
-       SIOCSIFASYNCMAP                   = 0x8020697d
-       SIOCSIFBOND                       = 0x80206946
-       SIOCSIFBRDADDR                    = 0x80206913
-       SIOCSIFCAP                        = 0x8020695a
-       SIOCSIFDSTADDR                    = 0x8020690e
-       SIOCSIFFLAGS                      = 0x80206910
-       SIOCSIFGENERIC                    = 0x80206939
-       SIOCSIFKPI                        = 0x80206986
-       SIOCSIFLLADDR                     = 0x8020693c
-       SIOCSIFMAC                        = 0x80206983
-       SIOCSIFMEDIA                      = 0xc0206937
-       SIOCSIFMETRIC                     = 0x80206918
-       SIOCSIFMTU                        = 0x80206934
-       SIOCSIFNETMASK                    = 0x80206916
-       SIOCSIFPHYADDR                    = 0x8040693e
-       SIOCSIFPHYS                       = 0x80206936
-       SIOCSIFVLAN                       = 0x8020697e
-       SIOCSLOWAT                        = 0x80047302
-       SIOCSPGRP                         = 0x80047308
-       SOCK_DGRAM                        = 0x2
-       SOCK_MAXADDRLEN                   = 0xff
-       SOCK_RAW                          = 0x3
-       SOCK_RDM                          = 0x4
-       SOCK_SEQPACKET                    = 0x5
-       SOCK_STREAM                       = 0x1
-       SOL_LOCAL                         = 0x0
-       SOL_SOCKET                        = 0xffff
-       SOMAXCONN                         = 0x80
-       SO_ACCEPTCONN                     = 0x2
-       SO_BROADCAST                      = 0x20
-       SO_DEBUG                          = 0x1
-       SO_DONTROUTE                      = 0x10
-       SO_DONTTRUNC                      = 0x2000
-       SO_ERROR                          = 0x1007
-       SO_KEEPALIVE                      = 0x8
-       SO_LABEL                          = 0x1010
-       SO_LINGER                         = 0x80
-       SO_LINGER_SEC                     = 0x1080
-       SO_NETSVC_MARKING_LEVEL           = 0x1119
-       SO_NET_SERVICE_TYPE               = 0x1116
-       SO_NKE                            = 0x1021
-       SO_NOADDRERR                      = 0x1023
-       SO_NOSIGPIPE                      = 0x1022
-       SO_NOTIFYCONFLICT                 = 0x1026
-       SO_NP_EXTENSIONS                  = 0x1083
-       SO_NREAD                          = 0x1020
-       SO_NUMRCVPKT                      = 0x1112
-       SO_NWRITE                         = 0x1024
-       SO_OOBINLINE                      = 0x100
-       SO_PEERLABEL                      = 0x1011
-       SO_RANDOMPORT                     = 0x1082
-       SO_RCVBUF                         = 0x1002
-       SO_RCVLOWAT                       = 0x1004
-       SO_RCVTIMEO                       = 0x1006
-       SO_REUSEADDR                      = 0x4
-       SO_REUSEPORT                      = 0x200
-       SO_REUSESHAREUID                  = 0x1025
-       SO_SNDBUF                         = 0x1001
-       SO_SNDLOWAT                       = 0x1003
-       SO_SNDTIMEO                       = 0x1005
-       SO_TIMESTAMP                      = 0x400
-       SO_TIMESTAMP_MONOTONIC            = 0x800
-       SO_TYPE                           = 0x1008
-       SO_UPCALLCLOSEWAIT                = 0x1027
-       SO_USELOOPBACK                    = 0x40
-       SO_WANTMORE                       = 0x4000
-       SO_WANTOOBFLAG                    = 0x8000
-       S_IEXEC                           = 0x40
-       S_IFBLK                           = 0x6000
-       S_IFCHR                           = 0x2000
-       S_IFDIR                           = 0x4000
-       S_IFIFO                           = 0x1000
-       S_IFLNK                           = 0xa000
-       S_IFMT                            = 0xf000
-       S_IFREG                           = 0x8000
-       S_IFSOCK                          = 0xc000
-       S_IFWHT                           = 0xe000
-       S_IREAD                           = 0x100
-       S_IRGRP                           = 0x20
-       S_IROTH                           = 0x4
-       S_IRUSR                           = 0x100
-       S_IRWXG                           = 0x38
-       S_IRWXO                           = 0x7
-       S_IRWXU                           = 0x1c0
-       S_ISGID                           = 0x400
-       S_ISTXT                           = 0x200
-       S_ISUID                           = 0x800
-       S_ISVTX                           = 0x200
-       S_IWGRP                           = 0x10
-       S_IWOTH                           = 0x2
-       S_IWRITE                          = 0x80
-       S_IWUSR                           = 0x80
-       S_IXGRP                           = 0x8
-       S_IXOTH                           = 0x1
-       S_IXUSR                           = 0x40
-       TAB0                              = 0x0
-       TAB1                              = 0x400
-       TAB2                              = 0x800
-       TAB3                              = 0x4
-       TABDLY                            = 0xc04
-       TCIFLUSH                          = 0x1
-       TCIOFF                            = 0x3
-       TCIOFLUSH                         = 0x3
-       TCION                             = 0x4
-       TCOFLUSH                          = 0x2
-       TCOOFF                            = 0x1
-       TCOON                             = 0x2
-       TCP_CONNECTIONTIMEOUT             = 0x20
-       TCP_CONNECTION_INFO               = 0x106
-       TCP_ENABLE_ECN                    = 0x104
-       TCP_FASTOPEN                      = 0x105
-       TCP_KEEPALIVE                     = 0x10
-       TCP_KEEPCNT                       = 0x102
-       TCP_KEEPINTVL                     = 0x101
-       TCP_MAXHLEN                       = 0x3c
-       TCP_MAXOLEN                       = 0x28
-       TCP_MAXSEG                        = 0x2
-       TCP_MAXWIN                        = 0xffff
-       TCP_MAX_SACK                      = 0x4
-       TCP_MAX_WINSHIFT                  = 0xe
-       TCP_MINMSS                        = 0xd8
-       TCP_MSS                           = 0x200
-       TCP_NODELAY                       = 0x1
-       TCP_NOOPT                         = 0x8
-       TCP_NOPUSH                        = 0x4
-       TCP_NOTSENT_LOWAT                 = 0x201
-       TCP_RXT_CONNDROPTIME              = 0x80
-       TCP_RXT_FINDROP                   = 0x100
-       TCP_SENDMOREACKS                  = 0x103
-       TCSAFLUSH                         = 0x2
-       TIOCCBRK                          = 0x2000747a
-       TIOCCDTR                          = 0x20007478
-       TIOCCONS                          = 0x80047462
-       TIOCDCDTIMESTAMP                  = 0x40107458
-       TIOCDRAIN                         = 0x2000745e
-       TIOCDSIMICROCODE                  = 0x20007455
-       TIOCEXCL                          = 0x2000740d
-       TIOCEXT                           = 0x80047460
-       TIOCFLUSH                         = 0x80047410
-       TIOCGDRAINWAIT                    = 0x40047456
-       TIOCGETA                          = 0x40487413
-       TIOCGETD                          = 0x4004741a
-       TIOCGPGRP                         = 0x40047477
-       TIOCGWINSZ                        = 0x40087468
-       TIOCIXOFF                         = 0x20007480
-       TIOCIXON                          = 0x20007481
-       TIOCMBIC                          = 0x8004746b
-       TIOCMBIS                          = 0x8004746c
-       TIOCMGDTRWAIT                     = 0x4004745a
-       TIOCMGET                          = 0x4004746a
-       TIOCMODG                          = 0x40047403
-       TIOCMODS                          = 0x80047404
-       TIOCMSDTRWAIT                     = 0x8004745b
-       TIOCMSET                          = 0x8004746d
-       TIOCM_CAR                         = 0x40
-       TIOCM_CD                          = 0x40
-       TIOCM_CTS                         = 0x20
-       TIOCM_DSR                         = 0x100
-       TIOCM_DTR                         = 0x2
-       TIOCM_LE                          = 0x1
-       TIOCM_RI                          = 0x80
-       TIOCM_RNG                         = 0x80
-       TIOCM_RTS                         = 0x4
-       TIOCM_SR                          = 0x10
-       TIOCM_ST                          = 0x8
-       TIOCNOTTY                         = 0x20007471
-       TIOCNXCL                          = 0x2000740e
-       TIOCOUTQ                          = 0x40047473
-       TIOCPKT                           = 0x80047470
-       TIOCPKT_DATA                      = 0x0
-       TIOCPKT_DOSTOP                    = 0x20
-       TIOCPKT_FLUSHREAD                 = 0x1
-       TIOCPKT_FLUSHWRITE                = 0x2
-       TIOCPKT_IOCTL                     = 0x40
-       TIOCPKT_NOSTOP                    = 0x10
-       TIOCPKT_START                     = 0x8
-       TIOCPKT_STOP                      = 0x4
-       TIOCPTYGNAME                      = 0x40807453
-       TIOCPTYGRANT                      = 0x20007454
-       TIOCPTYUNLK                       = 0x20007452
-       TIOCREMOTE                        = 0x80047469
-       TIOCSBRK                          = 0x2000747b
-       TIOCSCONS                         = 0x20007463
-       TIOCSCTTY                         = 0x20007461
-       TIOCSDRAINWAIT                    = 0x80047457
-       TIOCSDTR                          = 0x20007479
-       TIOCSETA                          = 0x80487414
-       TIOCSETAF                         = 0x80487416
-       TIOCSETAW                         = 0x80487415
-       TIOCSETD                          = 0x8004741b
-       TIOCSIG                           = 0x2000745f
-       TIOCSPGRP                         = 0x80047476
-       TIOCSTART                         = 0x2000746e
-       TIOCSTAT                          = 0x20007465
-       TIOCSTI                           = 0x80017472
-       TIOCSTOP                          = 0x2000746f
-       TIOCSWINSZ                        = 0x80087467
-       TIOCTIMESTAMP                     = 0x40107459
-       TIOCUCNTL                         = 0x80047466
-       TOSTOP                            = 0x400000
-       VDISCARD                          = 0xf
-       VDSUSP                            = 0xb
-       VEOF                              = 0x0
-       VEOL                              = 0x1
-       VEOL2                             = 0x2
-       VERASE                            = 0x3
-       VINTR                             = 0x8
-       VKILL                             = 0x5
-       VLNEXT                            = 0xe
-       VMIN                              = 0x10
-       VM_LOADAVG                        = 0x2
-       VM_MACHFACTOR                     = 0x4
-       VM_MAXID                          = 0x6
-       VM_METER                          = 0x1
-       VM_SWAPUSAGE                      = 0x5
-       VQUIT                             = 0x9
-       VREPRINT                          = 0x6
-       VSTART                            = 0xc
-       VSTATUS                           = 0x12
-       VSTOP                             = 0xd
-       VSUSP                             = 0xa
-       VT0                               = 0x0
-       VT1                               = 0x10000
-       VTDLY                             = 0x10000
-       VTIME                             = 0x11
-       VWERASE                           = 0x4
-       WCONTINUED                        = 0x10
-       WCOREFLAG                         = 0x80
-       WEXITED                           = 0x4
-       WNOHANG                           = 0x1
-       WNOWAIT                           = 0x20
-       WORDSIZE                          = 0x40
-       WSTOPPED                          = 0x8
-       WUNTRACED                         = 0x2
-       XATTR_CREATE                      = 0x2
-       XATTR_NODEFAULT                   = 0x10
-       XATTR_NOFOLLOW                    = 0x1
-       XATTR_NOSECURITY                  = 0x8
-       XATTR_REPLACE                     = 0x4
-       XATTR_SHOWCOMPRESSION             = 0x20
+       AF_APPLETALK                            = 0x10
+       AF_CCITT                                = 0xa
+       AF_CHAOS                                = 0x5
+       AF_CNT                                  = 0x15
+       AF_COIP                                 = 0x14
+       AF_DATAKIT                              = 0x9
+       AF_DECnet                               = 0xc
+       AF_DLI                                  = 0xd
+       AF_E164                                 = 0x1c
+       AF_ECMA                                 = 0x8
+       AF_HYLINK                               = 0xf
+       AF_IEEE80211                            = 0x25
+       AF_IMPLINK                              = 0x3
+       AF_INET                                 = 0x2
+       AF_INET6                                = 0x1e
+       AF_IPX                                  = 0x17
+       AF_ISDN                                 = 0x1c
+       AF_ISO                                  = 0x7
+       AF_LAT                                  = 0xe
+       AF_LINK                                 = 0x12
+       AF_LOCAL                                = 0x1
+       AF_MAX                                  = 0x29
+       AF_NATM                                 = 0x1f
+       AF_NDRV                                 = 0x1b
+       AF_NETBIOS                              = 0x21
+       AF_NS                                   = 0x6
+       AF_OSI                                  = 0x7
+       AF_PPP                                  = 0x22
+       AF_PUP                                  = 0x4
+       AF_RESERVED_36                          = 0x24
+       AF_ROUTE                                = 0x11
+       AF_SIP                                  = 0x18
+       AF_SNA                                  = 0xb
+       AF_SYSTEM                               = 0x20
+       AF_SYS_CONTROL                          = 0x2
+       AF_UNIX                                 = 0x1
+       AF_UNSPEC                               = 0x0
+       AF_UTUN                                 = 0x26
+       AF_VSOCK                                = 0x28
+       ALTWERASE                               = 0x200
+       ATTR_BIT_MAP_COUNT                      = 0x5
+       ATTR_CMN_ACCESSMASK                     = 0x20000
+       ATTR_CMN_ACCTIME                        = 0x1000
+       ATTR_CMN_ADDEDTIME                      = 0x10000000
+       ATTR_CMN_BKUPTIME                       = 0x2000
+       ATTR_CMN_CHGTIME                        = 0x800
+       ATTR_CMN_CRTIME                         = 0x200
+       ATTR_CMN_DATA_PROTECT_FLAGS             = 0x40000000
+       ATTR_CMN_DEVID                          = 0x2
+       ATTR_CMN_DOCUMENT_ID                    = 0x100000
+       ATTR_CMN_ERROR                          = 0x20000000
+       ATTR_CMN_EXTENDED_SECURITY              = 0x400000
+       ATTR_CMN_FILEID                         = 0x2000000
+       ATTR_CMN_FLAGS                          = 0x40000
+       ATTR_CMN_FNDRINFO                       = 0x4000
+       ATTR_CMN_FSID                           = 0x4
+       ATTR_CMN_FULLPATH                       = 0x8000000
+       ATTR_CMN_GEN_COUNT                      = 0x80000
+       ATTR_CMN_GRPID                          = 0x10000
+       ATTR_CMN_GRPUUID                        = 0x1000000
+       ATTR_CMN_MODTIME                        = 0x400
+       ATTR_CMN_NAME                           = 0x1
+       ATTR_CMN_NAMEDATTRCOUNT                 = 0x80000
+       ATTR_CMN_NAMEDATTRLIST                  = 0x100000
+       ATTR_CMN_OBJID                          = 0x20
+       ATTR_CMN_OBJPERMANENTID                 = 0x40
+       ATTR_CMN_OBJTAG                         = 0x10
+       ATTR_CMN_OBJTYPE                        = 0x8
+       ATTR_CMN_OWNERID                        = 0x8000
+       ATTR_CMN_PARENTID                       = 0x4000000
+       ATTR_CMN_PAROBJID                       = 0x80
+       ATTR_CMN_RETURNED_ATTRS                 = 0x80000000
+       ATTR_CMN_SCRIPT                         = 0x100
+       ATTR_CMN_SETMASK                        = 0x51c7ff00
+       ATTR_CMN_USERACCESS                     = 0x200000
+       ATTR_CMN_UUID                           = 0x800000
+       ATTR_CMN_VALIDMASK                      = 0xffffffff
+       ATTR_CMN_VOLSETMASK                     = 0x6700
+       ATTR_FILE_ALLOCSIZE                     = 0x4
+       ATTR_FILE_CLUMPSIZE                     = 0x10
+       ATTR_FILE_DATAALLOCSIZE                 = 0x400
+       ATTR_FILE_DATAEXTENTS                   = 0x800
+       ATTR_FILE_DATALENGTH                    = 0x200
+       ATTR_FILE_DEVTYPE                       = 0x20
+       ATTR_FILE_FILETYPE                      = 0x40
+       ATTR_FILE_FORKCOUNT                     = 0x80
+       ATTR_FILE_FORKLIST                      = 0x100
+       ATTR_FILE_IOBLOCKSIZE                   = 0x8
+       ATTR_FILE_LINKCOUNT                     = 0x1
+       ATTR_FILE_RSRCALLOCSIZE                 = 0x2000
+       ATTR_FILE_RSRCEXTENTS                   = 0x4000
+       ATTR_FILE_RSRCLENGTH                    = 0x1000
+       ATTR_FILE_SETMASK                       = 0x20
+       ATTR_FILE_TOTALSIZE                     = 0x2
+       ATTR_FILE_VALIDMASK                     = 0x37ff
+       ATTR_VOL_ALLOCATIONCLUMP                = 0x40
+       ATTR_VOL_ATTRIBUTES                     = 0x40000000
+       ATTR_VOL_CAPABILITIES                   = 0x20000
+       ATTR_VOL_DIRCOUNT                       = 0x400
+       ATTR_VOL_ENCODINGSUSED                  = 0x10000
+       ATTR_VOL_FILECOUNT                      = 0x200
+       ATTR_VOL_FSTYPE                         = 0x1
+       ATTR_VOL_INFO                           = 0x80000000
+       ATTR_VOL_IOBLOCKSIZE                    = 0x80
+       ATTR_VOL_MAXOBJCOUNT                    = 0x800
+       ATTR_VOL_MINALLOCATION                  = 0x20
+       ATTR_VOL_MOUNTEDDEVICE                  = 0x8000
+       ATTR_VOL_MOUNTFLAGS                     = 0x4000
+       ATTR_VOL_MOUNTPOINT                     = 0x1000
+       ATTR_VOL_NAME                           = 0x2000
+       ATTR_VOL_OBJCOUNT                       = 0x100
+       ATTR_VOL_QUOTA_SIZE                     = 0x10000000
+       ATTR_VOL_RESERVED_SIZE                  = 0x20000000
+       ATTR_VOL_SETMASK                        = 0x80002000
+       ATTR_VOL_SIGNATURE                      = 0x2
+       ATTR_VOL_SIZE                           = 0x4
+       ATTR_VOL_SPACEAVAIL                     = 0x10
+       ATTR_VOL_SPACEFREE                      = 0x8
+       ATTR_VOL_SPACEUSED                      = 0x800000
+       ATTR_VOL_UUID                           = 0x40000
+       ATTR_VOL_VALIDMASK                      = 0xf087ffff
+       B0                                      = 0x0
+       B110                                    = 0x6e
+       B115200                                 = 0x1c200
+       B1200                                   = 0x4b0
+       B134                                    = 0x86
+       B14400                                  = 0x3840
+       B150                                    = 0x96
+       B1800                                   = 0x708
+       B19200                                  = 0x4b00
+       B200                                    = 0xc8
+       B230400                                 = 0x38400
+       B2400                                   = 0x960
+       B28800                                  = 0x7080
+       B300                                    = 0x12c
+       B38400                                  = 0x9600
+       B4800                                   = 0x12c0
+       B50                                     = 0x32
+       B57600                                  = 0xe100
+       B600                                    = 0x258
+       B7200                                   = 0x1c20
+       B75                                     = 0x4b
+       B76800                                  = 0x12c00
+       B9600                                   = 0x2580
+       BIOCFLUSH                               = 0x20004268
+       BIOCGBLEN                               = 0x40044266
+       BIOCGDLT                                = 0x4004426a
+       BIOCGDLTLIST                            = 0xc00c4279
+       BIOCGETIF                               = 0x4020426b
+       BIOCGHDRCMPLT                           = 0x40044274
+       BIOCGRSIG                               = 0x40044272
+       BIOCGRTIMEOUT                           = 0x4010426e
+       BIOCGSEESENT                            = 0x40044276
+       BIOCGSTATS                              = 0x4008426f
+       BIOCIMMEDIATE                           = 0x80044270
+       BIOCPROMISC                             = 0x20004269
+       BIOCSBLEN                               = 0xc0044266
+       BIOCSDLT                                = 0x80044278
+       BIOCSETF                                = 0x80104267
+       BIOCSETFNR                              = 0x8010427e
+       BIOCSETIF                               = 0x8020426c
+       BIOCSHDRCMPLT                           = 0x80044275
+       BIOCSRSIG                               = 0x80044273
+       BIOCSRTIMEOUT                           = 0x8010426d
+       BIOCSSEESENT                            = 0x80044277
+       BIOCVERSION                             = 0x40044271
+       BPF_A                                   = 0x10
+       BPF_ABS                                 = 0x20
+       BPF_ADD                                 = 0x0
+       BPF_ALIGNMENT                           = 0x4
+       BPF_ALU                                 = 0x4
+       BPF_AND                                 = 0x50
+       BPF_B                                   = 0x10
+       BPF_DIV                                 = 0x30
+       BPF_H                                   = 0x8
+       BPF_IMM                                 = 0x0
+       BPF_IND                                 = 0x40
+       BPF_JA                                  = 0x0
+       BPF_JEQ                                 = 0x10
+       BPF_JGE                                 = 0x30
+       BPF_JGT                                 = 0x20
+       BPF_JMP                                 = 0x5
+       BPF_JSET                                = 0x40
+       BPF_K                                   = 0x0
+       BPF_LD                                  = 0x0
+       BPF_LDX                                 = 0x1
+       BPF_LEN                                 = 0x80
+       BPF_LSH                                 = 0x60
+       BPF_MAJOR_VERSION                       = 0x1
+       BPF_MAXBUFSIZE                          = 0x80000
+       BPF_MAXINSNS                            = 0x200
+       BPF_MEM                                 = 0x60
+       BPF_MEMWORDS                            = 0x10
+       BPF_MINBUFSIZE                          = 0x20
+       BPF_MINOR_VERSION                       = 0x1
+       BPF_MISC                                = 0x7
+       BPF_MSH                                 = 0xa0
+       BPF_MUL                                 = 0x20
+       BPF_NEG                                 = 0x80
+       BPF_OR                                  = 0x40
+       BPF_RELEASE                             = 0x30bb6
+       BPF_RET                                 = 0x6
+       BPF_RSH                                 = 0x70
+       BPF_ST                                  = 0x2
+       BPF_STX                                 = 0x3
+       BPF_SUB                                 = 0x10
+       BPF_TAX                                 = 0x0
+       BPF_TXA                                 = 0x80
+       BPF_W                                   = 0x0
+       BPF_X                                   = 0x8
+       BRKINT                                  = 0x2
+       BS0                                     = 0x0
+       BS1                                     = 0x8000
+       BSDLY                                   = 0x8000
+       CFLUSH                                  = 0xf
+       CLOCAL                                  = 0x8000
+       CLOCK_MONOTONIC                         = 0x6
+       CLOCK_MONOTONIC_RAW                     = 0x4
+       CLOCK_MONOTONIC_RAW_APPROX              = 0x5
+       CLOCK_PROCESS_CPUTIME_ID                = 0xc
+       CLOCK_REALTIME                          = 0x0
+       CLOCK_THREAD_CPUTIME_ID                 = 0x10
+       CLOCK_UPTIME_RAW                        = 0x8
+       CLOCK_UPTIME_RAW_APPROX                 = 0x9
+       CLONE_NOFOLLOW                          = 0x1
+       CLONE_NOOWNERCOPY                       = 0x2
+       CR0                                     = 0x0
+       CR1                                     = 0x1000
+       CR2                                     = 0x2000
+       CR3                                     = 0x3000
+       CRDLY                                   = 0x3000
+       CREAD                                   = 0x800
+       CRTSCTS                                 = 0x30000
+       CS5                                     = 0x0
+       CS6                                     = 0x100
+       CS7                                     = 0x200
+       CS8                                     = 0x300
+       CSIZE                                   = 0x300
+       CSTART                                  = 0x11
+       CSTATUS                                 = 0x14
+       CSTOP                                   = 0x13
+       CSTOPB                                  = 0x400
+       CSUSP                                   = 0x1a
+       CTLIOCGINFO                             = 0xc0644e03
+       CTL_HW                                  = 0x6
+       CTL_KERN                                = 0x1
+       CTL_MAXNAME                             = 0xc
+       CTL_NET                                 = 0x4
+       DLT_A429                                = 0xb8
+       DLT_A653_ICM                            = 0xb9
+       DLT_AIRONET_HEADER                      = 0x78
+       DLT_AOS                                 = 0xde
+       DLT_APPLE_IP_OVER_IEEE1394              = 0x8a
+       DLT_ARCNET                              = 0x7
+       DLT_ARCNET_LINUX                        = 0x81
+       DLT_ATM_CLIP                            = 0x13
+       DLT_ATM_RFC1483                         = 0xb
+       DLT_AURORA                              = 0x7e
+       DLT_AX25                                = 0x3
+       DLT_AX25_KISS                           = 0xca
+       DLT_BACNET_MS_TP                        = 0xa5
+       DLT_BLUETOOTH_HCI_H4                    = 0xbb
+       DLT_BLUETOOTH_HCI_H4_WITH_PHDR          = 0xc9
+       DLT_CAN20B                              = 0xbe
+       DLT_CAN_SOCKETCAN                       = 0xe3
+       DLT_CHAOS                               = 0x5
+       DLT_CHDLC                               = 0x68
+       DLT_CISCO_IOS                           = 0x76
+       DLT_C_HDLC                              = 0x68
+       DLT_C_HDLC_WITH_DIR                     = 0xcd
+       DLT_DBUS                                = 0xe7
+       DLT_DECT                                = 0xdd
+       DLT_DOCSIS                              = 0x8f
+       DLT_DVB_CI                              = 0xeb
+       DLT_ECONET                              = 0x73
+       DLT_EN10MB                              = 0x1
+       DLT_EN3MB                               = 0x2
+       DLT_ENC                                 = 0x6d
+       DLT_ERF                                 = 0xc5
+       DLT_ERF_ETH                             = 0xaf
+       DLT_ERF_POS                             = 0xb0
+       DLT_FC_2                                = 0xe0
+       DLT_FC_2_WITH_FRAME_DELIMS              = 0xe1
+       DLT_FDDI                                = 0xa
+       DLT_FLEXRAY                             = 0xd2
+       DLT_FRELAY                              = 0x6b
+       DLT_FRELAY_WITH_DIR                     = 0xce
+       DLT_GCOM_SERIAL                         = 0xad
+       DLT_GCOM_T1E1                           = 0xac
+       DLT_GPF_F                               = 0xab
+       DLT_GPF_T                               = 0xaa
+       DLT_GPRS_LLC                            = 0xa9
+       DLT_GSMTAP_ABIS                         = 0xda
+       DLT_GSMTAP_UM                           = 0xd9
+       DLT_HHDLC                               = 0x79
+       DLT_IBM_SN                              = 0x92
+       DLT_IBM_SP                              = 0x91
+       DLT_IEEE802                             = 0x6
+       DLT_IEEE802_11                          = 0x69
+       DLT_IEEE802_11_RADIO                    = 0x7f
+       DLT_IEEE802_11_RADIO_AVS                = 0xa3
+       DLT_IEEE802_15_4                        = 0xc3
+       DLT_IEEE802_15_4_LINUX                  = 0xbf
+       DLT_IEEE802_15_4_NOFCS                  = 0xe6
+       DLT_IEEE802_15_4_NONASK_PHY             = 0xd7
+       DLT_IEEE802_16_MAC_CPS                  = 0xbc
+       DLT_IEEE802_16_MAC_CPS_RADIO            = 0xc1
+       DLT_IPFILTER                            = 0x74
+       DLT_IPMB                                = 0xc7
+       DLT_IPMB_LINUX                          = 0xd1
+       DLT_IPNET                               = 0xe2
+       DLT_IPOIB                               = 0xf2
+       DLT_IPV4                                = 0xe4
+       DLT_IPV6                                = 0xe5
+       DLT_IP_OVER_FC                          = 0x7a
+       DLT_JUNIPER_ATM1                        = 0x89
+       DLT_JUNIPER_ATM2                        = 0x87
+       DLT_JUNIPER_ATM_CEMIC                   = 0xee
+       DLT_JUNIPER_CHDLC                       = 0xb5
+       DLT_JUNIPER_ES                          = 0x84
+       DLT_JUNIPER_ETHER                       = 0xb2
+       DLT_JUNIPER_FIBRECHANNEL                = 0xea
+       DLT_JUNIPER_FRELAY                      = 0xb4
+       DLT_JUNIPER_GGSN                        = 0x85
+       DLT_JUNIPER_ISM                         = 0xc2
+       DLT_JUNIPER_MFR                         = 0x86
+       DLT_JUNIPER_MLFR                        = 0x83
+       DLT_JUNIPER_MLPPP                       = 0x82
+       DLT_JUNIPER_MONITOR                     = 0xa4
+       DLT_JUNIPER_PIC_PEER                    = 0xae
+       DLT_JUNIPER_PPP                         = 0xb3
+       DLT_JUNIPER_PPPOE                       = 0xa7
+       DLT_JUNIPER_PPPOE_ATM                   = 0xa8
+       DLT_JUNIPER_SERVICES                    = 0x88
+       DLT_JUNIPER_SRX_E2E                     = 0xe9
+       DLT_JUNIPER_ST                          = 0xc8
+       DLT_JUNIPER_VP                          = 0xb7
+       DLT_JUNIPER_VS                          = 0xe8
+       DLT_LAPB_WITH_DIR                       = 0xcf
+       DLT_LAPD                                = 0xcb
+       DLT_LIN                                 = 0xd4
+       DLT_LINUX_EVDEV                         = 0xd8
+       DLT_LINUX_IRDA                          = 0x90
+       DLT_LINUX_LAPD                          = 0xb1
+       DLT_LINUX_PPP_WITHDIRECTION             = 0xa6
+       DLT_LINUX_SLL                           = 0x71
+       DLT_LOOP                                = 0x6c
+       DLT_LTALK                               = 0x72
+       DLT_MATCHING_MAX                        = 0x10a
+       DLT_MATCHING_MIN                        = 0x68
+       DLT_MFR                                 = 0xb6
+       DLT_MOST                                = 0xd3
+       DLT_MPEG_2_TS                           = 0xf3
+       DLT_MPLS                                = 0xdb
+       DLT_MTP2                                = 0x8c
+       DLT_MTP2_WITH_PHDR                      = 0x8b
+       DLT_MTP3                                = 0x8d
+       DLT_MUX27010                            = 0xec
+       DLT_NETANALYZER                         = 0xf0
+       DLT_NETANALYZER_TRANSPARENT             = 0xf1
+       DLT_NFC_LLCP                            = 0xf5
+       DLT_NFLOG                               = 0xef
+       DLT_NG40                                = 0xf4
+       DLT_NULL                                = 0x0
+       DLT_PCI_EXP                             = 0x7d
+       DLT_PFLOG                               = 0x75
+       DLT_PFSYNC                              = 0x12
+       DLT_PPI                                 = 0xc0
+       DLT_PPP                                 = 0x9
+       DLT_PPP_BSDOS                           = 0x10
+       DLT_PPP_ETHER                           = 0x33
+       DLT_PPP_PPPD                            = 0xa6
+       DLT_PPP_SERIAL                          = 0x32
+       DLT_PPP_WITH_DIR                        = 0xcc
+       DLT_PPP_WITH_DIRECTION                  = 0xa6
+       DLT_PRISM_HEADER                        = 0x77
+       DLT_PRONET                              = 0x4
+       DLT_RAIF1                               = 0xc6
+       DLT_RAW                                 = 0xc
+       DLT_RIO                                 = 0x7c
+       DLT_SCCP                                = 0x8e
+       DLT_SITA                                = 0xc4
+       DLT_SLIP                                = 0x8
+       DLT_SLIP_BSDOS                          = 0xf
+       DLT_STANAG_5066_D_PDU                   = 0xed
+       DLT_SUNATM                              = 0x7b
+       DLT_SYMANTEC_FIREWALL                   = 0x63
+       DLT_TZSP                                = 0x80
+       DLT_USB                                 = 0xba
+       DLT_USB_DARWIN                          = 0x10a
+       DLT_USB_LINUX                           = 0xbd
+       DLT_USB_LINUX_MMAPPED                   = 0xdc
+       DLT_USER0                               = 0x93
+       DLT_USER1                               = 0x94
+       DLT_USER10                              = 0x9d
+       DLT_USER11                              = 0x9e
+       DLT_USER12                              = 0x9f
+       DLT_USER13                              = 0xa0
+       DLT_USER14                              = 0xa1
+       DLT_USER15                              = 0xa2
+       DLT_USER2                               = 0x95
+       DLT_USER3                               = 0x96
+       DLT_USER4                               = 0x97
+       DLT_USER5                               = 0x98
+       DLT_USER6                               = 0x99
+       DLT_USER7                               = 0x9a
+       DLT_USER8                               = 0x9b
+       DLT_USER9                               = 0x9c
+       DLT_WIHART                              = 0xdf
+       DLT_X2E_SERIAL                          = 0xd5
+       DLT_X2E_XORAYA                          = 0xd6
+       DT_BLK                                  = 0x6
+       DT_CHR                                  = 0x2
+       DT_DIR                                  = 0x4
+       DT_FIFO                                 = 0x1
+       DT_LNK                                  = 0xa
+       DT_REG                                  = 0x8
+       DT_SOCK                                 = 0xc
+       DT_UNKNOWN                              = 0x0
+       DT_WHT                                  = 0xe
+       ECHO                                    = 0x8
+       ECHOCTL                                 = 0x40
+       ECHOE                                   = 0x2
+       ECHOK                                   = 0x4
+       ECHOKE                                  = 0x1
+       ECHONL                                  = 0x10
+       ECHOPRT                                 = 0x20
+       EVFILT_AIO                              = -0x3
+       EVFILT_EXCEPT                           = -0xf
+       EVFILT_FS                               = -0x9
+       EVFILT_MACHPORT                         = -0x8
+       EVFILT_PROC                             = -0x5
+       EVFILT_READ                             = -0x1
+       EVFILT_SIGNAL                           = -0x6
+       EVFILT_SYSCOUNT                         = 0x11
+       EVFILT_THREADMARKER                     = 0x11
+       EVFILT_TIMER                            = -0x7
+       EVFILT_USER                             = -0xa
+       EVFILT_VM                               = -0xc
+       EVFILT_VNODE                            = -0x4
+       EVFILT_WRITE                            = -0x2
+       EV_ADD                                  = 0x1
+       EV_CLEAR                                = 0x20
+       EV_DELETE                               = 0x2
+       EV_DISABLE                              = 0x8
+       EV_DISPATCH                             = 0x80
+       EV_DISPATCH2                            = 0x180
+       EV_ENABLE                               = 0x4
+       EV_EOF                                  = 0x8000
+       EV_ERROR                                = 0x4000
+       EV_FLAG0                                = 0x1000
+       EV_FLAG1                                = 0x2000
+       EV_ONESHOT                              = 0x10
+       EV_OOBAND                               = 0x2000
+       EV_POLL                                 = 0x1000
+       EV_RECEIPT                              = 0x40
+       EV_SYSFLAGS                             = 0xf000
+       EV_UDATA_SPECIFIC                       = 0x100
+       EV_VANISHED                             = 0x200
+       EXTA                                    = 0x4b00
+       EXTB                                    = 0x9600
+       EXTPROC                                 = 0x800
+       FD_CLOEXEC                              = 0x1
+       FD_SETSIZE                              = 0x400
+       FF0                                     = 0x0
+       FF1                                     = 0x4000
+       FFDLY                                   = 0x4000
+       FLUSHO                                  = 0x800000
+       FSOPT_ATTR_CMN_EXTENDED                 = 0x20
+       FSOPT_NOFOLLOW                          = 0x1
+       FSOPT_NOINMEMUPDATE                     = 0x2
+       FSOPT_PACK_INVAL_ATTRS                  = 0x8
+       FSOPT_REPORT_FULLSIZE                   = 0x4
+       FSOPT_RETURN_REALDEV                    = 0x200
+       F_ADDFILESIGS                           = 0x3d
+       F_ADDFILESIGS_FOR_DYLD_SIM              = 0x53
+       F_ADDFILESIGS_INFO                      = 0x67
+       F_ADDFILESIGS_RETURN                    = 0x61
+       F_ADDFILESUPPL                          = 0x68
+       F_ADDSIGS                               = 0x3b
+       F_ALLOCATEALL                           = 0x4
+       F_ALLOCATECONTIG                        = 0x2
+       F_BARRIERFSYNC                          = 0x55
+       F_CHECK_LV                              = 0x62
+       F_CHKCLEAN                              = 0x29
+       F_DUPFD                                 = 0x0
+       F_DUPFD_CLOEXEC                         = 0x43
+       F_FINDSIGS                              = 0x4e
+       F_FLUSH_DATA                            = 0x28
+       F_FREEZE_FS                             = 0x35
+       F_FULLFSYNC                             = 0x33
+       F_GETCODEDIR                            = 0x48
+       F_GETFD                                 = 0x1
+       F_GETFL                                 = 0x3
+       F_GETLK                                 = 0x7
+       F_GETLKPID                              = 0x42
+       F_GETNOSIGPIPE                          = 0x4a
+       F_GETOWN                                = 0x5
+       F_GETPATH                               = 0x32
+       F_GETPATH_MTMINFO                       = 0x47
+       F_GETPATH_NOFIRMLINK                    = 0x66
+       F_GETPROTECTIONCLASS                    = 0x3f
+       F_GETPROTECTIONLEVEL                    = 0x4d
+       F_GETSIGSINFO                           = 0x69
+       F_GLOBAL_NOCACHE                        = 0x37
+       F_LOG2PHYS                              = 0x31
+       F_LOG2PHYS_EXT                          = 0x41
+       F_NOCACHE                               = 0x30
+       F_NODIRECT                              = 0x3e
+       F_OK                                    = 0x0
+       F_PATHPKG_CHECK                         = 0x34
+       F_PEOFPOSMODE                           = 0x3
+       F_PREALLOCATE                           = 0x2a
+       F_PUNCHHOLE                             = 0x63
+       F_RDADVISE                              = 0x2c
+       F_RDAHEAD                               = 0x2d
+       F_RDLCK                                 = 0x1
+       F_SETBACKINGSTORE                       = 0x46
+       F_SETFD                                 = 0x2
+       F_SETFL                                 = 0x4
+       F_SETLK                                 = 0x8
+       F_SETLKW                                = 0x9
+       F_SETLKWTIMEOUT                         = 0xa
+       F_SETNOSIGPIPE                          = 0x49
+       F_SETOWN                                = 0x6
+       F_SETPROTECTIONCLASS                    = 0x40
+       F_SETSIZE                               = 0x2b
+       F_SINGLE_WRITER                         = 0x4c
+       F_SPECULATIVE_READ                      = 0x65
+       F_THAW_FS                               = 0x36
+       F_TRANSCODEKEY                          = 0x4b
+       F_TRIM_ACTIVE_FILE                      = 0x64
+       F_UNLCK                                 = 0x2
+       F_VOLPOSMODE                            = 0x4
+       F_WRLCK                                 = 0x3
+       HUPCL                                   = 0x4000
+       HW_MACHINE                              = 0x1
+       ICANON                                  = 0x100
+       ICMP6_FILTER                            = 0x12
+       ICRNL                                   = 0x100
+       IEXTEN                                  = 0x400
+       IFF_ALLMULTI                            = 0x200
+       IFF_ALTPHYS                             = 0x4000
+       IFF_BROADCAST                           = 0x2
+       IFF_DEBUG                               = 0x4
+       IFF_LINK0                               = 0x1000
+       IFF_LINK1                               = 0x2000
+       IFF_LINK2                               = 0x4000
+       IFF_LOOPBACK                            = 0x8
+       IFF_MULTICAST                           = 0x8000
+       IFF_NOARP                               = 0x80
+       IFF_NOTRAILERS                          = 0x20
+       IFF_OACTIVE                             = 0x400
+       IFF_POINTOPOINT                         = 0x10
+       IFF_PROMISC                             = 0x100
+       IFF_RUNNING                             = 0x40
+       IFF_SIMPLEX                             = 0x800
+       IFF_UP                                  = 0x1
+       IFNAMSIZ                                = 0x10
+       IFT_1822                                = 0x2
+       IFT_6LOWPAN                             = 0x40
+       IFT_AAL5                                = 0x31
+       IFT_ARCNET                              = 0x23
+       IFT_ARCNETPLUS                          = 0x24
+       IFT_ATM                                 = 0x25
+       IFT_BRIDGE                              = 0xd1
+       IFT_CARP                                = 0xf8
+       IFT_CELLULAR                            = 0xff
+       IFT_CEPT                                = 0x13
+       IFT_DS3                                 = 0x1e
+       IFT_ENC                                 = 0xf4
+       IFT_EON                                 = 0x19
+       IFT_ETHER                               = 0x6
+       IFT_FAITH                               = 0x38
+       IFT_FDDI                                = 0xf
+       IFT_FRELAY                              = 0x20
+       IFT_FRELAYDCE                           = 0x2c
+       IFT_GIF                                 = 0x37
+       IFT_HDH1822                             = 0x3
+       IFT_HIPPI                               = 0x2f
+       IFT_HSSI                                = 0x2e
+       IFT_HY                                  = 0xe
+       IFT_IEEE1394                            = 0x90
+       IFT_IEEE8023ADLAG                       = 0x88
+       IFT_ISDNBASIC                           = 0x14
+       IFT_ISDNPRIMARY                         = 0x15
+       IFT_ISO88022LLC                         = 0x29
+       IFT_ISO88023                            = 0x7
+       IFT_ISO88024                            = 0x8
+       IFT_ISO88025                            = 0x9
+       IFT_ISO88026                            = 0xa
+       IFT_L2VLAN                              = 0x87
+       IFT_LAPB                                = 0x10
+       IFT_LOCALTALK                           = 0x2a
+       IFT_LOOP                                = 0x18
+       IFT_MIOX25                              = 0x26
+       IFT_MODEM                               = 0x30
+       IFT_NSIP                                = 0x1b
+       IFT_OTHER                               = 0x1
+       IFT_P10                                 = 0xc
+       IFT_P80                                 = 0xd
+       IFT_PARA                                = 0x22
+       IFT_PDP                                 = 0xff
+       IFT_PFLOG                               = 0xf5
+       IFT_PFSYNC                              = 0xf6
+       IFT_PKTAP                               = 0xfe
+       IFT_PPP                                 = 0x17
+       IFT_PROPMUX                             = 0x36
+       IFT_PROPVIRTUAL                         = 0x35
+       IFT_PTPSERIAL                           = 0x16
+       IFT_RS232                               = 0x21
+       IFT_SDLC                                = 0x11
+       IFT_SIP                                 = 0x1f
+       IFT_SLIP                                = 0x1c
+       IFT_SMDSDXI                             = 0x2b
+       IFT_SMDSICIP                            = 0x34
+       IFT_SONET                               = 0x27
+       IFT_SONETPATH                           = 0x32
+       IFT_SONETVT                             = 0x33
+       IFT_STARLAN                             = 0xb
+       IFT_STF                                 = 0x39
+       IFT_T1                                  = 0x12
+       IFT_ULTRA                               = 0x1d
+       IFT_V35                                 = 0x2d
+       IFT_X25                                 = 0x5
+       IFT_X25DDN                              = 0x4
+       IFT_X25PLE                              = 0x28
+       IFT_XETHER                              = 0x1a
+       IGNBRK                                  = 0x1
+       IGNCR                                   = 0x80
+       IGNPAR                                  = 0x4
+       IMAXBEL                                 = 0x2000
+       INLCR                                   = 0x40
+       INPCK                                   = 0x10
+       IN_CLASSA_HOST                          = 0xffffff
+       IN_CLASSA_MAX                           = 0x80
+       IN_CLASSA_NET                           = 0xff000000
+       IN_CLASSA_NSHIFT                        = 0x18
+       IN_CLASSB_HOST                          = 0xffff
+       IN_CLASSB_MAX                           = 0x10000
+       IN_CLASSB_NET                           = 0xffff0000
+       IN_CLASSB_NSHIFT                        = 0x10
+       IN_CLASSC_HOST                          = 0xff
+       IN_CLASSC_NET                           = 0xffffff00
+       IN_CLASSC_NSHIFT                        = 0x8
+       IN_CLASSD_HOST                          = 0xfffffff
+       IN_CLASSD_NET                           = 0xf0000000
+       IN_CLASSD_NSHIFT                        = 0x1c
+       IN_LINKLOCALNETNUM                      = 0xa9fe0000
+       IN_LOOPBACKNET                          = 0x7f
+       IOCTL_VM_SOCKETS_GET_LOCAL_CID          = 0x400473d1
+       IPPROTO_3PC                             = 0x22
+       IPPROTO_ADFS                            = 0x44
+       IPPROTO_AH                              = 0x33
+       IPPROTO_AHIP                            = 0x3d
+       IPPROTO_APES                            = 0x63
+       IPPROTO_ARGUS                           = 0xd
+       IPPROTO_AX25                            = 0x5d
+       IPPROTO_BHA                             = 0x31
+       IPPROTO_BLT                             = 0x1e
+       IPPROTO_BRSATMON                        = 0x4c
+       IPPROTO_CFTP                            = 0x3e
+       IPPROTO_CHAOS                           = 0x10
+       IPPROTO_CMTP                            = 0x26
+       IPPROTO_CPHB                            = 0x49
+       IPPROTO_CPNX                            = 0x48
+       IPPROTO_DDP                             = 0x25
+       IPPROTO_DGP                             = 0x56
+       IPPROTO_DIVERT                          = 0xfe
+       IPPROTO_DONE                            = 0x101
+       IPPROTO_DSTOPTS                         = 0x3c
+       IPPROTO_EGP                             = 0x8
+       IPPROTO_EMCON                           = 0xe
+       IPPROTO_ENCAP                           = 0x62
+       IPPROTO_EON                             = 0x50
+       IPPROTO_ESP                             = 0x32
+       IPPROTO_ETHERIP                         = 0x61
+       IPPROTO_FRAGMENT                        = 0x2c
+       IPPROTO_GGP                             = 0x3
+       IPPROTO_GMTP                            = 0x64
+       IPPROTO_GRE                             = 0x2f
+       IPPROTO_HELLO                           = 0x3f
+       IPPROTO_HMP                             = 0x14
+       IPPROTO_HOPOPTS                         = 0x0
+       IPPROTO_ICMP                            = 0x1
+       IPPROTO_ICMPV6                          = 0x3a
+       IPPROTO_IDP                             = 0x16
+       IPPROTO_IDPR                            = 0x23
+       IPPROTO_IDRP                            = 0x2d
+       IPPROTO_IGMP                            = 0x2
+       IPPROTO_IGP                             = 0x55
+       IPPROTO_IGRP                            = 0x58
+       IPPROTO_IL                              = 0x28
+       IPPROTO_INLSP                           = 0x34
+       IPPROTO_INP                             = 0x20
+       IPPROTO_IP                              = 0x0
+       IPPROTO_IPCOMP                          = 0x6c
+       IPPROTO_IPCV                            = 0x47
+       IPPROTO_IPEIP                           = 0x5e
+       IPPROTO_IPIP                            = 0x4
+       IPPROTO_IPPC                            = 0x43
+       IPPROTO_IPV4                            = 0x4
+       IPPROTO_IPV6                            = 0x29
+       IPPROTO_IRTP                            = 0x1c
+       IPPROTO_KRYPTOLAN                       = 0x41
+       IPPROTO_LARP                            = 0x5b
+       IPPROTO_LEAF1                           = 0x19
+       IPPROTO_LEAF2                           = 0x1a
+       IPPROTO_MAX                             = 0x100
+       IPPROTO_MAXID                           = 0x34
+       IPPROTO_MEAS                            = 0x13
+       IPPROTO_MHRP                            = 0x30
+       IPPROTO_MICP                            = 0x5f
+       IPPROTO_MTP                             = 0x5c
+       IPPROTO_MUX                             = 0x12
+       IPPROTO_ND                              = 0x4d
+       IPPROTO_NHRP                            = 0x36
+       IPPROTO_NONE                            = 0x3b
+       IPPROTO_NSP                             = 0x1f
+       IPPROTO_NVPII                           = 0xb
+       IPPROTO_OSPFIGP                         = 0x59
+       IPPROTO_PGM                             = 0x71
+       IPPROTO_PIGP                            = 0x9
+       IPPROTO_PIM                             = 0x67
+       IPPROTO_PRM                             = 0x15
+       IPPROTO_PUP                             = 0xc
+       IPPROTO_PVP                             = 0x4b
+       IPPROTO_RAW                             = 0xff
+       IPPROTO_RCCMON                          = 0xa
+       IPPROTO_RDP                             = 0x1b
+       IPPROTO_ROUTING                         = 0x2b
+       IPPROTO_RSVP                            = 0x2e
+       IPPROTO_RVD                             = 0x42
+       IPPROTO_SATEXPAK                        = 0x40
+       IPPROTO_SATMON                          = 0x45
+       IPPROTO_SCCSP                           = 0x60
+       IPPROTO_SCTP                            = 0x84
+       IPPROTO_SDRP                            = 0x2a
+       IPPROTO_SEP                             = 0x21
+       IPPROTO_SRPC                            = 0x5a
+       IPPROTO_ST                              = 0x7
+       IPPROTO_SVMTP                           = 0x52
+       IPPROTO_SWIPE                           = 0x35
+       IPPROTO_TCF                             = 0x57
+       IPPROTO_TCP                             = 0x6
+       IPPROTO_TP                              = 0x1d
+       IPPROTO_TPXX                            = 0x27
+       IPPROTO_TRUNK1                          = 0x17
+       IPPROTO_TRUNK2                          = 0x18
+       IPPROTO_TTP                             = 0x54
+       IPPROTO_UDP                             = 0x11
+       IPPROTO_VINES                           = 0x53
+       IPPROTO_VISA                            = 0x46
+       IPPROTO_VMTP                            = 0x51
+       IPPROTO_WBEXPAK                         = 0x4f
+       IPPROTO_WBMON                           = 0x4e
+       IPPROTO_WSN                             = 0x4a
+       IPPROTO_XNET                            = 0xf
+       IPPROTO_XTP                             = 0x24
+       IPV6_2292DSTOPTS                        = 0x17
+       IPV6_2292HOPLIMIT                       = 0x14
+       IPV6_2292HOPOPTS                        = 0x16
+       IPV6_2292NEXTHOP                        = 0x15
+       IPV6_2292PKTINFO                        = 0x13
+       IPV6_2292PKTOPTIONS                     = 0x19
+       IPV6_2292RTHDR                          = 0x18
+       IPV6_3542DSTOPTS                        = 0x32
+       IPV6_3542HOPLIMIT                       = 0x2f
+       IPV6_3542HOPOPTS                        = 0x31
+       IPV6_3542NEXTHOP                        = 0x30
+       IPV6_3542PKTINFO                        = 0x2e
+       IPV6_3542RTHDR                          = 0x33
+       IPV6_ADDR_MC_FLAGS_PREFIX               = 0x20
+       IPV6_ADDR_MC_FLAGS_TRANSIENT            = 0x10
+       IPV6_ADDR_MC_FLAGS_UNICAST_BASED        = 0x30
+       IPV6_AUTOFLOWLABEL                      = 0x3b
+       IPV6_BINDV6ONLY                         = 0x1b
+       IPV6_BOUND_IF                           = 0x7d
+       IPV6_CHECKSUM                           = 0x1a
+       IPV6_DEFAULT_MULTICAST_HOPS             = 0x1
+       IPV6_DEFAULT_MULTICAST_LOOP             = 0x1
+       IPV6_DEFHLIM                            = 0x40
+       IPV6_DONTFRAG                           = 0x3e
+       IPV6_DSTOPTS                            = 0x32
+       IPV6_FAITH                              = 0x1d
+       IPV6_FLOWINFO_MASK                      = 0xffffff0f
+       IPV6_FLOWLABEL_MASK                     = 0xffff0f00
+       IPV6_FLOW_ECN_MASK                      = 0x3000
+       IPV6_FRAGTTL                            = 0x3c
+       IPV6_FW_ADD                             = 0x1e
+       IPV6_FW_DEL                             = 0x1f
+       IPV6_FW_FLUSH                           = 0x20
+       IPV6_FW_GET                             = 0x22
+       IPV6_FW_ZERO                            = 0x21
+       IPV6_HLIMDEC                            = 0x1
+       IPV6_HOPLIMIT                           = 0x2f
+       IPV6_HOPOPTS                            = 0x31
+       IPV6_IPSEC_POLICY                       = 0x1c
+       IPV6_JOIN_GROUP                         = 0xc
+       IPV6_LEAVE_GROUP                        = 0xd
+       IPV6_MAXHLIM                            = 0xff
+       IPV6_MAXOPTHDR                          = 0x800
+       IPV6_MAXPACKET                          = 0xffff
+       IPV6_MAX_GROUP_SRC_FILTER               = 0x200
+       IPV6_MAX_MEMBERSHIPS                    = 0xfff
+       IPV6_MAX_SOCK_SRC_FILTER                = 0x80
+       IPV6_MIN_MEMBERSHIPS                    = 0x1f
+       IPV6_MMTU                               = 0x500
+       IPV6_MSFILTER                           = 0x4a
+       IPV6_MULTICAST_HOPS                     = 0xa
+       IPV6_MULTICAST_IF                       = 0x9
+       IPV6_MULTICAST_LOOP                     = 0xb
+       IPV6_NEXTHOP                            = 0x30
+       IPV6_PATHMTU                            = 0x2c
+       IPV6_PKTINFO                            = 0x2e
+       IPV6_PORTRANGE                          = 0xe
+       IPV6_PORTRANGE_DEFAULT                  = 0x0
+       IPV6_PORTRANGE_HIGH                     = 0x1
+       IPV6_PORTRANGE_LOW                      = 0x2
+       IPV6_PREFER_TEMPADDR                    = 0x3f
+       IPV6_RECVDSTOPTS                        = 0x28
+       IPV6_RECVHOPLIMIT                       = 0x25
+       IPV6_RECVHOPOPTS                        = 0x27
+       IPV6_RECVPATHMTU                        = 0x2b
+       IPV6_RECVPKTINFO                        = 0x3d
+       IPV6_RECVRTHDR                          = 0x26
+       IPV6_RECVTCLASS                         = 0x23
+       IPV6_RTHDR                              = 0x33
+       IPV6_RTHDRDSTOPTS                       = 0x39
+       IPV6_RTHDR_LOOSE                        = 0x0
+       IPV6_RTHDR_STRICT                       = 0x1
+       IPV6_RTHDR_TYPE_0                       = 0x0
+       IPV6_SOCKOPT_RESERVED1                  = 0x3
+       IPV6_TCLASS                             = 0x24
+       IPV6_UNICAST_HOPS                       = 0x4
+       IPV6_USE_MIN_MTU                        = 0x2a
+       IPV6_V6ONLY                             = 0x1b
+       IPV6_VERSION                            = 0x60
+       IPV6_VERSION_MASK                       = 0xf0
+       IP_ADD_MEMBERSHIP                       = 0xc
+       IP_ADD_SOURCE_MEMBERSHIP                = 0x46
+       IP_BLOCK_SOURCE                         = 0x48
+       IP_BOUND_IF                             = 0x19
+       IP_DEFAULT_MULTICAST_LOOP               = 0x1
+       IP_DEFAULT_MULTICAST_TTL                = 0x1
+       IP_DF                                   = 0x4000
+       IP_DONTFRAG                             = 0x1c
+       IP_DROP_MEMBERSHIP                      = 0xd
+       IP_DROP_SOURCE_MEMBERSHIP               = 0x47
+       IP_DUMMYNET_CONFIGURE                   = 0x3c
+       IP_DUMMYNET_DEL                         = 0x3d
+       IP_DUMMYNET_FLUSH                       = 0x3e
+       IP_DUMMYNET_GET                         = 0x40
+       IP_FAITH                                = 0x16
+       IP_FW_ADD                               = 0x28
+       IP_FW_DEL                               = 0x29
+       IP_FW_FLUSH                             = 0x2a
+       IP_FW_GET                               = 0x2c
+       IP_FW_RESETLOG                          = 0x2d
+       IP_FW_ZERO                              = 0x2b
+       IP_HDRINCL                              = 0x2
+       IP_IPSEC_POLICY                         = 0x15
+       IP_MAXPACKET                            = 0xffff
+       IP_MAX_GROUP_SRC_FILTER                 = 0x200
+       IP_MAX_MEMBERSHIPS                      = 0xfff
+       IP_MAX_SOCK_MUTE_FILTER                 = 0x80
+       IP_MAX_SOCK_SRC_FILTER                  = 0x80
+       IP_MF                                   = 0x2000
+       IP_MIN_MEMBERSHIPS                      = 0x1f
+       IP_MSFILTER                             = 0x4a
+       IP_MSS                                  = 0x240
+       IP_MULTICAST_IF                         = 0x9
+       IP_MULTICAST_IFINDEX                    = 0x42
+       IP_MULTICAST_LOOP                       = 0xb
+       IP_MULTICAST_TTL                        = 0xa
+       IP_MULTICAST_VIF                        = 0xe
+       IP_NAT__XXX                             = 0x37
+       IP_OFFMASK                              = 0x1fff
+       IP_OLD_FW_ADD                           = 0x32
+       IP_OLD_FW_DEL                           = 0x33
+       IP_OLD_FW_FLUSH                         = 0x34
+       IP_OLD_FW_GET                           = 0x36
+       IP_OLD_FW_RESETLOG                      = 0x38
+       IP_OLD_FW_ZERO                          = 0x35
+       IP_OPTIONS                              = 0x1
+       IP_PKTINFO                              = 0x1a
+       IP_PORTRANGE                            = 0x13
+       IP_PORTRANGE_DEFAULT                    = 0x0
+       IP_PORTRANGE_HIGH                       = 0x1
+       IP_PORTRANGE_LOW                        = 0x2
+       IP_RECVDSTADDR                          = 0x7
+       IP_RECVIF                               = 0x14
+       IP_RECVOPTS                             = 0x5
+       IP_RECVPKTINFO                          = 0x1a
+       IP_RECVRETOPTS                          = 0x6
+       IP_RECVTOS                              = 0x1b
+       IP_RECVTTL                              = 0x18
+       IP_RETOPTS                              = 0x8
+       IP_RF                                   = 0x8000
+       IP_RSVP_OFF                             = 0x10
+       IP_RSVP_ON                              = 0xf
+       IP_RSVP_VIF_OFF                         = 0x12
+       IP_RSVP_VIF_ON                          = 0x11
+       IP_STRIPHDR                             = 0x17
+       IP_TOS                                  = 0x3
+       IP_TRAFFIC_MGT_BACKGROUND               = 0x41
+       IP_TTL                                  = 0x4
+       IP_UNBLOCK_SOURCE                       = 0x49
+       ISIG                                    = 0x80
+       ISTRIP                                  = 0x20
+       IUTF8                                   = 0x4000
+       IXANY                                   = 0x800
+       IXOFF                                   = 0x400
+       IXON                                    = 0x200
+       KERN_HOSTNAME                           = 0xa
+       KERN_OSRELEASE                          = 0x2
+       KERN_OSTYPE                             = 0x1
+       KERN_VERSION                            = 0x4
+       LOCAL_PEERCRED                          = 0x1
+       LOCAL_PEEREPID                          = 0x3
+       LOCAL_PEEREUUID                         = 0x5
+       LOCAL_PEERPID                           = 0x2
+       LOCAL_PEERTOKEN                         = 0x6
+       LOCAL_PEERUUID                          = 0x4
+       LOCK_EX                                 = 0x2
+       LOCK_NB                                 = 0x4
+       LOCK_SH                                 = 0x1
+       LOCK_UN                                 = 0x8
+       MADV_CAN_REUSE                          = 0x9
+       MADV_DONTNEED                           = 0x4
+       MADV_FREE                               = 0x5
+       MADV_FREE_REUSABLE                      = 0x7
+       MADV_FREE_REUSE                         = 0x8
+       MADV_NORMAL                             = 0x0
+       MADV_PAGEOUT                            = 0xa
+       MADV_RANDOM                             = 0x1
+       MADV_SEQUENTIAL                         = 0x2
+       MADV_WILLNEED                           = 0x3
+       MADV_ZERO_WIRED_PAGES                   = 0x6
+       MAP_32BIT                               = 0x8000
+       MAP_ANON                                = 0x1000
+       MAP_ANONYMOUS                           = 0x1000
+       MAP_COPY                                = 0x2
+       MAP_FILE                                = 0x0
+       MAP_FIXED                               = 0x10
+       MAP_HASSEMAPHORE                        = 0x200
+       MAP_JIT                                 = 0x800
+       MAP_NOCACHE                             = 0x400
+       MAP_NOEXTEND                            = 0x100
+       MAP_NORESERVE                           = 0x40
+       MAP_PRIVATE                             = 0x2
+       MAP_RENAME                              = 0x20
+       MAP_RESERVED0080                        = 0x80
+       MAP_RESILIENT_CODESIGN                  = 0x2000
+       MAP_RESILIENT_MEDIA                     = 0x4000
+       MAP_SHARED                              = 0x1
+       MAP_TRANSLATED_ALLOW_EXECUTE            = 0x20000
+       MAP_UNIX03                              = 0x40000
+       MCAST_BLOCK_SOURCE                      = 0x54
+       MCAST_EXCLUDE                           = 0x2
+       MCAST_INCLUDE                           = 0x1
+       MCAST_JOIN_GROUP                        = 0x50
+       MCAST_JOIN_SOURCE_GROUP                 = 0x52
+       MCAST_LEAVE_GROUP                       = 0x51
+       MCAST_LEAVE_SOURCE_GROUP                = 0x53
+       MCAST_UNBLOCK_SOURCE                    = 0x55
+       MCAST_UNDEFINED                         = 0x0
+       MCL_CURRENT                             = 0x1
+       MCL_FUTURE                              = 0x2
+       MNT_ASYNC                               = 0x40
+       MNT_AUTOMOUNTED                         = 0x400000
+       MNT_CMDFLAGS                            = 0xf0000
+       MNT_CPROTECT                            = 0x80
+       MNT_DEFWRITE                            = 0x2000000
+       MNT_DONTBROWSE                          = 0x100000
+       MNT_DOVOLFS                             = 0x8000
+       MNT_DWAIT                               = 0x4
+       MNT_EXPORTED                            = 0x100
+       MNT_EXT_ROOT_DATA_VOL                   = 0x1
+       MNT_FORCE                               = 0x80000
+       MNT_IGNORE_OWNERSHIP                    = 0x200000
+       MNT_JOURNALED                           = 0x800000
+       MNT_LOCAL                               = 0x1000
+       MNT_MULTILABEL                          = 0x4000000
+       MNT_NOATIME                             = 0x10000000
+       MNT_NOBLOCK                             = 0x20000
+       MNT_NODEV                               = 0x10
+       MNT_NOEXEC                              = 0x4
+       MNT_NOSUID                              = 0x8
+       MNT_NOUSERXATTR                         = 0x1000000
+       MNT_NOWAIT                              = 0x2
+       MNT_QUARANTINE                          = 0x400
+       MNT_QUOTA                               = 0x2000
+       MNT_RDONLY                              = 0x1
+       MNT_RELOAD                              = 0x40000
+       MNT_REMOVABLE                           = 0x200
+       MNT_ROOTFS                              = 0x4000
+       MNT_SNAPSHOT                            = 0x40000000
+       MNT_STRICTATIME                         = 0x80000000
+       MNT_SYNCHRONOUS                         = 0x2
+       MNT_UNION                               = 0x20
+       MNT_UNKNOWNPERMISSIONS                  = 0x200000
+       MNT_UPDATE                              = 0x10000
+       MNT_VISFLAGMASK                         = 0xd7f0f7ff
+       MNT_WAIT                                = 0x1
+       MSG_CTRUNC                              = 0x20
+       MSG_DONTROUTE                           = 0x4
+       MSG_DONTWAIT                            = 0x80
+       MSG_EOF                                 = 0x100
+       MSG_EOR                                 = 0x8
+       MSG_FLUSH                               = 0x400
+       MSG_HAVEMORE                            = 0x2000
+       MSG_HOLD                                = 0x800
+       MSG_NEEDSA                              = 0x10000
+       MSG_NOSIGNAL                            = 0x80000
+       MSG_OOB                                 = 0x1
+       MSG_PEEK                                = 0x2
+       MSG_RCVMORE                             = 0x4000
+       MSG_SEND                                = 0x1000
+       MSG_TRUNC                               = 0x10
+       MSG_WAITALL                             = 0x40
+       MSG_WAITSTREAM                          = 0x200
+       MS_ASYNC                                = 0x1
+       MS_DEACTIVATE                           = 0x8
+       MS_INVALIDATE                           = 0x2
+       MS_KILLPAGES                            = 0x4
+       MS_SYNC                                 = 0x10
+       NAME_MAX                                = 0xff
+       NET_RT_DUMP                             = 0x1
+       NET_RT_DUMP2                            = 0x7
+       NET_RT_FLAGS                            = 0x2
+       NET_RT_FLAGS_PRIV                       = 0xa
+       NET_RT_IFLIST                           = 0x3
+       NET_RT_IFLIST2                          = 0x6
+       NET_RT_MAXID                            = 0xb
+       NET_RT_STAT                             = 0x4
+       NET_RT_TRASH                            = 0x5
+       NFDBITS                                 = 0x20
+       NL0                                     = 0x0
+       NL1                                     = 0x100
+       NL2                                     = 0x200
+       NL3                                     = 0x300
+       NLDLY                                   = 0x300
+       NOFLSH                                  = 0x80000000
+       NOKERNINFO                              = 0x2000000
+       NOTE_ABSOLUTE                           = 0x8
+       NOTE_ATTRIB                             = 0x8
+       NOTE_BACKGROUND                         = 0x40
+       NOTE_CHILD                              = 0x4
+       NOTE_CRITICAL                           = 0x20
+       NOTE_DELETE                             = 0x1
+       NOTE_EXEC                               = 0x20000000
+       NOTE_EXIT                               = 0x80000000
+       NOTE_EXITSTATUS                         = 0x4000000
+       NOTE_EXIT_CSERROR                       = 0x40000
+       NOTE_EXIT_DECRYPTFAIL                   = 0x10000
+       NOTE_EXIT_DETAIL                        = 0x2000000
+       NOTE_EXIT_DETAIL_MASK                   = 0x70000
+       NOTE_EXIT_MEMORY                        = 0x20000
+       NOTE_EXIT_REPARENTED                    = 0x80000
+       NOTE_EXTEND                             = 0x4
+       NOTE_FFAND                              = 0x40000000
+       NOTE_FFCOPY                             = 0xc0000000
+       NOTE_FFCTRLMASK                         = 0xc0000000
+       NOTE_FFLAGSMASK                         = 0xffffff
+       NOTE_FFNOP                              = 0x0
+       NOTE_FFOR                               = 0x80000000
+       NOTE_FORK                               = 0x40000000
+       NOTE_FUNLOCK                            = 0x100
+       NOTE_LEEWAY                             = 0x10
+       NOTE_LINK                               = 0x10
+       NOTE_LOWAT                              = 0x1
+       NOTE_MACHTIME                           = 0x100
+       NOTE_MACH_CONTINUOUS_TIME               = 0x80
+       NOTE_NONE                               = 0x80
+       NOTE_NSECONDS                           = 0x4
+       NOTE_OOB                                = 0x2
+       NOTE_PCTRLMASK                          = -0x100000
+       NOTE_PDATAMASK                          = 0xfffff
+       NOTE_REAP                               = 0x10000000
+       NOTE_RENAME                             = 0x20
+       NOTE_REVOKE                             = 0x40
+       NOTE_SECONDS                            = 0x1
+       NOTE_SIGNAL                             = 0x8000000
+       NOTE_TRACK                              = 0x1
+       NOTE_TRACKERR                           = 0x2
+       NOTE_TRIGGER                            = 0x1000000
+       NOTE_USECONDS                           = 0x2
+       NOTE_VM_ERROR                           = 0x10000000
+       NOTE_VM_PRESSURE                        = 0x80000000
+       NOTE_VM_PRESSURE_SUDDEN_TERMINATE       = 0x20000000
+       NOTE_VM_PRESSURE_TERMINATE              = 0x40000000
+       NOTE_WRITE                              = 0x2
+       OCRNL                                   = 0x10
+       OFDEL                                   = 0x20000
+       OFILL                                   = 0x80
+       ONLCR                                   = 0x2
+       ONLRET                                  = 0x40
+       ONOCR                                   = 0x20
+       ONOEOT                                  = 0x8
+       OPOST                                   = 0x1
+       OXTABS                                  = 0x4
+       O_ACCMODE                               = 0x3
+       O_ALERT                                 = 0x20000000
+       O_APPEND                                = 0x8
+       O_ASYNC                                 = 0x40
+       O_CLOEXEC                               = 0x1000000
+       O_CREAT                                 = 0x200
+       O_DIRECTORY                             = 0x100000
+       O_DP_GETRAWENCRYPTED                    = 0x1
+       O_DP_GETRAWUNENCRYPTED                  = 0x2
+       O_DSYNC                                 = 0x400000
+       O_EVTONLY                               = 0x8000
+       O_EXCL                                  = 0x800
+       O_EXLOCK                                = 0x20
+       O_FSYNC                                 = 0x80
+       O_NDELAY                                = 0x4
+       O_NOCTTY                                = 0x20000
+       O_NOFOLLOW                              = 0x100
+       O_NOFOLLOW_ANY                          = 0x20000000
+       O_NONBLOCK                              = 0x4
+       O_POPUP                                 = 0x80000000
+       O_RDONLY                                = 0x0
+       O_RDWR                                  = 0x2
+       O_SHLOCK                                = 0x10
+       O_SYMLINK                               = 0x200000
+       O_SYNC                                  = 0x80
+       O_TRUNC                                 = 0x400
+       O_WRONLY                                = 0x1
+       PARENB                                  = 0x1000
+       PARMRK                                  = 0x8
+       PARODD                                  = 0x2000
+       PENDIN                                  = 0x20000000
+       PRIO_PGRP                               = 0x1
+       PRIO_PROCESS                            = 0x0
+       PRIO_USER                               = 0x2
+       PROT_EXEC                               = 0x4
+       PROT_NONE                               = 0x0
+       PROT_READ                               = 0x1
+       PROT_WRITE                              = 0x2
+       PT_ATTACH                               = 0xa
+       PT_ATTACHEXC                            = 0xe
+       PT_CONTINUE                             = 0x7
+       PT_DENY_ATTACH                          = 0x1f
+       PT_DETACH                               = 0xb
+       PT_FIRSTMACH                            = 0x20
+       PT_FORCEQUOTA                           = 0x1e
+       PT_KILL                                 = 0x8
+       PT_READ_D                               = 0x2
+       PT_READ_I                               = 0x1
+       PT_READ_U                               = 0x3
+       PT_SIGEXC                               = 0xc
+       PT_STEP                                 = 0x9
+       PT_THUPDATE                             = 0xd
+       PT_TRACE_ME                             = 0x0
+       PT_WRITE_D                              = 0x5
+       PT_WRITE_I                              = 0x4
+       PT_WRITE_U                              = 0x6
+       RLIMIT_AS                               = 0x5
+       RLIMIT_CORE                             = 0x4
+       RLIMIT_CPU                              = 0x0
+       RLIMIT_CPU_USAGE_MONITOR                = 0x2
+       RLIMIT_DATA                             = 0x2
+       RLIMIT_FSIZE                            = 0x1
+       RLIMIT_MEMLOCK                          = 0x6
+       RLIMIT_NOFILE                           = 0x8
+       RLIMIT_NPROC                            = 0x7
+       RLIMIT_RSS                              = 0x5
+       RLIMIT_STACK                            = 0x3
+       RLIM_INFINITY                           = 0x7fffffffffffffff
+       RTAX_AUTHOR                             = 0x6
+       RTAX_BRD                                = 0x7
+       RTAX_DST                                = 0x0
+       RTAX_GATEWAY                            = 0x1
+       RTAX_GENMASK                            = 0x3
+       RTAX_IFA                                = 0x5
+       RTAX_IFP                                = 0x4
+       RTAX_MAX                                = 0x8
+       RTAX_NETMASK                            = 0x2
+       RTA_AUTHOR                              = 0x40
+       RTA_BRD                                 = 0x80
+       RTA_DST                                 = 0x1
+       RTA_GATEWAY                             = 0x2
+       RTA_GENMASK                             = 0x8
+       RTA_IFA                                 = 0x20
+       RTA_IFP                                 = 0x10
+       RTA_NETMASK                             = 0x4
+       RTF_BLACKHOLE                           = 0x1000
+       RTF_BROADCAST                           = 0x400000
+       RTF_CLONING                             = 0x100
+       RTF_CONDEMNED                           = 0x2000000
+       RTF_DEAD                                = 0x20000000
+       RTF_DELCLONE                            = 0x80
+       RTF_DONE                                = 0x40
+       RTF_DYNAMIC                             = 0x10
+       RTF_GATEWAY                             = 0x2
+       RTF_GLOBAL                              = 0x40000000
+       RTF_HOST                                = 0x4
+       RTF_IFREF                               = 0x4000000
+       RTF_IFSCOPE                             = 0x1000000
+       RTF_LLDATA                              = 0x400
+       RTF_LLINFO                              = 0x400
+       RTF_LOCAL                               = 0x200000
+       RTF_MODIFIED                            = 0x20
+       RTF_MULTICAST                           = 0x800000
+       RTF_NOIFREF                             = 0x2000
+       RTF_PINNED                              = 0x100000
+       RTF_PRCLONING                           = 0x10000
+       RTF_PROTO1                              = 0x8000
+       RTF_PROTO2                              = 0x4000
+       RTF_PROTO3                              = 0x40000
+       RTF_PROXY                               = 0x8000000
+       RTF_REJECT                              = 0x8
+       RTF_ROUTER                              = 0x10000000
+       RTF_STATIC                              = 0x800
+       RTF_UP                                  = 0x1
+       RTF_WASCLONED                           = 0x20000
+       RTF_XRESOLVE                            = 0x200
+       RTM_ADD                                 = 0x1
+       RTM_CHANGE                              = 0x3
+       RTM_DELADDR                             = 0xd
+       RTM_DELETE                              = 0x2
+       RTM_DELMADDR                            = 0x10
+       RTM_GET                                 = 0x4
+       RTM_GET2                                = 0x14
+       RTM_IFINFO                              = 0xe
+       RTM_IFINFO2                             = 0x12
+       RTM_LOCK                                = 0x8
+       RTM_LOSING                              = 0x5
+       RTM_MISS                                = 0x7
+       RTM_NEWADDR                             = 0xc
+       RTM_NEWMADDR                            = 0xf
+       RTM_NEWMADDR2                           = 0x13
+       RTM_OLDADD                              = 0x9
+       RTM_OLDDEL                              = 0xa
+       RTM_REDIRECT                            = 0x6
+       RTM_RESOLVE                             = 0xb
+       RTM_RTTUNIT                             = 0xf4240
+       RTM_VERSION                             = 0x5
+       RTV_EXPIRE                              = 0x4
+       RTV_HOPCOUNT                            = 0x2
+       RTV_MTU                                 = 0x1
+       RTV_RPIPE                               = 0x8
+       RTV_RTT                                 = 0x40
+       RTV_RTTVAR                              = 0x80
+       RTV_SPIPE                               = 0x10
+       RTV_SSTHRESH                            = 0x20
+       RUSAGE_CHILDREN                         = -0x1
+       RUSAGE_SELF                             = 0x0
+       SCM_CREDS                               = 0x3
+       SCM_RIGHTS                              = 0x1
+       SCM_TIMESTAMP                           = 0x2
+       SCM_TIMESTAMP_MONOTONIC                 = 0x4
+       SEEK_CUR                                = 0x1
+       SEEK_DATA                               = 0x4
+       SEEK_END                                = 0x2
+       SEEK_HOLE                               = 0x3
+       SEEK_SET                                = 0x0
+       SHUT_RD                                 = 0x0
+       SHUT_RDWR                               = 0x2
+       SHUT_WR                                 = 0x1
+       SIOCADDMULTI                            = 0x80206931
+       SIOCAIFADDR                             = 0x8040691a
+       SIOCARPIPLL                             = 0xc0206928
+       SIOCATMARK                              = 0x40047307
+       SIOCAUTOADDR                            = 0xc0206926
+       SIOCAUTONETMASK                         = 0x80206927
+       SIOCDELMULTI                            = 0x80206932
+       SIOCDIFADDR                             = 0x80206919
+       SIOCDIFPHYADDR                          = 0x80206941
+       SIOCGDRVSPEC                            = 0xc028697b
+       SIOCGETVLAN                             = 0xc020697f
+       SIOCGHIWAT                              = 0x40047301
+       SIOCGIF6LOWPAN                          = 0xc02069c5
+       SIOCGIFADDR                             = 0xc0206921
+       SIOCGIFALTMTU                           = 0xc0206948
+       SIOCGIFASYNCMAP                         = 0xc020697c
+       SIOCGIFBOND                             = 0xc0206947
+       SIOCGIFBRDADDR                          = 0xc0206923
+       SIOCGIFCAP                              = 0xc020695b
+       SIOCGIFCONF                             = 0xc00c6924
+       SIOCGIFDEVMTU                           = 0xc0206944
+       SIOCGIFDSTADDR                          = 0xc0206922
+       SIOCGIFFLAGS                            = 0xc0206911
+       SIOCGIFFUNCTIONALTYPE                   = 0xc02069ad
+       SIOCGIFGENERIC                          = 0xc020693a
+       SIOCGIFKPI                              = 0xc0206987
+       SIOCGIFMAC                              = 0xc0206982
+       SIOCGIFMEDIA                            = 0xc02c6938
+       SIOCGIFMETRIC                           = 0xc0206917
+       SIOCGIFMTU                              = 0xc0206933
+       SIOCGIFNETMASK                          = 0xc0206925
+       SIOCGIFPDSTADDR                         = 0xc0206940
+       SIOCGIFPHYS                             = 0xc0206935
+       SIOCGIFPSRCADDR                         = 0xc020693f
+       SIOCGIFSTATUS                           = 0xc331693d
+       SIOCGIFVLAN                             = 0xc020697f
+       SIOCGIFWAKEFLAGS                        = 0xc0206988
+       SIOCGIFXMEDIA                           = 0xc02c6948
+       SIOCGLOWAT                              = 0x40047303
+       SIOCGPGRP                               = 0x40047309
+       SIOCIFCREATE                            = 0xc0206978
+       SIOCIFCREATE2                           = 0xc020697a
+       SIOCIFDESTROY                           = 0x80206979
+       SIOCIFGCLONERS                          = 0xc0106981
+       SIOCRSLVMULTI                           = 0xc010693b
+       SIOCSDRVSPEC                            = 0x8028697b
+       SIOCSETVLAN                             = 0x8020697e
+       SIOCSHIWAT                              = 0x80047300
+       SIOCSIF6LOWPAN                          = 0x802069c4
+       SIOCSIFADDR                             = 0x8020690c
+       SIOCSIFALTMTU                           = 0x80206945
+       SIOCSIFASYNCMAP                         = 0x8020697d
+       SIOCSIFBOND                             = 0x80206946
+       SIOCSIFBRDADDR                          = 0x80206913
+       SIOCSIFCAP                              = 0x8020695a
+       SIOCSIFDSTADDR                          = 0x8020690e
+       SIOCSIFFLAGS                            = 0x80206910
+       SIOCSIFGENERIC                          = 0x80206939
+       SIOCSIFKPI                              = 0x80206986
+       SIOCSIFLLADDR                           = 0x8020693c
+       SIOCSIFMAC                              = 0x80206983
+       SIOCSIFMEDIA                            = 0xc0206937
+       SIOCSIFMETRIC                           = 0x80206918
+       SIOCSIFMTU                              = 0x80206934
+       SIOCSIFNETMASK                          = 0x80206916
+       SIOCSIFPHYADDR                          = 0x8040693e
+       SIOCSIFPHYS                             = 0x80206936
+       SIOCSIFVLAN                             = 0x8020697e
+       SIOCSLOWAT                              = 0x80047302
+       SIOCSPGRP                               = 0x80047308
+       SOCK_DGRAM                              = 0x2
+       SOCK_MAXADDRLEN                         = 0xff
+       SOCK_RAW                                = 0x3
+       SOCK_RDM                                = 0x4
+       SOCK_SEQPACKET                          = 0x5
+       SOCK_STREAM                             = 0x1
+       SOL_LOCAL                               = 0x0
+       SOL_SOCKET                              = 0xffff
+       SOMAXCONN                               = 0x80
+       SO_ACCEPTCONN                           = 0x2
+       SO_BROADCAST                            = 0x20
+       SO_DEBUG                                = 0x1
+       SO_DONTROUTE                            = 0x10
+       SO_DONTTRUNC                            = 0x2000
+       SO_ERROR                                = 0x1007
+       SO_KEEPALIVE                            = 0x8
+       SO_LABEL                                = 0x1010
+       SO_LINGER                               = 0x80
+       SO_LINGER_SEC                           = 0x1080
+       SO_NETSVC_MARKING_LEVEL                 = 0x1119
+       SO_NET_SERVICE_TYPE                     = 0x1116
+       SO_NKE                                  = 0x1021
+       SO_NOADDRERR                            = 0x1023
+       SO_NOSIGPIPE                            = 0x1022
+       SO_NOTIFYCONFLICT                       = 0x1026
+       SO_NP_EXTENSIONS                        = 0x1083
+       SO_NREAD                                = 0x1020
+       SO_NUMRCVPKT                            = 0x1112
+       SO_NWRITE                               = 0x1024
+       SO_OOBINLINE                            = 0x100
+       SO_PEERLABEL                            = 0x1011
+       SO_RANDOMPORT                           = 0x1082
+       SO_RCVBUF                               = 0x1002
+       SO_RCVLOWAT                             = 0x1004
+       SO_RCVTIMEO                             = 0x1006
+       SO_REUSEADDR                            = 0x4
+       SO_REUSEPORT                            = 0x200
+       SO_REUSESHAREUID                        = 0x1025
+       SO_SNDBUF                               = 0x1001
+       SO_SNDLOWAT                             = 0x1003
+       SO_SNDTIMEO                             = 0x1005
+       SO_TIMESTAMP                            = 0x400
+       SO_TIMESTAMP_MONOTONIC                  = 0x800
+       SO_TRACKER_ATTRIBUTE_FLAGS_APP_APPROVED = 0x1
+       SO_TRACKER_ATTRIBUTE_FLAGS_DOMAIN_SHORT = 0x4
+       SO_TRACKER_ATTRIBUTE_FLAGS_TRACKER      = 0x2
+       SO_TRACKER_TRANSPARENCY_VERSION         = 0x3
+       SO_TYPE                                 = 0x1008
+       SO_UPCALLCLOSEWAIT                      = 0x1027
+       SO_USELOOPBACK                          = 0x40
+       SO_WANTMORE                             = 0x4000
+       SO_WANTOOBFLAG                          = 0x8000
+       S_IEXEC                                 = 0x40
+       S_IFBLK                                 = 0x6000
+       S_IFCHR                                 = 0x2000
+       S_IFDIR                                 = 0x4000
+       S_IFIFO                                 = 0x1000
+       S_IFLNK                                 = 0xa000
+       S_IFMT                                  = 0xf000
+       S_IFREG                                 = 0x8000
+       S_IFSOCK                                = 0xc000
+       S_IFWHT                                 = 0xe000
+       S_IREAD                                 = 0x100
+       S_IRGRP                                 = 0x20
+       S_IROTH                                 = 0x4
+       S_IRUSR                                 = 0x100
+       S_IRWXG                                 = 0x38
+       S_IRWXO                                 = 0x7
+       S_IRWXU                                 = 0x1c0
+       S_ISGID                                 = 0x400
+       S_ISTXT                                 = 0x200
+       S_ISUID                                 = 0x800
+       S_ISVTX                                 = 0x200
+       S_IWGRP                                 = 0x10
+       S_IWOTH                                 = 0x2
+       S_IWRITE                                = 0x80
+       S_IWUSR                                 = 0x80
+       S_IXGRP                                 = 0x8
+       S_IXOTH                                 = 0x1
+       S_IXUSR                                 = 0x40
+       TAB0                                    = 0x0
+       TAB1                                    = 0x400
+       TAB2                                    = 0x800
+       TAB3                                    = 0x4
+       TABDLY                                  = 0xc04
+       TCIFLUSH                                = 0x1
+       TCIOFF                                  = 0x3
+       TCIOFLUSH                               = 0x3
+       TCION                                   = 0x4
+       TCOFLUSH                                = 0x2
+       TCOOFF                                  = 0x1
+       TCOON                                   = 0x2
+       TCPOPT_CC                               = 0xb
+       TCPOPT_CCECHO                           = 0xd
+       TCPOPT_CCNEW                            = 0xc
+       TCPOPT_EOL                              = 0x0
+       TCPOPT_FASTOPEN                         = 0x22
+       TCPOPT_MAXSEG                           = 0x2
+       TCPOPT_NOP                              = 0x1
+       TCPOPT_SACK                             = 0x5
+       TCPOPT_SACK_HDR                         = 0x1010500
+       TCPOPT_SACK_PERMITTED                   = 0x4
+       TCPOPT_SACK_PERMIT_HDR                  = 0x1010402
+       TCPOPT_SIGNATURE                        = 0x13
+       TCPOPT_TIMESTAMP                        = 0x8
+       TCPOPT_TSTAMP_HDR                       = 0x101080a
+       TCPOPT_WINDOW                           = 0x3
+       TCP_CONNECTIONTIMEOUT                   = 0x20
+       TCP_CONNECTION_INFO                     = 0x106
+       TCP_ENABLE_ECN                          = 0x104
+       TCP_FASTOPEN                            = 0x105
+       TCP_KEEPALIVE                           = 0x10
+       TCP_KEEPCNT                             = 0x102
+       TCP_KEEPINTVL                           = 0x101
+       TCP_MAXHLEN                             = 0x3c
+       TCP_MAXOLEN                             = 0x28
+       TCP_MAXSEG                              = 0x2
+       TCP_MAXWIN                              = 0xffff
+       TCP_MAX_SACK                            = 0x4
+       TCP_MAX_WINSHIFT                        = 0xe
+       TCP_MINMSS                              = 0xd8
+       TCP_MSS                                 = 0x200
+       TCP_NODELAY                             = 0x1
+       TCP_NOOPT                               = 0x8
+       TCP_NOPUSH                              = 0x4
+       TCP_NOTSENT_LOWAT                       = 0x201
+       TCP_RXT_CONNDROPTIME                    = 0x80
+       TCP_RXT_FINDROP                         = 0x100
+       TCP_SENDMOREACKS                        = 0x103
+       TCSAFLUSH                               = 0x2
+       TIOCCBRK                                = 0x2000747a
+       TIOCCDTR                                = 0x20007478
+       TIOCCONS                                = 0x80047462
+       TIOCDCDTIMESTAMP                        = 0x40107458
+       TIOCDRAIN                               = 0x2000745e
+       TIOCDSIMICROCODE                        = 0x20007455
+       TIOCEXCL                                = 0x2000740d
+       TIOCEXT                                 = 0x80047460
+       TIOCFLUSH                               = 0x80047410
+       TIOCGDRAINWAIT                          = 0x40047456
+       TIOCGETA                                = 0x40487413
+       TIOCGETD                                = 0x4004741a
+       TIOCGPGRP                               = 0x40047477
+       TIOCGWINSZ                              = 0x40087468
+       TIOCIXOFF                               = 0x20007480
+       TIOCIXON                                = 0x20007481
+       TIOCMBIC                                = 0x8004746b
+       TIOCMBIS                                = 0x8004746c
+       TIOCMGDTRWAIT                           = 0x4004745a
+       TIOCMGET                                = 0x4004746a
+       TIOCMODG                                = 0x40047403
+       TIOCMODS                                = 0x80047404
+       TIOCMSDTRWAIT                           = 0x8004745b
+       TIOCMSET                                = 0x8004746d
+       TIOCM_CAR                               = 0x40
+       TIOCM_CD                                = 0x40
+       TIOCM_CTS                               = 0x20
+       TIOCM_DSR                               = 0x100
+       TIOCM_DTR                               = 0x2
+       TIOCM_LE                                = 0x1
+       TIOCM_RI                                = 0x80
+       TIOCM_RNG                               = 0x80
+       TIOCM_RTS                               = 0x4
+       TIOCM_SR                                = 0x10
+       TIOCM_ST                                = 0x8
+       TIOCNOTTY                               = 0x20007471
+       TIOCNXCL                                = 0x2000740e
+       TIOCOUTQ                                = 0x40047473
+       TIOCPKT                                 = 0x80047470
+       TIOCPKT_DATA                            = 0x0
+       TIOCPKT_DOSTOP                          = 0x20
+       TIOCPKT_FLUSHREAD                       = 0x1
+       TIOCPKT_FLUSHWRITE                      = 0x2
+       TIOCPKT_IOCTL                           = 0x40
+       TIOCPKT_NOSTOP                          = 0x10
+       TIOCPKT_START                           = 0x8
+       TIOCPKT_STOP                            = 0x4
+       TIOCPTYGNAME                            = 0x40807453
+       TIOCPTYGRANT                            = 0x20007454
+       TIOCPTYUNLK                             = 0x20007452
+       TIOCREMOTE                              = 0x80047469
+       TIOCSBRK                                = 0x2000747b
+       TIOCSCONS                               = 0x20007463
+       TIOCSCTTY                               = 0x20007461
+       TIOCSDRAINWAIT                          = 0x80047457
+       TIOCSDTR                                = 0x20007479
+       TIOCSETA                                = 0x80487414
+       TIOCSETAF                               = 0x80487416
+       TIOCSETAW                               = 0x80487415
+       TIOCSETD                                = 0x8004741b
+       TIOCSIG                                 = 0x2000745f
+       TIOCSPGRP                               = 0x80047476
+       TIOCSTART                               = 0x2000746e
+       TIOCSTAT                                = 0x20007465
+       TIOCSTI                                 = 0x80017472
+       TIOCSTOP                                = 0x2000746f
+       TIOCSWINSZ                              = 0x80087467
+       TIOCTIMESTAMP                           = 0x40107459
+       TIOCUCNTL                               = 0x80047466
+       TOSTOP                                  = 0x400000
+       VDISCARD                                = 0xf
+       VDSUSP                                  = 0xb
+       VEOF                                    = 0x0
+       VEOL                                    = 0x1
+       VEOL2                                   = 0x2
+       VERASE                                  = 0x3
+       VINTR                                   = 0x8
+       VKILL                                   = 0x5
+       VLNEXT                                  = 0xe
+       VMADDR_CID_ANY                          = 0xffffffff
+       VMADDR_CID_HOST                         = 0x2
+       VMADDR_CID_HYPERVISOR                   = 0x0
+       VMADDR_CID_RESERVED                     = 0x1
+       VMADDR_PORT_ANY                         = 0xffffffff
+       VMIN                                    = 0x10
+       VM_LOADAVG                              = 0x2
+       VM_MACHFACTOR                           = 0x4
+       VM_MAXID                                = 0x6
+       VM_METER                                = 0x1
+       VM_SWAPUSAGE                            = 0x5
+       VQUIT                                   = 0x9
+       VREPRINT                                = 0x6
+       VSTART                                  = 0xc
+       VSTATUS                                 = 0x12
+       VSTOP                                   = 0xd
+       VSUSP                                   = 0xa
+       VT0                                     = 0x0
+       VT1                                     = 0x10000
+       VTDLY                                   = 0x10000
+       VTIME                                   = 0x11
+       VWERASE                                 = 0x4
+       WCONTINUED                              = 0x10
+       WCOREFLAG                               = 0x80
+       WEXITED                                 = 0x4
+       WNOHANG                                 = 0x1
+       WNOWAIT                                 = 0x20
+       WORDSIZE                                = 0x40
+       WSTOPPED                                = 0x8
+       WUNTRACED                               = 0x2
+       XATTR_CREATE                            = 0x2
+       XATTR_NODEFAULT                         = 0x10
+       XATTR_NOFOLLOW                          = 0x1
+       XATTR_NOSECURITY                        = 0x8
+       XATTR_REPLACE                           = 0x4
+       XATTR_SHOWCOMPRESSION                   = 0x20
 )
 
 // Errors
index 31009d7f053cdd93390712fbd6fa8f1a3ab201b6..e36f5178d60089f88323a37a6e73d3e26593daf9 100644 (file)
@@ -12,1556 +12,1582 @@ package unix
 import "syscall"
 
 const (
-       AF_APPLETALK                      = 0x10
-       AF_CCITT                          = 0xa
-       AF_CHAOS                          = 0x5
-       AF_CNT                            = 0x15
-       AF_COIP                           = 0x14
-       AF_DATAKIT                        = 0x9
-       AF_DECnet                         = 0xc
-       AF_DLI                            = 0xd
-       AF_E164                           = 0x1c
-       AF_ECMA                           = 0x8
-       AF_HYLINK                         = 0xf
-       AF_IEEE80211                      = 0x25
-       AF_IMPLINK                        = 0x3
-       AF_INET                           = 0x2
-       AF_INET6                          = 0x1e
-       AF_IPX                            = 0x17
-       AF_ISDN                           = 0x1c
-       AF_ISO                            = 0x7
-       AF_LAT                            = 0xe
-       AF_LINK                           = 0x12
-       AF_LOCAL                          = 0x1
-       AF_MAX                            = 0x29
-       AF_NATM                           = 0x1f
-       AF_NDRV                           = 0x1b
-       AF_NETBIOS                        = 0x21
-       AF_NS                             = 0x6
-       AF_OSI                            = 0x7
-       AF_PPP                            = 0x22
-       AF_PUP                            = 0x4
-       AF_RESERVED_36                    = 0x24
-       AF_ROUTE                          = 0x11
-       AF_SIP                            = 0x18
-       AF_SNA                            = 0xb
-       AF_SYSTEM                         = 0x20
-       AF_SYS_CONTROL                    = 0x2
-       AF_UNIX                           = 0x1
-       AF_UNSPEC                         = 0x0
-       AF_UTUN                           = 0x26
-       AF_VSOCK                          = 0x28
-       ALTWERASE                         = 0x200
-       ATTR_BIT_MAP_COUNT                = 0x5
-       ATTR_CMN_ACCESSMASK               = 0x20000
-       ATTR_CMN_ACCTIME                  = 0x1000
-       ATTR_CMN_ADDEDTIME                = 0x10000000
-       ATTR_CMN_BKUPTIME                 = 0x2000
-       ATTR_CMN_CHGTIME                  = 0x800
-       ATTR_CMN_CRTIME                   = 0x200
-       ATTR_CMN_DATA_PROTECT_FLAGS       = 0x40000000
-       ATTR_CMN_DEVID                    = 0x2
-       ATTR_CMN_DOCUMENT_ID              = 0x100000
-       ATTR_CMN_ERROR                    = 0x20000000
-       ATTR_CMN_EXTENDED_SECURITY        = 0x400000
-       ATTR_CMN_FILEID                   = 0x2000000
-       ATTR_CMN_FLAGS                    = 0x40000
-       ATTR_CMN_FNDRINFO                 = 0x4000
-       ATTR_CMN_FSID                     = 0x4
-       ATTR_CMN_FULLPATH                 = 0x8000000
-       ATTR_CMN_GEN_COUNT                = 0x80000
-       ATTR_CMN_GRPID                    = 0x10000
-       ATTR_CMN_GRPUUID                  = 0x1000000
-       ATTR_CMN_MODTIME                  = 0x400
-       ATTR_CMN_NAME                     = 0x1
-       ATTR_CMN_NAMEDATTRCOUNT           = 0x80000
-       ATTR_CMN_NAMEDATTRLIST            = 0x100000
-       ATTR_CMN_OBJID                    = 0x20
-       ATTR_CMN_OBJPERMANENTID           = 0x40
-       ATTR_CMN_OBJTAG                   = 0x10
-       ATTR_CMN_OBJTYPE                  = 0x8
-       ATTR_CMN_OWNERID                  = 0x8000
-       ATTR_CMN_PARENTID                 = 0x4000000
-       ATTR_CMN_PAROBJID                 = 0x80
-       ATTR_CMN_RETURNED_ATTRS           = 0x80000000
-       ATTR_CMN_SCRIPT                   = 0x100
-       ATTR_CMN_SETMASK                  = 0x51c7ff00
-       ATTR_CMN_USERACCESS               = 0x200000
-       ATTR_CMN_UUID                     = 0x800000
-       ATTR_CMN_VALIDMASK                = 0xffffffff
-       ATTR_CMN_VOLSETMASK               = 0x6700
-       ATTR_FILE_ALLOCSIZE               = 0x4
-       ATTR_FILE_CLUMPSIZE               = 0x10
-       ATTR_FILE_DATAALLOCSIZE           = 0x400
-       ATTR_FILE_DATAEXTENTS             = 0x800
-       ATTR_FILE_DATALENGTH              = 0x200
-       ATTR_FILE_DEVTYPE                 = 0x20
-       ATTR_FILE_FILETYPE                = 0x40
-       ATTR_FILE_FORKCOUNT               = 0x80
-       ATTR_FILE_FORKLIST                = 0x100
-       ATTR_FILE_IOBLOCKSIZE             = 0x8
-       ATTR_FILE_LINKCOUNT               = 0x1
-       ATTR_FILE_RSRCALLOCSIZE           = 0x2000
-       ATTR_FILE_RSRCEXTENTS             = 0x4000
-       ATTR_FILE_RSRCLENGTH              = 0x1000
-       ATTR_FILE_SETMASK                 = 0x20
-       ATTR_FILE_TOTALSIZE               = 0x2
-       ATTR_FILE_VALIDMASK               = 0x37ff
-       ATTR_VOL_ALLOCATIONCLUMP          = 0x40
-       ATTR_VOL_ATTRIBUTES               = 0x40000000
-       ATTR_VOL_CAPABILITIES             = 0x20000
-       ATTR_VOL_DIRCOUNT                 = 0x400
-       ATTR_VOL_ENCODINGSUSED            = 0x10000
-       ATTR_VOL_FILECOUNT                = 0x200
-       ATTR_VOL_FSTYPE                   = 0x1
-       ATTR_VOL_INFO                     = 0x80000000
-       ATTR_VOL_IOBLOCKSIZE              = 0x80
-       ATTR_VOL_MAXOBJCOUNT              = 0x800
-       ATTR_VOL_MINALLOCATION            = 0x20
-       ATTR_VOL_MOUNTEDDEVICE            = 0x8000
-       ATTR_VOL_MOUNTFLAGS               = 0x4000
-       ATTR_VOL_MOUNTPOINT               = 0x1000
-       ATTR_VOL_NAME                     = 0x2000
-       ATTR_VOL_OBJCOUNT                 = 0x100
-       ATTR_VOL_QUOTA_SIZE               = 0x10000000
-       ATTR_VOL_RESERVED_SIZE            = 0x20000000
-       ATTR_VOL_SETMASK                  = 0x80002000
-       ATTR_VOL_SIGNATURE                = 0x2
-       ATTR_VOL_SIZE                     = 0x4
-       ATTR_VOL_SPACEAVAIL               = 0x10
-       ATTR_VOL_SPACEFREE                = 0x8
-       ATTR_VOL_UUID                     = 0x40000
-       ATTR_VOL_VALIDMASK                = 0xf007ffff
-       B0                                = 0x0
-       B110                              = 0x6e
-       B115200                           = 0x1c200
-       B1200                             = 0x4b0
-       B134                              = 0x86
-       B14400                            = 0x3840
-       B150                              = 0x96
-       B1800                             = 0x708
-       B19200                            = 0x4b00
-       B200                              = 0xc8
-       B230400                           = 0x38400
-       B2400                             = 0x960
-       B28800                            = 0x7080
-       B300                              = 0x12c
-       B38400                            = 0x9600
-       B4800                             = 0x12c0
-       B50                               = 0x32
-       B57600                            = 0xe100
-       B600                              = 0x258
-       B7200                             = 0x1c20
-       B75                               = 0x4b
-       B76800                            = 0x12c00
-       B9600                             = 0x2580
-       BIOCFLUSH                         = 0x20004268
-       BIOCGBLEN                         = 0x40044266
-       BIOCGDLT                          = 0x4004426a
-       BIOCGDLTLIST                      = 0xc00c4279
-       BIOCGETIF                         = 0x4020426b
-       BIOCGHDRCMPLT                     = 0x40044274
-       BIOCGRSIG                         = 0x40044272
-       BIOCGRTIMEOUT                     = 0x4010426e
-       BIOCGSEESENT                      = 0x40044276
-       BIOCGSTATS                        = 0x4008426f
-       BIOCIMMEDIATE                     = 0x80044270
-       BIOCPROMISC                       = 0x20004269
-       BIOCSBLEN                         = 0xc0044266
-       BIOCSDLT                          = 0x80044278
-       BIOCSETF                          = 0x80104267
-       BIOCSETFNR                        = 0x8010427e
-       BIOCSETIF                         = 0x8020426c
-       BIOCSHDRCMPLT                     = 0x80044275
-       BIOCSRSIG                         = 0x80044273
-       BIOCSRTIMEOUT                     = 0x8010426d
-       BIOCSSEESENT                      = 0x80044277
-       BIOCVERSION                       = 0x40044271
-       BPF_A                             = 0x10
-       BPF_ABS                           = 0x20
-       BPF_ADD                           = 0x0
-       BPF_ALIGNMENT                     = 0x4
-       BPF_ALU                           = 0x4
-       BPF_AND                           = 0x50
-       BPF_B                             = 0x10
-       BPF_DIV                           = 0x30
-       BPF_H                             = 0x8
-       BPF_IMM                           = 0x0
-       BPF_IND                           = 0x40
-       BPF_JA                            = 0x0
-       BPF_JEQ                           = 0x10
-       BPF_JGE                           = 0x30
-       BPF_JGT                           = 0x20
-       BPF_JMP                           = 0x5
-       BPF_JSET                          = 0x40
-       BPF_K                             = 0x0
-       BPF_LD                            = 0x0
-       BPF_LDX                           = 0x1
-       BPF_LEN                           = 0x80
-       BPF_LSH                           = 0x60
-       BPF_MAJOR_VERSION                 = 0x1
-       BPF_MAXBUFSIZE                    = 0x80000
-       BPF_MAXINSNS                      = 0x200
-       BPF_MEM                           = 0x60
-       BPF_MEMWORDS                      = 0x10
-       BPF_MINBUFSIZE                    = 0x20
-       BPF_MINOR_VERSION                 = 0x1
-       BPF_MISC                          = 0x7
-       BPF_MSH                           = 0xa0
-       BPF_MUL                           = 0x20
-       BPF_NEG                           = 0x80
-       BPF_OR                            = 0x40
-       BPF_RELEASE                       = 0x30bb6
-       BPF_RET                           = 0x6
-       BPF_RSH                           = 0x70
-       BPF_ST                            = 0x2
-       BPF_STX                           = 0x3
-       BPF_SUB                           = 0x10
-       BPF_TAX                           = 0x0
-       BPF_TXA                           = 0x80
-       BPF_W                             = 0x0
-       BPF_X                             = 0x8
-       BRKINT                            = 0x2
-       BS0                               = 0x0
-       BS1                               = 0x8000
-       BSDLY                             = 0x8000
-       CFLUSH                            = 0xf
-       CLOCAL                            = 0x8000
-       CLOCK_MONOTONIC                   = 0x6
-       CLOCK_MONOTONIC_RAW               = 0x4
-       CLOCK_MONOTONIC_RAW_APPROX        = 0x5
-       CLOCK_PROCESS_CPUTIME_ID          = 0xc
-       CLOCK_REALTIME                    = 0x0
-       CLOCK_THREAD_CPUTIME_ID           = 0x10
-       CLOCK_UPTIME_RAW                  = 0x8
-       CLOCK_UPTIME_RAW_APPROX           = 0x9
-       CLONE_NOFOLLOW                    = 0x1
-       CLONE_NOOWNERCOPY                 = 0x2
-       CR0                               = 0x0
-       CR1                               = 0x1000
-       CR2                               = 0x2000
-       CR3                               = 0x3000
-       CRDLY                             = 0x3000
-       CREAD                             = 0x800
-       CRTSCTS                           = 0x30000
-       CS5                               = 0x0
-       CS6                               = 0x100
-       CS7                               = 0x200
-       CS8                               = 0x300
-       CSIZE                             = 0x300
-       CSTART                            = 0x11
-       CSTATUS                           = 0x14
-       CSTOP                             = 0x13
-       CSTOPB                            = 0x400
-       CSUSP                             = 0x1a
-       CTLIOCGINFO                       = 0xc0644e03
-       CTL_HW                            = 0x6
-       CTL_KERN                          = 0x1
-       CTL_MAXNAME                       = 0xc
-       CTL_NET                           = 0x4
-       DLT_A429                          = 0xb8
-       DLT_A653_ICM                      = 0xb9
-       DLT_AIRONET_HEADER                = 0x78
-       DLT_AOS                           = 0xde
-       DLT_APPLE_IP_OVER_IEEE1394        = 0x8a
-       DLT_ARCNET                        = 0x7
-       DLT_ARCNET_LINUX                  = 0x81
-       DLT_ATM_CLIP                      = 0x13
-       DLT_ATM_RFC1483                   = 0xb
-       DLT_AURORA                        = 0x7e
-       DLT_AX25                          = 0x3
-       DLT_AX25_KISS                     = 0xca
-       DLT_BACNET_MS_TP                  = 0xa5
-       DLT_BLUETOOTH_HCI_H4              = 0xbb
-       DLT_BLUETOOTH_HCI_H4_WITH_PHDR    = 0xc9
-       DLT_CAN20B                        = 0xbe
-       DLT_CAN_SOCKETCAN                 = 0xe3
-       DLT_CHAOS                         = 0x5
-       DLT_CHDLC                         = 0x68
-       DLT_CISCO_IOS                     = 0x76
-       DLT_C_HDLC                        = 0x68
-       DLT_C_HDLC_WITH_DIR               = 0xcd
-       DLT_DBUS                          = 0xe7
-       DLT_DECT                          = 0xdd
-       DLT_DOCSIS                        = 0x8f
-       DLT_DVB_CI                        = 0xeb
-       DLT_ECONET                        = 0x73
-       DLT_EN10MB                        = 0x1
-       DLT_EN3MB                         = 0x2
-       DLT_ENC                           = 0x6d
-       DLT_ERF                           = 0xc5
-       DLT_ERF_ETH                       = 0xaf
-       DLT_ERF_POS                       = 0xb0
-       DLT_FC_2                          = 0xe0
-       DLT_FC_2_WITH_FRAME_DELIMS        = 0xe1
-       DLT_FDDI                          = 0xa
-       DLT_FLEXRAY                       = 0xd2
-       DLT_FRELAY                        = 0x6b
-       DLT_FRELAY_WITH_DIR               = 0xce
-       DLT_GCOM_SERIAL                   = 0xad
-       DLT_GCOM_T1E1                     = 0xac
-       DLT_GPF_F                         = 0xab
-       DLT_GPF_T                         = 0xaa
-       DLT_GPRS_LLC                      = 0xa9
-       DLT_GSMTAP_ABIS                   = 0xda
-       DLT_GSMTAP_UM                     = 0xd9
-       DLT_HHDLC                         = 0x79
-       DLT_IBM_SN                        = 0x92
-       DLT_IBM_SP                        = 0x91
-       DLT_IEEE802                       = 0x6
-       DLT_IEEE802_11                    = 0x69
-       DLT_IEEE802_11_RADIO              = 0x7f
-       DLT_IEEE802_11_RADIO_AVS          = 0xa3
-       DLT_IEEE802_15_4                  = 0xc3
-       DLT_IEEE802_15_4_LINUX            = 0xbf
-       DLT_IEEE802_15_4_NOFCS            = 0xe6
-       DLT_IEEE802_15_4_NONASK_PHY       = 0xd7
-       DLT_IEEE802_16_MAC_CPS            = 0xbc
-       DLT_IEEE802_16_MAC_CPS_RADIO      = 0xc1
-       DLT_IPFILTER                      = 0x74
-       DLT_IPMB                          = 0xc7
-       DLT_IPMB_LINUX                    = 0xd1
-       DLT_IPNET                         = 0xe2
-       DLT_IPOIB                         = 0xf2
-       DLT_IPV4                          = 0xe4
-       DLT_IPV6                          = 0xe5
-       DLT_IP_OVER_FC                    = 0x7a
-       DLT_JUNIPER_ATM1                  = 0x89
-       DLT_JUNIPER_ATM2                  = 0x87
-       DLT_JUNIPER_ATM_CEMIC             = 0xee
-       DLT_JUNIPER_CHDLC                 = 0xb5
-       DLT_JUNIPER_ES                    = 0x84
-       DLT_JUNIPER_ETHER                 = 0xb2
-       DLT_JUNIPER_FIBRECHANNEL          = 0xea
-       DLT_JUNIPER_FRELAY                = 0xb4
-       DLT_JUNIPER_GGSN                  = 0x85
-       DLT_JUNIPER_ISM                   = 0xc2
-       DLT_JUNIPER_MFR                   = 0x86
-       DLT_JUNIPER_MLFR                  = 0x83
-       DLT_JUNIPER_MLPPP                 = 0x82
-       DLT_JUNIPER_MONITOR               = 0xa4
-       DLT_JUNIPER_PIC_PEER              = 0xae
-       DLT_JUNIPER_PPP                   = 0xb3
-       DLT_JUNIPER_PPPOE                 = 0xa7
-       DLT_JUNIPER_PPPOE_ATM             = 0xa8
-       DLT_JUNIPER_SERVICES              = 0x88
-       DLT_JUNIPER_SRX_E2E               = 0xe9
-       DLT_JUNIPER_ST                    = 0xc8
-       DLT_JUNIPER_VP                    = 0xb7
-       DLT_JUNIPER_VS                    = 0xe8
-       DLT_LAPB_WITH_DIR                 = 0xcf
-       DLT_LAPD                          = 0xcb
-       DLT_LIN                           = 0xd4
-       DLT_LINUX_EVDEV                   = 0xd8
-       DLT_LINUX_IRDA                    = 0x90
-       DLT_LINUX_LAPD                    = 0xb1
-       DLT_LINUX_PPP_WITHDIRECTION       = 0xa6
-       DLT_LINUX_SLL                     = 0x71
-       DLT_LOOP                          = 0x6c
-       DLT_LTALK                         = 0x72
-       DLT_MATCHING_MAX                  = 0x10a
-       DLT_MATCHING_MIN                  = 0x68
-       DLT_MFR                           = 0xb6
-       DLT_MOST                          = 0xd3
-       DLT_MPEG_2_TS                     = 0xf3
-       DLT_MPLS                          = 0xdb
-       DLT_MTP2                          = 0x8c
-       DLT_MTP2_WITH_PHDR                = 0x8b
-       DLT_MTP3                          = 0x8d
-       DLT_MUX27010                      = 0xec
-       DLT_NETANALYZER                   = 0xf0
-       DLT_NETANALYZER_TRANSPARENT       = 0xf1
-       DLT_NFC_LLCP                      = 0xf5
-       DLT_NFLOG                         = 0xef
-       DLT_NG40                          = 0xf4
-       DLT_NULL                          = 0x0
-       DLT_PCI_EXP                       = 0x7d
-       DLT_PFLOG                         = 0x75
-       DLT_PFSYNC                        = 0x12
-       DLT_PPI                           = 0xc0
-       DLT_PPP                           = 0x9
-       DLT_PPP_BSDOS                     = 0x10
-       DLT_PPP_ETHER                     = 0x33
-       DLT_PPP_PPPD                      = 0xa6
-       DLT_PPP_SERIAL                    = 0x32
-       DLT_PPP_WITH_DIR                  = 0xcc
-       DLT_PPP_WITH_DIRECTION            = 0xa6
-       DLT_PRISM_HEADER                  = 0x77
-       DLT_PRONET                        = 0x4
-       DLT_RAIF1                         = 0xc6
-       DLT_RAW                           = 0xc
-       DLT_RIO                           = 0x7c
-       DLT_SCCP                          = 0x8e
-       DLT_SITA                          = 0xc4
-       DLT_SLIP                          = 0x8
-       DLT_SLIP_BSDOS                    = 0xf
-       DLT_STANAG_5066_D_PDU             = 0xed
-       DLT_SUNATM                        = 0x7b
-       DLT_SYMANTEC_FIREWALL             = 0x63
-       DLT_TZSP                          = 0x80
-       DLT_USB                           = 0xba
-       DLT_USB_DARWIN                    = 0x10a
-       DLT_USB_LINUX                     = 0xbd
-       DLT_USB_LINUX_MMAPPED             = 0xdc
-       DLT_USER0                         = 0x93
-       DLT_USER1                         = 0x94
-       DLT_USER10                        = 0x9d
-       DLT_USER11                        = 0x9e
-       DLT_USER12                        = 0x9f
-       DLT_USER13                        = 0xa0
-       DLT_USER14                        = 0xa1
-       DLT_USER15                        = 0xa2
-       DLT_USER2                         = 0x95
-       DLT_USER3                         = 0x96
-       DLT_USER4                         = 0x97
-       DLT_USER5                         = 0x98
-       DLT_USER6                         = 0x99
-       DLT_USER7                         = 0x9a
-       DLT_USER8                         = 0x9b
-       DLT_USER9                         = 0x9c
-       DLT_WIHART                        = 0xdf
-       DLT_X2E_SERIAL                    = 0xd5
-       DLT_X2E_XORAYA                    = 0xd6
-       DT_BLK                            = 0x6
-       DT_CHR                            = 0x2
-       DT_DIR                            = 0x4
-       DT_FIFO                           = 0x1
-       DT_LNK                            = 0xa
-       DT_REG                            = 0x8
-       DT_SOCK                           = 0xc
-       DT_UNKNOWN                        = 0x0
-       DT_WHT                            = 0xe
-       ECHO                              = 0x8
-       ECHOCTL                           = 0x40
-       ECHOE                             = 0x2
-       ECHOK                             = 0x4
-       ECHOKE                            = 0x1
-       ECHONL                            = 0x10
-       ECHOPRT                           = 0x20
-       EVFILT_AIO                        = -0x3
-       EVFILT_EXCEPT                     = -0xf
-       EVFILT_FS                         = -0x9
-       EVFILT_MACHPORT                   = -0x8
-       EVFILT_PROC                       = -0x5
-       EVFILT_READ                       = -0x1
-       EVFILT_SIGNAL                     = -0x6
-       EVFILT_SYSCOUNT                   = 0x11
-       EVFILT_THREADMARKER               = 0x11
-       EVFILT_TIMER                      = -0x7
-       EVFILT_USER                       = -0xa
-       EVFILT_VM                         = -0xc
-       EVFILT_VNODE                      = -0x4
-       EVFILT_WRITE                      = -0x2
-       EV_ADD                            = 0x1
-       EV_CLEAR                          = 0x20
-       EV_DELETE                         = 0x2
-       EV_DISABLE                        = 0x8
-       EV_DISPATCH                       = 0x80
-       EV_DISPATCH2                      = 0x180
-       EV_ENABLE                         = 0x4
-       EV_EOF                            = 0x8000
-       EV_ERROR                          = 0x4000
-       EV_FLAG0                          = 0x1000
-       EV_FLAG1                          = 0x2000
-       EV_ONESHOT                        = 0x10
-       EV_OOBAND                         = 0x2000
-       EV_POLL                           = 0x1000
-       EV_RECEIPT                        = 0x40
-       EV_SYSFLAGS                       = 0xf000
-       EV_UDATA_SPECIFIC                 = 0x100
-       EV_VANISHED                       = 0x200
-       EXTA                              = 0x4b00
-       EXTB                              = 0x9600
-       EXTPROC                           = 0x800
-       FD_CLOEXEC                        = 0x1
-       FD_SETSIZE                        = 0x400
-       FF0                               = 0x0
-       FF1                               = 0x4000
-       FFDLY                             = 0x4000
-       FLUSHO                            = 0x800000
-       FSOPT_ATTR_CMN_EXTENDED           = 0x20
-       FSOPT_NOFOLLOW                    = 0x1
-       FSOPT_NOINMEMUPDATE               = 0x2
-       FSOPT_PACK_INVAL_ATTRS            = 0x8
-       FSOPT_REPORT_FULLSIZE             = 0x4
-       FSOPT_RETURN_REALDEV              = 0x200
-       F_ADDFILESIGS                     = 0x3d
-       F_ADDFILESIGS_FOR_DYLD_SIM        = 0x53
-       F_ADDFILESIGS_INFO                = 0x67
-       F_ADDFILESIGS_RETURN              = 0x61
-       F_ADDFILESUPPL                    = 0x68
-       F_ADDSIGS                         = 0x3b
-       F_ALLOCATEALL                     = 0x4
-       F_ALLOCATECONTIG                  = 0x2
-       F_BARRIERFSYNC                    = 0x55
-       F_CHECK_LV                        = 0x62
-       F_CHKCLEAN                        = 0x29
-       F_DUPFD                           = 0x0
-       F_DUPFD_CLOEXEC                   = 0x43
-       F_FINDSIGS                        = 0x4e
-       F_FLUSH_DATA                      = 0x28
-       F_FREEZE_FS                       = 0x35
-       F_FULLFSYNC                       = 0x33
-       F_GETCODEDIR                      = 0x48
-       F_GETFD                           = 0x1
-       F_GETFL                           = 0x3
-       F_GETLK                           = 0x7
-       F_GETLKPID                        = 0x42
-       F_GETNOSIGPIPE                    = 0x4a
-       F_GETOWN                          = 0x5
-       F_GETPATH                         = 0x32
-       F_GETPATH_MTMINFO                 = 0x47
-       F_GETPATH_NOFIRMLINK              = 0x66
-       F_GETPROTECTIONCLASS              = 0x3f
-       F_GETPROTECTIONLEVEL              = 0x4d
-       F_GETSIGSINFO                     = 0x69
-       F_GLOBAL_NOCACHE                  = 0x37
-       F_LOG2PHYS                        = 0x31
-       F_LOG2PHYS_EXT                    = 0x41
-       F_NOCACHE                         = 0x30
-       F_NODIRECT                        = 0x3e
-       F_OK                              = 0x0
-       F_PATHPKG_CHECK                   = 0x34
-       F_PEOFPOSMODE                     = 0x3
-       F_PREALLOCATE                     = 0x2a
-       F_PUNCHHOLE                       = 0x63
-       F_RDADVISE                        = 0x2c
-       F_RDAHEAD                         = 0x2d
-       F_RDLCK                           = 0x1
-       F_SETBACKINGSTORE                 = 0x46
-       F_SETFD                           = 0x2
-       F_SETFL                           = 0x4
-       F_SETLK                           = 0x8
-       F_SETLKW                          = 0x9
-       F_SETLKWTIMEOUT                   = 0xa
-       F_SETNOSIGPIPE                    = 0x49
-       F_SETOWN                          = 0x6
-       F_SETPROTECTIONCLASS              = 0x40
-       F_SETSIZE                         = 0x2b
-       F_SINGLE_WRITER                   = 0x4c
-       F_SPECULATIVE_READ                = 0x65
-       F_THAW_FS                         = 0x36
-       F_TRANSCODEKEY                    = 0x4b
-       F_TRIM_ACTIVE_FILE                = 0x64
-       F_UNLCK                           = 0x2
-       F_VOLPOSMODE                      = 0x4
-       F_WRLCK                           = 0x3
-       HUPCL                             = 0x4000
-       HW_MACHINE                        = 0x1
-       ICANON                            = 0x100
-       ICMP6_FILTER                      = 0x12
-       ICRNL                             = 0x100
-       IEXTEN                            = 0x400
-       IFF_ALLMULTI                      = 0x200
-       IFF_ALTPHYS                       = 0x4000
-       IFF_BROADCAST                     = 0x2
-       IFF_DEBUG                         = 0x4
-       IFF_LINK0                         = 0x1000
-       IFF_LINK1                         = 0x2000
-       IFF_LINK2                         = 0x4000
-       IFF_LOOPBACK                      = 0x8
-       IFF_MULTICAST                     = 0x8000
-       IFF_NOARP                         = 0x80
-       IFF_NOTRAILERS                    = 0x20
-       IFF_OACTIVE                       = 0x400
-       IFF_POINTOPOINT                   = 0x10
-       IFF_PROMISC                       = 0x100
-       IFF_RUNNING                       = 0x40
-       IFF_SIMPLEX                       = 0x800
-       IFF_UP                            = 0x1
-       IFNAMSIZ                          = 0x10
-       IFT_1822                          = 0x2
-       IFT_6LOWPAN                       = 0x40
-       IFT_AAL5                          = 0x31
-       IFT_ARCNET                        = 0x23
-       IFT_ARCNETPLUS                    = 0x24
-       IFT_ATM                           = 0x25
-       IFT_BRIDGE                        = 0xd1
-       IFT_CARP                          = 0xf8
-       IFT_CELLULAR                      = 0xff
-       IFT_CEPT                          = 0x13
-       IFT_DS3                           = 0x1e
-       IFT_ENC                           = 0xf4
-       IFT_EON                           = 0x19
-       IFT_ETHER                         = 0x6
-       IFT_FAITH                         = 0x38
-       IFT_FDDI                          = 0xf
-       IFT_FRELAY                        = 0x20
-       IFT_FRELAYDCE                     = 0x2c
-       IFT_GIF                           = 0x37
-       IFT_HDH1822                       = 0x3
-       IFT_HIPPI                         = 0x2f
-       IFT_HSSI                          = 0x2e
-       IFT_HY                            = 0xe
-       IFT_IEEE1394                      = 0x90
-       IFT_IEEE8023ADLAG                 = 0x88
-       IFT_ISDNBASIC                     = 0x14
-       IFT_ISDNPRIMARY                   = 0x15
-       IFT_ISO88022LLC                   = 0x29
-       IFT_ISO88023                      = 0x7
-       IFT_ISO88024                      = 0x8
-       IFT_ISO88025                      = 0x9
-       IFT_ISO88026                      = 0xa
-       IFT_L2VLAN                        = 0x87
-       IFT_LAPB                          = 0x10
-       IFT_LOCALTALK                     = 0x2a
-       IFT_LOOP                          = 0x18
-       IFT_MIOX25                        = 0x26
-       IFT_MODEM                         = 0x30
-       IFT_NSIP                          = 0x1b
-       IFT_OTHER                         = 0x1
-       IFT_P10                           = 0xc
-       IFT_P80                           = 0xd
-       IFT_PARA                          = 0x22
-       IFT_PDP                           = 0xff
-       IFT_PFLOG                         = 0xf5
-       IFT_PFSYNC                        = 0xf6
-       IFT_PKTAP                         = 0xfe
-       IFT_PPP                           = 0x17
-       IFT_PROPMUX                       = 0x36
-       IFT_PROPVIRTUAL                   = 0x35
-       IFT_PTPSERIAL                     = 0x16
-       IFT_RS232                         = 0x21
-       IFT_SDLC                          = 0x11
-       IFT_SIP                           = 0x1f
-       IFT_SLIP                          = 0x1c
-       IFT_SMDSDXI                       = 0x2b
-       IFT_SMDSICIP                      = 0x34
-       IFT_SONET                         = 0x27
-       IFT_SONETPATH                     = 0x32
-       IFT_SONETVT                       = 0x33
-       IFT_STARLAN                       = 0xb
-       IFT_STF                           = 0x39
-       IFT_T1                            = 0x12
-       IFT_ULTRA                         = 0x1d
-       IFT_V35                           = 0x2d
-       IFT_X25                           = 0x5
-       IFT_X25DDN                        = 0x4
-       IFT_X25PLE                        = 0x28
-       IFT_XETHER                        = 0x1a
-       IGNBRK                            = 0x1
-       IGNCR                             = 0x80
-       IGNPAR                            = 0x4
-       IMAXBEL                           = 0x2000
-       INLCR                             = 0x40
-       INPCK                             = 0x10
-       IN_CLASSA_HOST                    = 0xffffff
-       IN_CLASSA_MAX                     = 0x80
-       IN_CLASSA_NET                     = 0xff000000
-       IN_CLASSA_NSHIFT                  = 0x18
-       IN_CLASSB_HOST                    = 0xffff
-       IN_CLASSB_MAX                     = 0x10000
-       IN_CLASSB_NET                     = 0xffff0000
-       IN_CLASSB_NSHIFT                  = 0x10
-       IN_CLASSC_HOST                    = 0xff
-       IN_CLASSC_NET                     = 0xffffff00
-       IN_CLASSC_NSHIFT                  = 0x8
-       IN_CLASSD_HOST                    = 0xfffffff
-       IN_CLASSD_NET                     = 0xf0000000
-       IN_CLASSD_NSHIFT                  = 0x1c
-       IN_LINKLOCALNETNUM                = 0xa9fe0000
-       IN_LOOPBACKNET                    = 0x7f
-       IPPROTO_3PC                       = 0x22
-       IPPROTO_ADFS                      = 0x44
-       IPPROTO_AH                        = 0x33
-       IPPROTO_AHIP                      = 0x3d
-       IPPROTO_APES                      = 0x63
-       IPPROTO_ARGUS                     = 0xd
-       IPPROTO_AX25                      = 0x5d
-       IPPROTO_BHA                       = 0x31
-       IPPROTO_BLT                       = 0x1e
-       IPPROTO_BRSATMON                  = 0x4c
-       IPPROTO_CFTP                      = 0x3e
-       IPPROTO_CHAOS                     = 0x10
-       IPPROTO_CMTP                      = 0x26
-       IPPROTO_CPHB                      = 0x49
-       IPPROTO_CPNX                      = 0x48
-       IPPROTO_DDP                       = 0x25
-       IPPROTO_DGP                       = 0x56
-       IPPROTO_DIVERT                    = 0xfe
-       IPPROTO_DONE                      = 0x101
-       IPPROTO_DSTOPTS                   = 0x3c
-       IPPROTO_EGP                       = 0x8
-       IPPROTO_EMCON                     = 0xe
-       IPPROTO_ENCAP                     = 0x62
-       IPPROTO_EON                       = 0x50
-       IPPROTO_ESP                       = 0x32
-       IPPROTO_ETHERIP                   = 0x61
-       IPPROTO_FRAGMENT                  = 0x2c
-       IPPROTO_GGP                       = 0x3
-       IPPROTO_GMTP                      = 0x64
-       IPPROTO_GRE                       = 0x2f
-       IPPROTO_HELLO                     = 0x3f
-       IPPROTO_HMP                       = 0x14
-       IPPROTO_HOPOPTS                   = 0x0
-       IPPROTO_ICMP                      = 0x1
-       IPPROTO_ICMPV6                    = 0x3a
-       IPPROTO_IDP                       = 0x16
-       IPPROTO_IDPR                      = 0x23
-       IPPROTO_IDRP                      = 0x2d
-       IPPROTO_IGMP                      = 0x2
-       IPPROTO_IGP                       = 0x55
-       IPPROTO_IGRP                      = 0x58
-       IPPROTO_IL                        = 0x28
-       IPPROTO_INLSP                     = 0x34
-       IPPROTO_INP                       = 0x20
-       IPPROTO_IP                        = 0x0
-       IPPROTO_IPCOMP                    = 0x6c
-       IPPROTO_IPCV                      = 0x47
-       IPPROTO_IPEIP                     = 0x5e
-       IPPROTO_IPIP                      = 0x4
-       IPPROTO_IPPC                      = 0x43
-       IPPROTO_IPV4                      = 0x4
-       IPPROTO_IPV6                      = 0x29
-       IPPROTO_IRTP                      = 0x1c
-       IPPROTO_KRYPTOLAN                 = 0x41
-       IPPROTO_LARP                      = 0x5b
-       IPPROTO_LEAF1                     = 0x19
-       IPPROTO_LEAF2                     = 0x1a
-       IPPROTO_MAX                       = 0x100
-       IPPROTO_MAXID                     = 0x34
-       IPPROTO_MEAS                      = 0x13
-       IPPROTO_MHRP                      = 0x30
-       IPPROTO_MICP                      = 0x5f
-       IPPROTO_MTP                       = 0x5c
-       IPPROTO_MUX                       = 0x12
-       IPPROTO_ND                        = 0x4d
-       IPPROTO_NHRP                      = 0x36
-       IPPROTO_NONE                      = 0x3b
-       IPPROTO_NSP                       = 0x1f
-       IPPROTO_NVPII                     = 0xb
-       IPPROTO_OSPFIGP                   = 0x59
-       IPPROTO_PGM                       = 0x71
-       IPPROTO_PIGP                      = 0x9
-       IPPROTO_PIM                       = 0x67
-       IPPROTO_PRM                       = 0x15
-       IPPROTO_PUP                       = 0xc
-       IPPROTO_PVP                       = 0x4b
-       IPPROTO_RAW                       = 0xff
-       IPPROTO_RCCMON                    = 0xa
-       IPPROTO_RDP                       = 0x1b
-       IPPROTO_ROUTING                   = 0x2b
-       IPPROTO_RSVP                      = 0x2e
-       IPPROTO_RVD                       = 0x42
-       IPPROTO_SATEXPAK                  = 0x40
-       IPPROTO_SATMON                    = 0x45
-       IPPROTO_SCCSP                     = 0x60
-       IPPROTO_SCTP                      = 0x84
-       IPPROTO_SDRP                      = 0x2a
-       IPPROTO_SEP                       = 0x21
-       IPPROTO_SRPC                      = 0x5a
-       IPPROTO_ST                        = 0x7
-       IPPROTO_SVMTP                     = 0x52
-       IPPROTO_SWIPE                     = 0x35
-       IPPROTO_TCF                       = 0x57
-       IPPROTO_TCP                       = 0x6
-       IPPROTO_TP                        = 0x1d
-       IPPROTO_TPXX                      = 0x27
-       IPPROTO_TRUNK1                    = 0x17
-       IPPROTO_TRUNK2                    = 0x18
-       IPPROTO_TTP                       = 0x54
-       IPPROTO_UDP                       = 0x11
-       IPPROTO_VINES                     = 0x53
-       IPPROTO_VISA                      = 0x46
-       IPPROTO_VMTP                      = 0x51
-       IPPROTO_WBEXPAK                   = 0x4f
-       IPPROTO_WBMON                     = 0x4e
-       IPPROTO_WSN                       = 0x4a
-       IPPROTO_XNET                      = 0xf
-       IPPROTO_XTP                       = 0x24
-       IPV6_2292DSTOPTS                  = 0x17
-       IPV6_2292HOPLIMIT                 = 0x14
-       IPV6_2292HOPOPTS                  = 0x16
-       IPV6_2292NEXTHOP                  = 0x15
-       IPV6_2292PKTINFO                  = 0x13
-       IPV6_2292PKTOPTIONS               = 0x19
-       IPV6_2292RTHDR                    = 0x18
-       IPV6_3542DSTOPTS                  = 0x32
-       IPV6_3542HOPLIMIT                 = 0x2f
-       IPV6_3542HOPOPTS                  = 0x31
-       IPV6_3542NEXTHOP                  = 0x30
-       IPV6_3542PKTINFO                  = 0x2e
-       IPV6_3542RTHDR                    = 0x33
-       IPV6_ADDR_MC_FLAGS_PREFIX         = 0x20
-       IPV6_ADDR_MC_FLAGS_TRANSIENT      = 0x10
-       IPV6_ADDR_MC_FLAGS_UNICAST_BASED  = 0x30
-       IPV6_AUTOFLOWLABEL                = 0x3b
-       IPV6_BINDV6ONLY                   = 0x1b
-       IPV6_BOUND_IF                     = 0x7d
-       IPV6_CHECKSUM                     = 0x1a
-       IPV6_DEFAULT_MULTICAST_HOPS       = 0x1
-       IPV6_DEFAULT_MULTICAST_LOOP       = 0x1
-       IPV6_DEFHLIM                      = 0x40
-       IPV6_DONTFRAG                     = 0x3e
-       IPV6_DSTOPTS                      = 0x32
-       IPV6_FAITH                        = 0x1d
-       IPV6_FLOWINFO_MASK                = 0xffffff0f
-       IPV6_FLOWLABEL_MASK               = 0xffff0f00
-       IPV6_FLOW_ECN_MASK                = 0x3000
-       IPV6_FRAGTTL                      = 0x3c
-       IPV6_FW_ADD                       = 0x1e
-       IPV6_FW_DEL                       = 0x1f
-       IPV6_FW_FLUSH                     = 0x20
-       IPV6_FW_GET                       = 0x22
-       IPV6_FW_ZERO                      = 0x21
-       IPV6_HLIMDEC                      = 0x1
-       IPV6_HOPLIMIT                     = 0x2f
-       IPV6_HOPOPTS                      = 0x31
-       IPV6_IPSEC_POLICY                 = 0x1c
-       IPV6_JOIN_GROUP                   = 0xc
-       IPV6_LEAVE_GROUP                  = 0xd
-       IPV6_MAXHLIM                      = 0xff
-       IPV6_MAXOPTHDR                    = 0x800
-       IPV6_MAXPACKET                    = 0xffff
-       IPV6_MAX_GROUP_SRC_FILTER         = 0x200
-       IPV6_MAX_MEMBERSHIPS              = 0xfff
-       IPV6_MAX_SOCK_SRC_FILTER          = 0x80
-       IPV6_MIN_MEMBERSHIPS              = 0x1f
-       IPV6_MMTU                         = 0x500
-       IPV6_MSFILTER                     = 0x4a
-       IPV6_MULTICAST_HOPS               = 0xa
-       IPV6_MULTICAST_IF                 = 0x9
-       IPV6_MULTICAST_LOOP               = 0xb
-       IPV6_NEXTHOP                      = 0x30
-       IPV6_PATHMTU                      = 0x2c
-       IPV6_PKTINFO                      = 0x2e
-       IPV6_PORTRANGE                    = 0xe
-       IPV6_PORTRANGE_DEFAULT            = 0x0
-       IPV6_PORTRANGE_HIGH               = 0x1
-       IPV6_PORTRANGE_LOW                = 0x2
-       IPV6_PREFER_TEMPADDR              = 0x3f
-       IPV6_RECVDSTOPTS                  = 0x28
-       IPV6_RECVHOPLIMIT                 = 0x25
-       IPV6_RECVHOPOPTS                  = 0x27
-       IPV6_RECVPATHMTU                  = 0x2b
-       IPV6_RECVPKTINFO                  = 0x3d
-       IPV6_RECVRTHDR                    = 0x26
-       IPV6_RECVTCLASS                   = 0x23
-       IPV6_RTHDR                        = 0x33
-       IPV6_RTHDRDSTOPTS                 = 0x39
-       IPV6_RTHDR_LOOSE                  = 0x0
-       IPV6_RTHDR_STRICT                 = 0x1
-       IPV6_RTHDR_TYPE_0                 = 0x0
-       IPV6_SOCKOPT_RESERVED1            = 0x3
-       IPV6_TCLASS                       = 0x24
-       IPV6_UNICAST_HOPS                 = 0x4
-       IPV6_USE_MIN_MTU                  = 0x2a
-       IPV6_V6ONLY                       = 0x1b
-       IPV6_VERSION                      = 0x60
-       IPV6_VERSION_MASK                 = 0xf0
-       IP_ADD_MEMBERSHIP                 = 0xc
-       IP_ADD_SOURCE_MEMBERSHIP          = 0x46
-       IP_BLOCK_SOURCE                   = 0x48
-       IP_BOUND_IF                       = 0x19
-       IP_DEFAULT_MULTICAST_LOOP         = 0x1
-       IP_DEFAULT_MULTICAST_TTL          = 0x1
-       IP_DF                             = 0x4000
-       IP_DONTFRAG                       = 0x1c
-       IP_DROP_MEMBERSHIP                = 0xd
-       IP_DROP_SOURCE_MEMBERSHIP         = 0x47
-       IP_DUMMYNET_CONFIGURE             = 0x3c
-       IP_DUMMYNET_DEL                   = 0x3d
-       IP_DUMMYNET_FLUSH                 = 0x3e
-       IP_DUMMYNET_GET                   = 0x40
-       IP_FAITH                          = 0x16
-       IP_FW_ADD                         = 0x28
-       IP_FW_DEL                         = 0x29
-       IP_FW_FLUSH                       = 0x2a
-       IP_FW_GET                         = 0x2c
-       IP_FW_RESETLOG                    = 0x2d
-       IP_FW_ZERO                        = 0x2b
-       IP_HDRINCL                        = 0x2
-       IP_IPSEC_POLICY                   = 0x15
-       IP_MAXPACKET                      = 0xffff
-       IP_MAX_GROUP_SRC_FILTER           = 0x200
-       IP_MAX_MEMBERSHIPS                = 0xfff
-       IP_MAX_SOCK_MUTE_FILTER           = 0x80
-       IP_MAX_SOCK_SRC_FILTER            = 0x80
-       IP_MF                             = 0x2000
-       IP_MIN_MEMBERSHIPS                = 0x1f
-       IP_MSFILTER                       = 0x4a
-       IP_MSS                            = 0x240
-       IP_MULTICAST_IF                   = 0x9
-       IP_MULTICAST_IFINDEX              = 0x42
-       IP_MULTICAST_LOOP                 = 0xb
-       IP_MULTICAST_TTL                  = 0xa
-       IP_MULTICAST_VIF                  = 0xe
-       IP_NAT__XXX                       = 0x37
-       IP_OFFMASK                        = 0x1fff
-       IP_OLD_FW_ADD                     = 0x32
-       IP_OLD_FW_DEL                     = 0x33
-       IP_OLD_FW_FLUSH                   = 0x34
-       IP_OLD_FW_GET                     = 0x36
-       IP_OLD_FW_RESETLOG                = 0x38
-       IP_OLD_FW_ZERO                    = 0x35
-       IP_OPTIONS                        = 0x1
-       IP_PKTINFO                        = 0x1a
-       IP_PORTRANGE                      = 0x13
-       IP_PORTRANGE_DEFAULT              = 0x0
-       IP_PORTRANGE_HIGH                 = 0x1
-       IP_PORTRANGE_LOW                  = 0x2
-       IP_RECVDSTADDR                    = 0x7
-       IP_RECVIF                         = 0x14
-       IP_RECVOPTS                       = 0x5
-       IP_RECVPKTINFO                    = 0x1a
-       IP_RECVRETOPTS                    = 0x6
-       IP_RECVTOS                        = 0x1b
-       IP_RECVTTL                        = 0x18
-       IP_RETOPTS                        = 0x8
-       IP_RF                             = 0x8000
-       IP_RSVP_OFF                       = 0x10
-       IP_RSVP_ON                        = 0xf
-       IP_RSVP_VIF_OFF                   = 0x12
-       IP_RSVP_VIF_ON                    = 0x11
-       IP_STRIPHDR                       = 0x17
-       IP_TOS                            = 0x3
-       IP_TRAFFIC_MGT_BACKGROUND         = 0x41
-       IP_TTL                            = 0x4
-       IP_UNBLOCK_SOURCE                 = 0x49
-       ISIG                              = 0x80
-       ISTRIP                            = 0x20
-       IUTF8                             = 0x4000
-       IXANY                             = 0x800
-       IXOFF                             = 0x400
-       IXON                              = 0x200
-       KERN_HOSTNAME                     = 0xa
-       KERN_OSRELEASE                    = 0x2
-       KERN_OSTYPE                       = 0x1
-       KERN_VERSION                      = 0x4
-       LOCAL_PEERCRED                    = 0x1
-       LOCAL_PEEREPID                    = 0x3
-       LOCAL_PEEREUUID                   = 0x5
-       LOCAL_PEERPID                     = 0x2
-       LOCAL_PEERTOKEN                   = 0x6
-       LOCAL_PEERUUID                    = 0x4
-       LOCK_EX                           = 0x2
-       LOCK_NB                           = 0x4
-       LOCK_SH                           = 0x1
-       LOCK_UN                           = 0x8
-       MADV_CAN_REUSE                    = 0x9
-       MADV_DONTNEED                     = 0x4
-       MADV_FREE                         = 0x5
-       MADV_FREE_REUSABLE                = 0x7
-       MADV_FREE_REUSE                   = 0x8
-       MADV_NORMAL                       = 0x0
-       MADV_PAGEOUT                      = 0xa
-       MADV_RANDOM                       = 0x1
-       MADV_SEQUENTIAL                   = 0x2
-       MADV_WILLNEED                     = 0x3
-       MADV_ZERO_WIRED_PAGES             = 0x6
-       MAP_32BIT                         = 0x8000
-       MAP_ANON                          = 0x1000
-       MAP_ANONYMOUS                     = 0x1000
-       MAP_COPY                          = 0x2
-       MAP_FILE                          = 0x0
-       MAP_FIXED                         = 0x10
-       MAP_HASSEMAPHORE                  = 0x200
-       MAP_JIT                           = 0x800
-       MAP_NOCACHE                       = 0x400
-       MAP_NOEXTEND                      = 0x100
-       MAP_NORESERVE                     = 0x40
-       MAP_PRIVATE                       = 0x2
-       MAP_RENAME                        = 0x20
-       MAP_RESERVED0080                  = 0x80
-       MAP_RESILIENT_CODESIGN            = 0x2000
-       MAP_RESILIENT_MEDIA               = 0x4000
-       MAP_SHARED                        = 0x1
-       MAP_TRANSLATED_ALLOW_EXECUTE      = 0x20000
-       MAP_UNIX03                        = 0x40000
-       MCAST_BLOCK_SOURCE                = 0x54
-       MCAST_EXCLUDE                     = 0x2
-       MCAST_INCLUDE                     = 0x1
-       MCAST_JOIN_GROUP                  = 0x50
-       MCAST_JOIN_SOURCE_GROUP           = 0x52
-       MCAST_LEAVE_GROUP                 = 0x51
-       MCAST_LEAVE_SOURCE_GROUP          = 0x53
-       MCAST_UNBLOCK_SOURCE              = 0x55
-       MCAST_UNDEFINED                   = 0x0
-       MCL_CURRENT                       = 0x1
-       MCL_FUTURE                        = 0x2
-       MNT_ASYNC                         = 0x40
-       MNT_AUTOMOUNTED                   = 0x400000
-       MNT_CMDFLAGS                      = 0xf0000
-       MNT_CPROTECT                      = 0x80
-       MNT_DEFWRITE                      = 0x2000000
-       MNT_DONTBROWSE                    = 0x100000
-       MNT_DOVOLFS                       = 0x8000
-       MNT_DWAIT                         = 0x4
-       MNT_EXPORTED                      = 0x100
-       MNT_EXT_ROOT_DATA_VOL             = 0x1
-       MNT_FORCE                         = 0x80000
-       MNT_IGNORE_OWNERSHIP              = 0x200000
-       MNT_JOURNALED                     = 0x800000
-       MNT_LOCAL                         = 0x1000
-       MNT_MULTILABEL                    = 0x4000000
-       MNT_NOATIME                       = 0x10000000
-       MNT_NOBLOCK                       = 0x20000
-       MNT_NODEV                         = 0x10
-       MNT_NOEXEC                        = 0x4
-       MNT_NOSUID                        = 0x8
-       MNT_NOUSERXATTR                   = 0x1000000
-       MNT_NOWAIT                        = 0x2
-       MNT_QUARANTINE                    = 0x400
-       MNT_QUOTA                         = 0x2000
-       MNT_RDONLY                        = 0x1
-       MNT_RELOAD                        = 0x40000
-       MNT_REMOVABLE                     = 0x200
-       MNT_ROOTFS                        = 0x4000
-       MNT_SNAPSHOT                      = 0x40000000
-       MNT_STRICTATIME                   = 0x80000000
-       MNT_SYNCHRONOUS                   = 0x2
-       MNT_UNION                         = 0x20
-       MNT_UNKNOWNPERMISSIONS            = 0x200000
-       MNT_UPDATE                        = 0x10000
-       MNT_VISFLAGMASK                   = 0xd7f0f7ff
-       MNT_WAIT                          = 0x1
-       MSG_CTRUNC                        = 0x20
-       MSG_DONTROUTE                     = 0x4
-       MSG_DONTWAIT                      = 0x80
-       MSG_EOF                           = 0x100
-       MSG_EOR                           = 0x8
-       MSG_FLUSH                         = 0x400
-       MSG_HAVEMORE                      = 0x2000
-       MSG_HOLD                          = 0x800
-       MSG_NEEDSA                        = 0x10000
-       MSG_NOSIGNAL                      = 0x80000
-       MSG_OOB                           = 0x1
-       MSG_PEEK                          = 0x2
-       MSG_RCVMORE                       = 0x4000
-       MSG_SEND                          = 0x1000
-       MSG_TRUNC                         = 0x10
-       MSG_WAITALL                       = 0x40
-       MSG_WAITSTREAM                    = 0x200
-       MS_ASYNC                          = 0x1
-       MS_DEACTIVATE                     = 0x8
-       MS_INVALIDATE                     = 0x2
-       MS_KILLPAGES                      = 0x4
-       MS_SYNC                           = 0x10
-       NAME_MAX                          = 0xff
-       NET_RT_DUMP                       = 0x1
-       NET_RT_DUMP2                      = 0x7
-       NET_RT_FLAGS                      = 0x2
-       NET_RT_FLAGS_PRIV                 = 0xa
-       NET_RT_IFLIST                     = 0x3
-       NET_RT_IFLIST2                    = 0x6
-       NET_RT_MAXID                      = 0xb
-       NET_RT_STAT                       = 0x4
-       NET_RT_TRASH                      = 0x5
-       NFDBITS                           = 0x20
-       NL0                               = 0x0
-       NL1                               = 0x100
-       NL2                               = 0x200
-       NL3                               = 0x300
-       NLDLY                             = 0x300
-       NOFLSH                            = 0x80000000
-       NOKERNINFO                        = 0x2000000
-       NOTE_ABSOLUTE                     = 0x8
-       NOTE_ATTRIB                       = 0x8
-       NOTE_BACKGROUND                   = 0x40
-       NOTE_CHILD                        = 0x4
-       NOTE_CRITICAL                     = 0x20
-       NOTE_DELETE                       = 0x1
-       NOTE_EXEC                         = 0x20000000
-       NOTE_EXIT                         = 0x80000000
-       NOTE_EXITSTATUS                   = 0x4000000
-       NOTE_EXIT_CSERROR                 = 0x40000
-       NOTE_EXIT_DECRYPTFAIL             = 0x10000
-       NOTE_EXIT_DETAIL                  = 0x2000000
-       NOTE_EXIT_DETAIL_MASK             = 0x70000
-       NOTE_EXIT_MEMORY                  = 0x20000
-       NOTE_EXIT_REPARENTED              = 0x80000
-       NOTE_EXTEND                       = 0x4
-       NOTE_FFAND                        = 0x40000000
-       NOTE_FFCOPY                       = 0xc0000000
-       NOTE_FFCTRLMASK                   = 0xc0000000
-       NOTE_FFLAGSMASK                   = 0xffffff
-       NOTE_FFNOP                        = 0x0
-       NOTE_FFOR                         = 0x80000000
-       NOTE_FORK                         = 0x40000000
-       NOTE_FUNLOCK                      = 0x100
-       NOTE_LEEWAY                       = 0x10
-       NOTE_LINK                         = 0x10
-       NOTE_LOWAT                        = 0x1
-       NOTE_MACHTIME                     = 0x100
-       NOTE_MACH_CONTINUOUS_TIME         = 0x80
-       NOTE_NONE                         = 0x80
-       NOTE_NSECONDS                     = 0x4
-       NOTE_OOB                          = 0x2
-       NOTE_PCTRLMASK                    = -0x100000
-       NOTE_PDATAMASK                    = 0xfffff
-       NOTE_REAP                         = 0x10000000
-       NOTE_RENAME                       = 0x20
-       NOTE_REVOKE                       = 0x40
-       NOTE_SECONDS                      = 0x1
-       NOTE_SIGNAL                       = 0x8000000
-       NOTE_TRACK                        = 0x1
-       NOTE_TRACKERR                     = 0x2
-       NOTE_TRIGGER                      = 0x1000000
-       NOTE_USECONDS                     = 0x2
-       NOTE_VM_ERROR                     = 0x10000000
-       NOTE_VM_PRESSURE                  = 0x80000000
-       NOTE_VM_PRESSURE_SUDDEN_TERMINATE = 0x20000000
-       NOTE_VM_PRESSURE_TERMINATE        = 0x40000000
-       NOTE_WRITE                        = 0x2
-       OCRNL                             = 0x10
-       OFDEL                             = 0x20000
-       OFILL                             = 0x80
-       ONLCR                             = 0x2
-       ONLRET                            = 0x40
-       ONOCR                             = 0x20
-       ONOEOT                            = 0x8
-       OPOST                             = 0x1
-       OXTABS                            = 0x4
-       O_ACCMODE                         = 0x3
-       O_ALERT                           = 0x20000000
-       O_APPEND                          = 0x8
-       O_ASYNC                           = 0x40
-       O_CLOEXEC                         = 0x1000000
-       O_CREAT                           = 0x200
-       O_DIRECTORY                       = 0x100000
-       O_DP_GETRAWENCRYPTED              = 0x1
-       O_DP_GETRAWUNENCRYPTED            = 0x2
-       O_DSYNC                           = 0x400000
-       O_EVTONLY                         = 0x8000
-       O_EXCL                            = 0x800
-       O_EXLOCK                          = 0x20
-       O_FSYNC                           = 0x80
-       O_NDELAY                          = 0x4
-       O_NOCTTY                          = 0x20000
-       O_NOFOLLOW                        = 0x100
-       O_NOFOLLOW_ANY                    = 0x20000000
-       O_NONBLOCK                        = 0x4
-       O_POPUP                           = 0x80000000
-       O_RDONLY                          = 0x0
-       O_RDWR                            = 0x2
-       O_SHLOCK                          = 0x10
-       O_SYMLINK                         = 0x200000
-       O_SYNC                            = 0x80
-       O_TRUNC                           = 0x400
-       O_WRONLY                          = 0x1
-       PARENB                            = 0x1000
-       PARMRK                            = 0x8
-       PARODD                            = 0x2000
-       PENDIN                            = 0x20000000
-       PRIO_PGRP                         = 0x1
-       PRIO_PROCESS                      = 0x0
-       PRIO_USER                         = 0x2
-       PROT_EXEC                         = 0x4
-       PROT_NONE                         = 0x0
-       PROT_READ                         = 0x1
-       PROT_WRITE                        = 0x2
-       PT_ATTACH                         = 0xa
-       PT_ATTACHEXC                      = 0xe
-       PT_CONTINUE                       = 0x7
-       PT_DENY_ATTACH                    = 0x1f
-       PT_DETACH                         = 0xb
-       PT_FIRSTMACH                      = 0x20
-       PT_FORCEQUOTA                     = 0x1e
-       PT_KILL                           = 0x8
-       PT_READ_D                         = 0x2
-       PT_READ_I                         = 0x1
-       PT_READ_U                         = 0x3
-       PT_SIGEXC                         = 0xc
-       PT_STEP                           = 0x9
-       PT_THUPDATE                       = 0xd
-       PT_TRACE_ME                       = 0x0
-       PT_WRITE_D                        = 0x5
-       PT_WRITE_I                        = 0x4
-       PT_WRITE_U                        = 0x6
-       RLIMIT_AS                         = 0x5
-       RLIMIT_CORE                       = 0x4
-       RLIMIT_CPU                        = 0x0
-       RLIMIT_CPU_USAGE_MONITOR          = 0x2
-       RLIMIT_DATA                       = 0x2
-       RLIMIT_FSIZE                      = 0x1
-       RLIMIT_MEMLOCK                    = 0x6
-       RLIMIT_NOFILE                     = 0x8
-       RLIMIT_NPROC                      = 0x7
-       RLIMIT_RSS                        = 0x5
-       RLIMIT_STACK                      = 0x3
-       RLIM_INFINITY                     = 0x7fffffffffffffff
-       RTAX_AUTHOR                       = 0x6
-       RTAX_BRD                          = 0x7
-       RTAX_DST                          = 0x0
-       RTAX_GATEWAY                      = 0x1
-       RTAX_GENMASK                      = 0x3
-       RTAX_IFA                          = 0x5
-       RTAX_IFP                          = 0x4
-       RTAX_MAX                          = 0x8
-       RTAX_NETMASK                      = 0x2
-       RTA_AUTHOR                        = 0x40
-       RTA_BRD                           = 0x80
-       RTA_DST                           = 0x1
-       RTA_GATEWAY                       = 0x2
-       RTA_GENMASK                       = 0x8
-       RTA_IFA                           = 0x20
-       RTA_IFP                           = 0x10
-       RTA_NETMASK                       = 0x4
-       RTF_BLACKHOLE                     = 0x1000
-       RTF_BROADCAST                     = 0x400000
-       RTF_CLONING                       = 0x100
-       RTF_CONDEMNED                     = 0x2000000
-       RTF_DEAD                          = 0x20000000
-       RTF_DELCLONE                      = 0x80
-       RTF_DONE                          = 0x40
-       RTF_DYNAMIC                       = 0x10
-       RTF_GATEWAY                       = 0x2
-       RTF_GLOBAL                        = 0x40000000
-       RTF_HOST                          = 0x4
-       RTF_IFREF                         = 0x4000000
-       RTF_IFSCOPE                       = 0x1000000
-       RTF_LLDATA                        = 0x400
-       RTF_LLINFO                        = 0x400
-       RTF_LOCAL                         = 0x200000
-       RTF_MODIFIED                      = 0x20
-       RTF_MULTICAST                     = 0x800000
-       RTF_NOIFREF                       = 0x2000
-       RTF_PINNED                        = 0x100000
-       RTF_PRCLONING                     = 0x10000
-       RTF_PROTO1                        = 0x8000
-       RTF_PROTO2                        = 0x4000
-       RTF_PROTO3                        = 0x40000
-       RTF_PROXY                         = 0x8000000
-       RTF_REJECT                        = 0x8
-       RTF_ROUTER                        = 0x10000000
-       RTF_STATIC                        = 0x800
-       RTF_UP                            = 0x1
-       RTF_WASCLONED                     = 0x20000
-       RTF_XRESOLVE                      = 0x200
-       RTM_ADD                           = 0x1
-       RTM_CHANGE                        = 0x3
-       RTM_DELADDR                       = 0xd
-       RTM_DELETE                        = 0x2
-       RTM_DELMADDR                      = 0x10
-       RTM_GET                           = 0x4
-       RTM_GET2                          = 0x14
-       RTM_IFINFO                        = 0xe
-       RTM_IFINFO2                       = 0x12
-       RTM_LOCK                          = 0x8
-       RTM_LOSING                        = 0x5
-       RTM_MISS                          = 0x7
-       RTM_NEWADDR                       = 0xc
-       RTM_NEWMADDR                      = 0xf
-       RTM_NEWMADDR2                     = 0x13
-       RTM_OLDADD                        = 0x9
-       RTM_OLDDEL                        = 0xa
-       RTM_REDIRECT                      = 0x6
-       RTM_RESOLVE                       = 0xb
-       RTM_RTTUNIT                       = 0xf4240
-       RTM_VERSION                       = 0x5
-       RTV_EXPIRE                        = 0x4
-       RTV_HOPCOUNT                      = 0x2
-       RTV_MTU                           = 0x1
-       RTV_RPIPE                         = 0x8
-       RTV_RTT                           = 0x40
-       RTV_RTTVAR                        = 0x80
-       RTV_SPIPE                         = 0x10
-       RTV_SSTHRESH                      = 0x20
-       RUSAGE_CHILDREN                   = -0x1
-       RUSAGE_SELF                       = 0x0
-       SCM_CREDS                         = 0x3
-       SCM_RIGHTS                        = 0x1
-       SCM_TIMESTAMP                     = 0x2
-       SCM_TIMESTAMP_MONOTONIC           = 0x4
-       SEEK_CUR                          = 0x1
-       SEEK_DATA                         = 0x4
-       SEEK_END                          = 0x2
-       SEEK_HOLE                         = 0x3
-       SEEK_SET                          = 0x0
-       SHUT_RD                           = 0x0
-       SHUT_RDWR                         = 0x2
-       SHUT_WR                           = 0x1
-       SIOCADDMULTI                      = 0x80206931
-       SIOCAIFADDR                       = 0x8040691a
-       SIOCARPIPLL                       = 0xc0206928
-       SIOCATMARK                        = 0x40047307
-       SIOCAUTOADDR                      = 0xc0206926
-       SIOCAUTONETMASK                   = 0x80206927
-       SIOCDELMULTI                      = 0x80206932
-       SIOCDIFADDR                       = 0x80206919
-       SIOCDIFPHYADDR                    = 0x80206941
-       SIOCGDRVSPEC                      = 0xc028697b
-       SIOCGETVLAN                       = 0xc020697f
-       SIOCGHIWAT                        = 0x40047301
-       SIOCGIF6LOWPAN                    = 0xc02069c5
-       SIOCGIFADDR                       = 0xc0206921
-       SIOCGIFALTMTU                     = 0xc0206948
-       SIOCGIFASYNCMAP                   = 0xc020697c
-       SIOCGIFBOND                       = 0xc0206947
-       SIOCGIFBRDADDR                    = 0xc0206923
-       SIOCGIFCAP                        = 0xc020695b
-       SIOCGIFCONF                       = 0xc00c6924
-       SIOCGIFDEVMTU                     = 0xc0206944
-       SIOCGIFDSTADDR                    = 0xc0206922
-       SIOCGIFFLAGS                      = 0xc0206911
-       SIOCGIFFUNCTIONALTYPE             = 0xc02069ad
-       SIOCGIFGENERIC                    = 0xc020693a
-       SIOCGIFKPI                        = 0xc0206987
-       SIOCGIFMAC                        = 0xc0206982
-       SIOCGIFMEDIA                      = 0xc02c6938
-       SIOCGIFMETRIC                     = 0xc0206917
-       SIOCGIFMTU                        = 0xc0206933
-       SIOCGIFNETMASK                    = 0xc0206925
-       SIOCGIFPDSTADDR                   = 0xc0206940
-       SIOCGIFPHYS                       = 0xc0206935
-       SIOCGIFPSRCADDR                   = 0xc020693f
-       SIOCGIFSTATUS                     = 0xc331693d
-       SIOCGIFVLAN                       = 0xc020697f
-       SIOCGIFWAKEFLAGS                  = 0xc0206988
-       SIOCGIFXMEDIA                     = 0xc02c6948
-       SIOCGLOWAT                        = 0x40047303
-       SIOCGPGRP                         = 0x40047309
-       SIOCIFCREATE                      = 0xc0206978
-       SIOCIFCREATE2                     = 0xc020697a
-       SIOCIFDESTROY                     = 0x80206979
-       SIOCIFGCLONERS                    = 0xc0106981
-       SIOCRSLVMULTI                     = 0xc010693b
-       SIOCSDRVSPEC                      = 0x8028697b
-       SIOCSETVLAN                       = 0x8020697e
-       SIOCSHIWAT                        = 0x80047300
-       SIOCSIF6LOWPAN                    = 0x802069c4
-       SIOCSIFADDR                       = 0x8020690c
-       SIOCSIFALTMTU                     = 0x80206945
-       SIOCSIFASYNCMAP                   = 0x8020697d
-       SIOCSIFBOND                       = 0x80206946
-       SIOCSIFBRDADDR                    = 0x80206913
-       SIOCSIFCAP                        = 0x8020695a
-       SIOCSIFDSTADDR                    = 0x8020690e
-       SIOCSIFFLAGS                      = 0x80206910
-       SIOCSIFGENERIC                    = 0x80206939
-       SIOCSIFKPI                        = 0x80206986
-       SIOCSIFLLADDR                     = 0x8020693c
-       SIOCSIFMAC                        = 0x80206983
-       SIOCSIFMEDIA                      = 0xc0206937
-       SIOCSIFMETRIC                     = 0x80206918
-       SIOCSIFMTU                        = 0x80206934
-       SIOCSIFNETMASK                    = 0x80206916
-       SIOCSIFPHYADDR                    = 0x8040693e
-       SIOCSIFPHYS                       = 0x80206936
-       SIOCSIFVLAN                       = 0x8020697e
-       SIOCSLOWAT                        = 0x80047302
-       SIOCSPGRP                         = 0x80047308
-       SOCK_DGRAM                        = 0x2
-       SOCK_MAXADDRLEN                   = 0xff
-       SOCK_RAW                          = 0x3
-       SOCK_RDM                          = 0x4
-       SOCK_SEQPACKET                    = 0x5
-       SOCK_STREAM                       = 0x1
-       SOL_LOCAL                         = 0x0
-       SOL_SOCKET                        = 0xffff
-       SOMAXCONN                         = 0x80
-       SO_ACCEPTCONN                     = 0x2
-       SO_BROADCAST                      = 0x20
-       SO_DEBUG                          = 0x1
-       SO_DONTROUTE                      = 0x10
-       SO_DONTTRUNC                      = 0x2000
-       SO_ERROR                          = 0x1007
-       SO_KEEPALIVE                      = 0x8
-       SO_LABEL                          = 0x1010
-       SO_LINGER                         = 0x80
-       SO_LINGER_SEC                     = 0x1080
-       SO_NETSVC_MARKING_LEVEL           = 0x1119
-       SO_NET_SERVICE_TYPE               = 0x1116
-       SO_NKE                            = 0x1021
-       SO_NOADDRERR                      = 0x1023
-       SO_NOSIGPIPE                      = 0x1022
-       SO_NOTIFYCONFLICT                 = 0x1026
-       SO_NP_EXTENSIONS                  = 0x1083
-       SO_NREAD                          = 0x1020
-       SO_NUMRCVPKT                      = 0x1112
-       SO_NWRITE                         = 0x1024
-       SO_OOBINLINE                      = 0x100
-       SO_PEERLABEL                      = 0x1011
-       SO_RANDOMPORT                     = 0x1082
-       SO_RCVBUF                         = 0x1002
-       SO_RCVLOWAT                       = 0x1004
-       SO_RCVTIMEO                       = 0x1006
-       SO_REUSEADDR                      = 0x4
-       SO_REUSEPORT                      = 0x200
-       SO_REUSESHAREUID                  = 0x1025
-       SO_SNDBUF                         = 0x1001
-       SO_SNDLOWAT                       = 0x1003
-       SO_SNDTIMEO                       = 0x1005
-       SO_TIMESTAMP                      = 0x400
-       SO_TIMESTAMP_MONOTONIC            = 0x800
-       SO_TYPE                           = 0x1008
-       SO_UPCALLCLOSEWAIT                = 0x1027
-       SO_USELOOPBACK                    = 0x40
-       SO_WANTMORE                       = 0x4000
-       SO_WANTOOBFLAG                    = 0x8000
-       S_IEXEC                           = 0x40
-       S_IFBLK                           = 0x6000
-       S_IFCHR                           = 0x2000
-       S_IFDIR                           = 0x4000
-       S_IFIFO                           = 0x1000
-       S_IFLNK                           = 0xa000
-       S_IFMT                            = 0xf000
-       S_IFREG                           = 0x8000
-       S_IFSOCK                          = 0xc000
-       S_IFWHT                           = 0xe000
-       S_IREAD                           = 0x100
-       S_IRGRP                           = 0x20
-       S_IROTH                           = 0x4
-       S_IRUSR                           = 0x100
-       S_IRWXG                           = 0x38
-       S_IRWXO                           = 0x7
-       S_IRWXU                           = 0x1c0
-       S_ISGID                           = 0x400
-       S_ISTXT                           = 0x200
-       S_ISUID                           = 0x800
-       S_ISVTX                           = 0x200
-       S_IWGRP                           = 0x10
-       S_IWOTH                           = 0x2
-       S_IWRITE                          = 0x80
-       S_IWUSR                           = 0x80
-       S_IXGRP                           = 0x8
-       S_IXOTH                           = 0x1
-       S_IXUSR                           = 0x40
-       TAB0                              = 0x0
-       TAB1                              = 0x400
-       TAB2                              = 0x800
-       TAB3                              = 0x4
-       TABDLY                            = 0xc04
-       TCIFLUSH                          = 0x1
-       TCIOFF                            = 0x3
-       TCIOFLUSH                         = 0x3
-       TCION                             = 0x4
-       TCOFLUSH                          = 0x2
-       TCOOFF                            = 0x1
-       TCOON                             = 0x2
-       TCP_CONNECTIONTIMEOUT             = 0x20
-       TCP_CONNECTION_INFO               = 0x106
-       TCP_ENABLE_ECN                    = 0x104
-       TCP_FASTOPEN                      = 0x105
-       TCP_KEEPALIVE                     = 0x10
-       TCP_KEEPCNT                       = 0x102
-       TCP_KEEPINTVL                     = 0x101
-       TCP_MAXHLEN                       = 0x3c
-       TCP_MAXOLEN                       = 0x28
-       TCP_MAXSEG                        = 0x2
-       TCP_MAXWIN                        = 0xffff
-       TCP_MAX_SACK                      = 0x4
-       TCP_MAX_WINSHIFT                  = 0xe
-       TCP_MINMSS                        = 0xd8
-       TCP_MSS                           = 0x200
-       TCP_NODELAY                       = 0x1
-       TCP_NOOPT                         = 0x8
-       TCP_NOPUSH                        = 0x4
-       TCP_NOTSENT_LOWAT                 = 0x201
-       TCP_RXT_CONNDROPTIME              = 0x80
-       TCP_RXT_FINDROP                   = 0x100
-       TCP_SENDMOREACKS                  = 0x103
-       TCSAFLUSH                         = 0x2
-       TIOCCBRK                          = 0x2000747a
-       TIOCCDTR                          = 0x20007478
-       TIOCCONS                          = 0x80047462
-       TIOCDCDTIMESTAMP                  = 0x40107458
-       TIOCDRAIN                         = 0x2000745e
-       TIOCDSIMICROCODE                  = 0x20007455
-       TIOCEXCL                          = 0x2000740d
-       TIOCEXT                           = 0x80047460
-       TIOCFLUSH                         = 0x80047410
-       TIOCGDRAINWAIT                    = 0x40047456
-       TIOCGETA                          = 0x40487413
-       TIOCGETD                          = 0x4004741a
-       TIOCGPGRP                         = 0x40047477
-       TIOCGWINSZ                        = 0x40087468
-       TIOCIXOFF                         = 0x20007480
-       TIOCIXON                          = 0x20007481
-       TIOCMBIC                          = 0x8004746b
-       TIOCMBIS                          = 0x8004746c
-       TIOCMGDTRWAIT                     = 0x4004745a
-       TIOCMGET                          = 0x4004746a
-       TIOCMODG                          = 0x40047403
-       TIOCMODS                          = 0x80047404
-       TIOCMSDTRWAIT                     = 0x8004745b
-       TIOCMSET                          = 0x8004746d
-       TIOCM_CAR                         = 0x40
-       TIOCM_CD                          = 0x40
-       TIOCM_CTS                         = 0x20
-       TIOCM_DSR                         = 0x100
-       TIOCM_DTR                         = 0x2
-       TIOCM_LE                          = 0x1
-       TIOCM_RI                          = 0x80
-       TIOCM_RNG                         = 0x80
-       TIOCM_RTS                         = 0x4
-       TIOCM_SR                          = 0x10
-       TIOCM_ST                          = 0x8
-       TIOCNOTTY                         = 0x20007471
-       TIOCNXCL                          = 0x2000740e
-       TIOCOUTQ                          = 0x40047473
-       TIOCPKT                           = 0x80047470
-       TIOCPKT_DATA                      = 0x0
-       TIOCPKT_DOSTOP                    = 0x20
-       TIOCPKT_FLUSHREAD                 = 0x1
-       TIOCPKT_FLUSHWRITE                = 0x2
-       TIOCPKT_IOCTL                     = 0x40
-       TIOCPKT_NOSTOP                    = 0x10
-       TIOCPKT_START                     = 0x8
-       TIOCPKT_STOP                      = 0x4
-       TIOCPTYGNAME                      = 0x40807453
-       TIOCPTYGRANT                      = 0x20007454
-       TIOCPTYUNLK                       = 0x20007452
-       TIOCREMOTE                        = 0x80047469
-       TIOCSBRK                          = 0x2000747b
-       TIOCSCONS                         = 0x20007463
-       TIOCSCTTY                         = 0x20007461
-       TIOCSDRAINWAIT                    = 0x80047457
-       TIOCSDTR                          = 0x20007479
-       TIOCSETA                          = 0x80487414
-       TIOCSETAF                         = 0x80487416
-       TIOCSETAW                         = 0x80487415
-       TIOCSETD                          = 0x8004741b
-       TIOCSIG                           = 0x2000745f
-       TIOCSPGRP                         = 0x80047476
-       TIOCSTART                         = 0x2000746e
-       TIOCSTAT                          = 0x20007465
-       TIOCSTI                           = 0x80017472
-       TIOCSTOP                          = 0x2000746f
-       TIOCSWINSZ                        = 0x80087467
-       TIOCTIMESTAMP                     = 0x40107459
-       TIOCUCNTL                         = 0x80047466
-       TOSTOP                            = 0x400000
-       VDISCARD                          = 0xf
-       VDSUSP                            = 0xb
-       VEOF                              = 0x0
-       VEOL                              = 0x1
-       VEOL2                             = 0x2
-       VERASE                            = 0x3
-       VINTR                             = 0x8
-       VKILL                             = 0x5
-       VLNEXT                            = 0xe
-       VMIN                              = 0x10
-       VM_LOADAVG                        = 0x2
-       VM_MACHFACTOR                     = 0x4
-       VM_MAXID                          = 0x6
-       VM_METER                          = 0x1
-       VM_SWAPUSAGE                      = 0x5
-       VQUIT                             = 0x9
-       VREPRINT                          = 0x6
-       VSTART                            = 0xc
-       VSTATUS                           = 0x12
-       VSTOP                             = 0xd
-       VSUSP                             = 0xa
-       VT0                               = 0x0
-       VT1                               = 0x10000
-       VTDLY                             = 0x10000
-       VTIME                             = 0x11
-       VWERASE                           = 0x4
-       WCONTINUED                        = 0x10
-       WCOREFLAG                         = 0x80
-       WEXITED                           = 0x4
-       WNOHANG                           = 0x1
-       WNOWAIT                           = 0x20
-       WORDSIZE                          = 0x40
-       WSTOPPED                          = 0x8
-       WUNTRACED                         = 0x2
-       XATTR_CREATE                      = 0x2
-       XATTR_NODEFAULT                   = 0x10
-       XATTR_NOFOLLOW                    = 0x1
-       XATTR_NOSECURITY                  = 0x8
-       XATTR_REPLACE                     = 0x4
-       XATTR_SHOWCOMPRESSION             = 0x20
+       AF_APPLETALK                            = 0x10
+       AF_CCITT                                = 0xa
+       AF_CHAOS                                = 0x5
+       AF_CNT                                  = 0x15
+       AF_COIP                                 = 0x14
+       AF_DATAKIT                              = 0x9
+       AF_DECnet                               = 0xc
+       AF_DLI                                  = 0xd
+       AF_E164                                 = 0x1c
+       AF_ECMA                                 = 0x8
+       AF_HYLINK                               = 0xf
+       AF_IEEE80211                            = 0x25
+       AF_IMPLINK                              = 0x3
+       AF_INET                                 = 0x2
+       AF_INET6                                = 0x1e
+       AF_IPX                                  = 0x17
+       AF_ISDN                                 = 0x1c
+       AF_ISO                                  = 0x7
+       AF_LAT                                  = 0xe
+       AF_LINK                                 = 0x12
+       AF_LOCAL                                = 0x1
+       AF_MAX                                  = 0x29
+       AF_NATM                                 = 0x1f
+       AF_NDRV                                 = 0x1b
+       AF_NETBIOS                              = 0x21
+       AF_NS                                   = 0x6
+       AF_OSI                                  = 0x7
+       AF_PPP                                  = 0x22
+       AF_PUP                                  = 0x4
+       AF_RESERVED_36                          = 0x24
+       AF_ROUTE                                = 0x11
+       AF_SIP                                  = 0x18
+       AF_SNA                                  = 0xb
+       AF_SYSTEM                               = 0x20
+       AF_SYS_CONTROL                          = 0x2
+       AF_UNIX                                 = 0x1
+       AF_UNSPEC                               = 0x0
+       AF_UTUN                                 = 0x26
+       AF_VSOCK                                = 0x28
+       ALTWERASE                               = 0x200
+       ATTR_BIT_MAP_COUNT                      = 0x5
+       ATTR_CMN_ACCESSMASK                     = 0x20000
+       ATTR_CMN_ACCTIME                        = 0x1000
+       ATTR_CMN_ADDEDTIME                      = 0x10000000
+       ATTR_CMN_BKUPTIME                       = 0x2000
+       ATTR_CMN_CHGTIME                        = 0x800
+       ATTR_CMN_CRTIME                         = 0x200
+       ATTR_CMN_DATA_PROTECT_FLAGS             = 0x40000000
+       ATTR_CMN_DEVID                          = 0x2
+       ATTR_CMN_DOCUMENT_ID                    = 0x100000
+       ATTR_CMN_ERROR                          = 0x20000000
+       ATTR_CMN_EXTENDED_SECURITY              = 0x400000
+       ATTR_CMN_FILEID                         = 0x2000000
+       ATTR_CMN_FLAGS                          = 0x40000
+       ATTR_CMN_FNDRINFO                       = 0x4000
+       ATTR_CMN_FSID                           = 0x4
+       ATTR_CMN_FULLPATH                       = 0x8000000
+       ATTR_CMN_GEN_COUNT                      = 0x80000
+       ATTR_CMN_GRPID                          = 0x10000
+       ATTR_CMN_GRPUUID                        = 0x1000000
+       ATTR_CMN_MODTIME                        = 0x400
+       ATTR_CMN_NAME                           = 0x1
+       ATTR_CMN_NAMEDATTRCOUNT                 = 0x80000
+       ATTR_CMN_NAMEDATTRLIST                  = 0x100000
+       ATTR_CMN_OBJID                          = 0x20
+       ATTR_CMN_OBJPERMANENTID                 = 0x40
+       ATTR_CMN_OBJTAG                         = 0x10
+       ATTR_CMN_OBJTYPE                        = 0x8
+       ATTR_CMN_OWNERID                        = 0x8000
+       ATTR_CMN_PARENTID                       = 0x4000000
+       ATTR_CMN_PAROBJID                       = 0x80
+       ATTR_CMN_RETURNED_ATTRS                 = 0x80000000
+       ATTR_CMN_SCRIPT                         = 0x100
+       ATTR_CMN_SETMASK                        = 0x51c7ff00
+       ATTR_CMN_USERACCESS                     = 0x200000
+       ATTR_CMN_UUID                           = 0x800000
+       ATTR_CMN_VALIDMASK                      = 0xffffffff
+       ATTR_CMN_VOLSETMASK                     = 0x6700
+       ATTR_FILE_ALLOCSIZE                     = 0x4
+       ATTR_FILE_CLUMPSIZE                     = 0x10
+       ATTR_FILE_DATAALLOCSIZE                 = 0x400
+       ATTR_FILE_DATAEXTENTS                   = 0x800
+       ATTR_FILE_DATALENGTH                    = 0x200
+       ATTR_FILE_DEVTYPE                       = 0x20
+       ATTR_FILE_FILETYPE                      = 0x40
+       ATTR_FILE_FORKCOUNT                     = 0x80
+       ATTR_FILE_FORKLIST                      = 0x100
+       ATTR_FILE_IOBLOCKSIZE                   = 0x8
+       ATTR_FILE_LINKCOUNT                     = 0x1
+       ATTR_FILE_RSRCALLOCSIZE                 = 0x2000
+       ATTR_FILE_RSRCEXTENTS                   = 0x4000
+       ATTR_FILE_RSRCLENGTH                    = 0x1000
+       ATTR_FILE_SETMASK                       = 0x20
+       ATTR_FILE_TOTALSIZE                     = 0x2
+       ATTR_FILE_VALIDMASK                     = 0x37ff
+       ATTR_VOL_ALLOCATIONCLUMP                = 0x40
+       ATTR_VOL_ATTRIBUTES                     = 0x40000000
+       ATTR_VOL_CAPABILITIES                   = 0x20000
+       ATTR_VOL_DIRCOUNT                       = 0x400
+       ATTR_VOL_ENCODINGSUSED                  = 0x10000
+       ATTR_VOL_FILECOUNT                      = 0x200
+       ATTR_VOL_FSTYPE                         = 0x1
+       ATTR_VOL_INFO                           = 0x80000000
+       ATTR_VOL_IOBLOCKSIZE                    = 0x80
+       ATTR_VOL_MAXOBJCOUNT                    = 0x800
+       ATTR_VOL_MINALLOCATION                  = 0x20
+       ATTR_VOL_MOUNTEDDEVICE                  = 0x8000
+       ATTR_VOL_MOUNTFLAGS                     = 0x4000
+       ATTR_VOL_MOUNTPOINT                     = 0x1000
+       ATTR_VOL_NAME                           = 0x2000
+       ATTR_VOL_OBJCOUNT                       = 0x100
+       ATTR_VOL_QUOTA_SIZE                     = 0x10000000
+       ATTR_VOL_RESERVED_SIZE                  = 0x20000000
+       ATTR_VOL_SETMASK                        = 0x80002000
+       ATTR_VOL_SIGNATURE                      = 0x2
+       ATTR_VOL_SIZE                           = 0x4
+       ATTR_VOL_SPACEAVAIL                     = 0x10
+       ATTR_VOL_SPACEFREE                      = 0x8
+       ATTR_VOL_SPACEUSED                      = 0x800000
+       ATTR_VOL_UUID                           = 0x40000
+       ATTR_VOL_VALIDMASK                      = 0xf087ffff
+       B0                                      = 0x0
+       B110                                    = 0x6e
+       B115200                                 = 0x1c200
+       B1200                                   = 0x4b0
+       B134                                    = 0x86
+       B14400                                  = 0x3840
+       B150                                    = 0x96
+       B1800                                   = 0x708
+       B19200                                  = 0x4b00
+       B200                                    = 0xc8
+       B230400                                 = 0x38400
+       B2400                                   = 0x960
+       B28800                                  = 0x7080
+       B300                                    = 0x12c
+       B38400                                  = 0x9600
+       B4800                                   = 0x12c0
+       B50                                     = 0x32
+       B57600                                  = 0xe100
+       B600                                    = 0x258
+       B7200                                   = 0x1c20
+       B75                                     = 0x4b
+       B76800                                  = 0x12c00
+       B9600                                   = 0x2580
+       BIOCFLUSH                               = 0x20004268
+       BIOCGBLEN                               = 0x40044266
+       BIOCGDLT                                = 0x4004426a
+       BIOCGDLTLIST                            = 0xc00c4279
+       BIOCGETIF                               = 0x4020426b
+       BIOCGHDRCMPLT                           = 0x40044274
+       BIOCGRSIG                               = 0x40044272
+       BIOCGRTIMEOUT                           = 0x4010426e
+       BIOCGSEESENT                            = 0x40044276
+       BIOCGSTATS                              = 0x4008426f
+       BIOCIMMEDIATE                           = 0x80044270
+       BIOCPROMISC                             = 0x20004269
+       BIOCSBLEN                               = 0xc0044266
+       BIOCSDLT                                = 0x80044278
+       BIOCSETF                                = 0x80104267
+       BIOCSETFNR                              = 0x8010427e
+       BIOCSETIF                               = 0x8020426c
+       BIOCSHDRCMPLT                           = 0x80044275
+       BIOCSRSIG                               = 0x80044273
+       BIOCSRTIMEOUT                           = 0x8010426d
+       BIOCSSEESENT                            = 0x80044277
+       BIOCVERSION                             = 0x40044271
+       BPF_A                                   = 0x10
+       BPF_ABS                                 = 0x20
+       BPF_ADD                                 = 0x0
+       BPF_ALIGNMENT                           = 0x4
+       BPF_ALU                                 = 0x4
+       BPF_AND                                 = 0x50
+       BPF_B                                   = 0x10
+       BPF_DIV                                 = 0x30
+       BPF_H                                   = 0x8
+       BPF_IMM                                 = 0x0
+       BPF_IND                                 = 0x40
+       BPF_JA                                  = 0x0
+       BPF_JEQ                                 = 0x10
+       BPF_JGE                                 = 0x30
+       BPF_JGT                                 = 0x20
+       BPF_JMP                                 = 0x5
+       BPF_JSET                                = 0x40
+       BPF_K                                   = 0x0
+       BPF_LD                                  = 0x0
+       BPF_LDX                                 = 0x1
+       BPF_LEN                                 = 0x80
+       BPF_LSH                                 = 0x60
+       BPF_MAJOR_VERSION                       = 0x1
+       BPF_MAXBUFSIZE                          = 0x80000
+       BPF_MAXINSNS                            = 0x200
+       BPF_MEM                                 = 0x60
+       BPF_MEMWORDS                            = 0x10
+       BPF_MINBUFSIZE                          = 0x20
+       BPF_MINOR_VERSION                       = 0x1
+       BPF_MISC                                = 0x7
+       BPF_MSH                                 = 0xa0
+       BPF_MUL                                 = 0x20
+       BPF_NEG                                 = 0x80
+       BPF_OR                                  = 0x40
+       BPF_RELEASE                             = 0x30bb6
+       BPF_RET                                 = 0x6
+       BPF_RSH                                 = 0x70
+       BPF_ST                                  = 0x2
+       BPF_STX                                 = 0x3
+       BPF_SUB                                 = 0x10
+       BPF_TAX                                 = 0x0
+       BPF_TXA                                 = 0x80
+       BPF_W                                   = 0x0
+       BPF_X                                   = 0x8
+       BRKINT                                  = 0x2
+       BS0                                     = 0x0
+       BS1                                     = 0x8000
+       BSDLY                                   = 0x8000
+       CFLUSH                                  = 0xf
+       CLOCAL                                  = 0x8000
+       CLOCK_MONOTONIC                         = 0x6
+       CLOCK_MONOTONIC_RAW                     = 0x4
+       CLOCK_MONOTONIC_RAW_APPROX              = 0x5
+       CLOCK_PROCESS_CPUTIME_ID                = 0xc
+       CLOCK_REALTIME                          = 0x0
+       CLOCK_THREAD_CPUTIME_ID                 = 0x10
+       CLOCK_UPTIME_RAW                        = 0x8
+       CLOCK_UPTIME_RAW_APPROX                 = 0x9
+       CLONE_NOFOLLOW                          = 0x1
+       CLONE_NOOWNERCOPY                       = 0x2
+       CR0                                     = 0x0
+       CR1                                     = 0x1000
+       CR2                                     = 0x2000
+       CR3                                     = 0x3000
+       CRDLY                                   = 0x3000
+       CREAD                                   = 0x800
+       CRTSCTS                                 = 0x30000
+       CS5                                     = 0x0
+       CS6                                     = 0x100
+       CS7                                     = 0x200
+       CS8                                     = 0x300
+       CSIZE                                   = 0x300
+       CSTART                                  = 0x11
+       CSTATUS                                 = 0x14
+       CSTOP                                   = 0x13
+       CSTOPB                                  = 0x400
+       CSUSP                                   = 0x1a
+       CTLIOCGINFO                             = 0xc0644e03
+       CTL_HW                                  = 0x6
+       CTL_KERN                                = 0x1
+       CTL_MAXNAME                             = 0xc
+       CTL_NET                                 = 0x4
+       DLT_A429                                = 0xb8
+       DLT_A653_ICM                            = 0xb9
+       DLT_AIRONET_HEADER                      = 0x78
+       DLT_AOS                                 = 0xde
+       DLT_APPLE_IP_OVER_IEEE1394              = 0x8a
+       DLT_ARCNET                              = 0x7
+       DLT_ARCNET_LINUX                        = 0x81
+       DLT_ATM_CLIP                            = 0x13
+       DLT_ATM_RFC1483                         = 0xb
+       DLT_AURORA                              = 0x7e
+       DLT_AX25                                = 0x3
+       DLT_AX25_KISS                           = 0xca
+       DLT_BACNET_MS_TP                        = 0xa5
+       DLT_BLUETOOTH_HCI_H4                    = 0xbb
+       DLT_BLUETOOTH_HCI_H4_WITH_PHDR          = 0xc9
+       DLT_CAN20B                              = 0xbe
+       DLT_CAN_SOCKETCAN                       = 0xe3
+       DLT_CHAOS                               = 0x5
+       DLT_CHDLC                               = 0x68
+       DLT_CISCO_IOS                           = 0x76
+       DLT_C_HDLC                              = 0x68
+       DLT_C_HDLC_WITH_DIR                     = 0xcd
+       DLT_DBUS                                = 0xe7
+       DLT_DECT                                = 0xdd
+       DLT_DOCSIS                              = 0x8f
+       DLT_DVB_CI                              = 0xeb
+       DLT_ECONET                              = 0x73
+       DLT_EN10MB                              = 0x1
+       DLT_EN3MB                               = 0x2
+       DLT_ENC                                 = 0x6d
+       DLT_ERF                                 = 0xc5
+       DLT_ERF_ETH                             = 0xaf
+       DLT_ERF_POS                             = 0xb0
+       DLT_FC_2                                = 0xe0
+       DLT_FC_2_WITH_FRAME_DELIMS              = 0xe1
+       DLT_FDDI                                = 0xa
+       DLT_FLEXRAY                             = 0xd2
+       DLT_FRELAY                              = 0x6b
+       DLT_FRELAY_WITH_DIR                     = 0xce
+       DLT_GCOM_SERIAL                         = 0xad
+       DLT_GCOM_T1E1                           = 0xac
+       DLT_GPF_F                               = 0xab
+       DLT_GPF_T                               = 0xaa
+       DLT_GPRS_LLC                            = 0xa9
+       DLT_GSMTAP_ABIS                         = 0xda
+       DLT_GSMTAP_UM                           = 0xd9
+       DLT_HHDLC                               = 0x79
+       DLT_IBM_SN                              = 0x92
+       DLT_IBM_SP                              = 0x91
+       DLT_IEEE802                             = 0x6
+       DLT_IEEE802_11                          = 0x69
+       DLT_IEEE802_11_RADIO                    = 0x7f
+       DLT_IEEE802_11_RADIO_AVS                = 0xa3
+       DLT_IEEE802_15_4                        = 0xc3
+       DLT_IEEE802_15_4_LINUX                  = 0xbf
+       DLT_IEEE802_15_4_NOFCS                  = 0xe6
+       DLT_IEEE802_15_4_NONASK_PHY             = 0xd7
+       DLT_IEEE802_16_MAC_CPS                  = 0xbc
+       DLT_IEEE802_16_MAC_CPS_RADIO            = 0xc1
+       DLT_IPFILTER                            = 0x74
+       DLT_IPMB                                = 0xc7
+       DLT_IPMB_LINUX                          = 0xd1
+       DLT_IPNET                               = 0xe2
+       DLT_IPOIB                               = 0xf2
+       DLT_IPV4                                = 0xe4
+       DLT_IPV6                                = 0xe5
+       DLT_IP_OVER_FC                          = 0x7a
+       DLT_JUNIPER_ATM1                        = 0x89
+       DLT_JUNIPER_ATM2                        = 0x87
+       DLT_JUNIPER_ATM_CEMIC                   = 0xee
+       DLT_JUNIPER_CHDLC                       = 0xb5
+       DLT_JUNIPER_ES                          = 0x84
+       DLT_JUNIPER_ETHER                       = 0xb2
+       DLT_JUNIPER_FIBRECHANNEL                = 0xea
+       DLT_JUNIPER_FRELAY                      = 0xb4
+       DLT_JUNIPER_GGSN                        = 0x85
+       DLT_JUNIPER_ISM                         = 0xc2
+       DLT_JUNIPER_MFR                         = 0x86
+       DLT_JUNIPER_MLFR                        = 0x83
+       DLT_JUNIPER_MLPPP                       = 0x82
+       DLT_JUNIPER_MONITOR                     = 0xa4
+       DLT_JUNIPER_PIC_PEER                    = 0xae
+       DLT_JUNIPER_PPP                         = 0xb3
+       DLT_JUNIPER_PPPOE                       = 0xa7
+       DLT_JUNIPER_PPPOE_ATM                   = 0xa8
+       DLT_JUNIPER_SERVICES                    = 0x88
+       DLT_JUNIPER_SRX_E2E                     = 0xe9
+       DLT_JUNIPER_ST                          = 0xc8
+       DLT_JUNIPER_VP                          = 0xb7
+       DLT_JUNIPER_VS                          = 0xe8
+       DLT_LAPB_WITH_DIR                       = 0xcf
+       DLT_LAPD                                = 0xcb
+       DLT_LIN                                 = 0xd4
+       DLT_LINUX_EVDEV                         = 0xd8
+       DLT_LINUX_IRDA                          = 0x90
+       DLT_LINUX_LAPD                          = 0xb1
+       DLT_LINUX_PPP_WITHDIRECTION             = 0xa6
+       DLT_LINUX_SLL                           = 0x71
+       DLT_LOOP                                = 0x6c
+       DLT_LTALK                               = 0x72
+       DLT_MATCHING_MAX                        = 0x10a
+       DLT_MATCHING_MIN                        = 0x68
+       DLT_MFR                                 = 0xb6
+       DLT_MOST                                = 0xd3
+       DLT_MPEG_2_TS                           = 0xf3
+       DLT_MPLS                                = 0xdb
+       DLT_MTP2                                = 0x8c
+       DLT_MTP2_WITH_PHDR                      = 0x8b
+       DLT_MTP3                                = 0x8d
+       DLT_MUX27010                            = 0xec
+       DLT_NETANALYZER                         = 0xf0
+       DLT_NETANALYZER_TRANSPARENT             = 0xf1
+       DLT_NFC_LLCP                            = 0xf5
+       DLT_NFLOG                               = 0xef
+       DLT_NG40                                = 0xf4
+       DLT_NULL                                = 0x0
+       DLT_PCI_EXP                             = 0x7d
+       DLT_PFLOG                               = 0x75
+       DLT_PFSYNC                              = 0x12
+       DLT_PPI                                 = 0xc0
+       DLT_PPP                                 = 0x9
+       DLT_PPP_BSDOS                           = 0x10
+       DLT_PPP_ETHER                           = 0x33
+       DLT_PPP_PPPD                            = 0xa6
+       DLT_PPP_SERIAL                          = 0x32
+       DLT_PPP_WITH_DIR                        = 0xcc
+       DLT_PPP_WITH_DIRECTION                  = 0xa6
+       DLT_PRISM_HEADER                        = 0x77
+       DLT_PRONET                              = 0x4
+       DLT_RAIF1                               = 0xc6
+       DLT_RAW                                 = 0xc
+       DLT_RIO                                 = 0x7c
+       DLT_SCCP                                = 0x8e
+       DLT_SITA                                = 0xc4
+       DLT_SLIP                                = 0x8
+       DLT_SLIP_BSDOS                          = 0xf
+       DLT_STANAG_5066_D_PDU                   = 0xed
+       DLT_SUNATM                              = 0x7b
+       DLT_SYMANTEC_FIREWALL                   = 0x63
+       DLT_TZSP                                = 0x80
+       DLT_USB                                 = 0xba
+       DLT_USB_DARWIN                          = 0x10a
+       DLT_USB_LINUX                           = 0xbd
+       DLT_USB_LINUX_MMAPPED                   = 0xdc
+       DLT_USER0                               = 0x93
+       DLT_USER1                               = 0x94
+       DLT_USER10                              = 0x9d
+       DLT_USER11                              = 0x9e
+       DLT_USER12                              = 0x9f
+       DLT_USER13                              = 0xa0
+       DLT_USER14                              = 0xa1
+       DLT_USER15                              = 0xa2
+       DLT_USER2                               = 0x95
+       DLT_USER3                               = 0x96
+       DLT_USER4                               = 0x97
+       DLT_USER5                               = 0x98
+       DLT_USER6                               = 0x99
+       DLT_USER7                               = 0x9a
+       DLT_USER8                               = 0x9b
+       DLT_USER9                               = 0x9c
+       DLT_WIHART                              = 0xdf
+       DLT_X2E_SERIAL                          = 0xd5
+       DLT_X2E_XORAYA                          = 0xd6
+       DT_BLK                                  = 0x6
+       DT_CHR                                  = 0x2
+       DT_DIR                                  = 0x4
+       DT_FIFO                                 = 0x1
+       DT_LNK                                  = 0xa
+       DT_REG                                  = 0x8
+       DT_SOCK                                 = 0xc
+       DT_UNKNOWN                              = 0x0
+       DT_WHT                                  = 0xe
+       ECHO                                    = 0x8
+       ECHOCTL                                 = 0x40
+       ECHOE                                   = 0x2
+       ECHOK                                   = 0x4
+       ECHOKE                                  = 0x1
+       ECHONL                                  = 0x10
+       ECHOPRT                                 = 0x20
+       EVFILT_AIO                              = -0x3
+       EVFILT_EXCEPT                           = -0xf
+       EVFILT_FS                               = -0x9
+       EVFILT_MACHPORT                         = -0x8
+       EVFILT_PROC                             = -0x5
+       EVFILT_READ                             = -0x1
+       EVFILT_SIGNAL                           = -0x6
+       EVFILT_SYSCOUNT                         = 0x11
+       EVFILT_THREADMARKER                     = 0x11
+       EVFILT_TIMER                            = -0x7
+       EVFILT_USER                             = -0xa
+       EVFILT_VM                               = -0xc
+       EVFILT_VNODE                            = -0x4
+       EVFILT_WRITE                            = -0x2
+       EV_ADD                                  = 0x1
+       EV_CLEAR                                = 0x20
+       EV_DELETE                               = 0x2
+       EV_DISABLE                              = 0x8
+       EV_DISPATCH                             = 0x80
+       EV_DISPATCH2                            = 0x180
+       EV_ENABLE                               = 0x4
+       EV_EOF                                  = 0x8000
+       EV_ERROR                                = 0x4000
+       EV_FLAG0                                = 0x1000
+       EV_FLAG1                                = 0x2000
+       EV_ONESHOT                              = 0x10
+       EV_OOBAND                               = 0x2000
+       EV_POLL                                 = 0x1000
+       EV_RECEIPT                              = 0x40
+       EV_SYSFLAGS                             = 0xf000
+       EV_UDATA_SPECIFIC                       = 0x100
+       EV_VANISHED                             = 0x200
+       EXTA                                    = 0x4b00
+       EXTB                                    = 0x9600
+       EXTPROC                                 = 0x800
+       FD_CLOEXEC                              = 0x1
+       FD_SETSIZE                              = 0x400
+       FF0                                     = 0x0
+       FF1                                     = 0x4000
+       FFDLY                                   = 0x4000
+       FLUSHO                                  = 0x800000
+       FSOPT_ATTR_CMN_EXTENDED                 = 0x20
+       FSOPT_NOFOLLOW                          = 0x1
+       FSOPT_NOINMEMUPDATE                     = 0x2
+       FSOPT_PACK_INVAL_ATTRS                  = 0x8
+       FSOPT_REPORT_FULLSIZE                   = 0x4
+       FSOPT_RETURN_REALDEV                    = 0x200
+       F_ADDFILESIGS                           = 0x3d
+       F_ADDFILESIGS_FOR_DYLD_SIM              = 0x53
+       F_ADDFILESIGS_INFO                      = 0x67
+       F_ADDFILESIGS_RETURN                    = 0x61
+       F_ADDFILESUPPL                          = 0x68
+       F_ADDSIGS                               = 0x3b
+       F_ALLOCATEALL                           = 0x4
+       F_ALLOCATECONTIG                        = 0x2
+       F_BARRIERFSYNC                          = 0x55
+       F_CHECK_LV                              = 0x62
+       F_CHKCLEAN                              = 0x29
+       F_DUPFD                                 = 0x0
+       F_DUPFD_CLOEXEC                         = 0x43
+       F_FINDSIGS                              = 0x4e
+       F_FLUSH_DATA                            = 0x28
+       F_FREEZE_FS                             = 0x35
+       F_FULLFSYNC                             = 0x33
+       F_GETCODEDIR                            = 0x48
+       F_GETFD                                 = 0x1
+       F_GETFL                                 = 0x3
+       F_GETLK                                 = 0x7
+       F_GETLKPID                              = 0x42
+       F_GETNOSIGPIPE                          = 0x4a
+       F_GETOWN                                = 0x5
+       F_GETPATH                               = 0x32
+       F_GETPATH_MTMINFO                       = 0x47
+       F_GETPATH_NOFIRMLINK                    = 0x66
+       F_GETPROTECTIONCLASS                    = 0x3f
+       F_GETPROTECTIONLEVEL                    = 0x4d
+       F_GETSIGSINFO                           = 0x69
+       F_GLOBAL_NOCACHE                        = 0x37
+       F_LOG2PHYS                              = 0x31
+       F_LOG2PHYS_EXT                          = 0x41
+       F_NOCACHE                               = 0x30
+       F_NODIRECT                              = 0x3e
+       F_OK                                    = 0x0
+       F_PATHPKG_CHECK                         = 0x34
+       F_PEOFPOSMODE                           = 0x3
+       F_PREALLOCATE                           = 0x2a
+       F_PUNCHHOLE                             = 0x63
+       F_RDADVISE                              = 0x2c
+       F_RDAHEAD                               = 0x2d
+       F_RDLCK                                 = 0x1
+       F_SETBACKINGSTORE                       = 0x46
+       F_SETFD                                 = 0x2
+       F_SETFL                                 = 0x4
+       F_SETLK                                 = 0x8
+       F_SETLKW                                = 0x9
+       F_SETLKWTIMEOUT                         = 0xa
+       F_SETNOSIGPIPE                          = 0x49
+       F_SETOWN                                = 0x6
+       F_SETPROTECTIONCLASS                    = 0x40
+       F_SETSIZE                               = 0x2b
+       F_SINGLE_WRITER                         = 0x4c
+       F_SPECULATIVE_READ                      = 0x65
+       F_THAW_FS                               = 0x36
+       F_TRANSCODEKEY                          = 0x4b
+       F_TRIM_ACTIVE_FILE                      = 0x64
+       F_UNLCK                                 = 0x2
+       F_VOLPOSMODE                            = 0x4
+       F_WRLCK                                 = 0x3
+       HUPCL                                   = 0x4000
+       HW_MACHINE                              = 0x1
+       ICANON                                  = 0x100
+       ICMP6_FILTER                            = 0x12
+       ICRNL                                   = 0x100
+       IEXTEN                                  = 0x400
+       IFF_ALLMULTI                            = 0x200
+       IFF_ALTPHYS                             = 0x4000
+       IFF_BROADCAST                           = 0x2
+       IFF_DEBUG                               = 0x4
+       IFF_LINK0                               = 0x1000
+       IFF_LINK1                               = 0x2000
+       IFF_LINK2                               = 0x4000
+       IFF_LOOPBACK                            = 0x8
+       IFF_MULTICAST                           = 0x8000
+       IFF_NOARP                               = 0x80
+       IFF_NOTRAILERS                          = 0x20
+       IFF_OACTIVE                             = 0x400
+       IFF_POINTOPOINT                         = 0x10
+       IFF_PROMISC                             = 0x100
+       IFF_RUNNING                             = 0x40
+       IFF_SIMPLEX                             = 0x800
+       IFF_UP                                  = 0x1
+       IFNAMSIZ                                = 0x10
+       IFT_1822                                = 0x2
+       IFT_6LOWPAN                             = 0x40
+       IFT_AAL5                                = 0x31
+       IFT_ARCNET                              = 0x23
+       IFT_ARCNETPLUS                          = 0x24
+       IFT_ATM                                 = 0x25
+       IFT_BRIDGE                              = 0xd1
+       IFT_CARP                                = 0xf8
+       IFT_CELLULAR                            = 0xff
+       IFT_CEPT                                = 0x13
+       IFT_DS3                                 = 0x1e
+       IFT_ENC                                 = 0xf4
+       IFT_EON                                 = 0x19
+       IFT_ETHER                               = 0x6
+       IFT_FAITH                               = 0x38
+       IFT_FDDI                                = 0xf
+       IFT_FRELAY                              = 0x20
+       IFT_FRELAYDCE                           = 0x2c
+       IFT_GIF                                 = 0x37
+       IFT_HDH1822                             = 0x3
+       IFT_HIPPI                               = 0x2f
+       IFT_HSSI                                = 0x2e
+       IFT_HY                                  = 0xe
+       IFT_IEEE1394                            = 0x90
+       IFT_IEEE8023ADLAG                       = 0x88
+       IFT_ISDNBASIC                           = 0x14
+       IFT_ISDNPRIMARY                         = 0x15
+       IFT_ISO88022LLC                         = 0x29
+       IFT_ISO88023                            = 0x7
+       IFT_ISO88024                            = 0x8
+       IFT_ISO88025                            = 0x9
+       IFT_ISO88026                            = 0xa
+       IFT_L2VLAN                              = 0x87
+       IFT_LAPB                                = 0x10
+       IFT_LOCALTALK                           = 0x2a
+       IFT_LOOP                                = 0x18
+       IFT_MIOX25                              = 0x26
+       IFT_MODEM                               = 0x30
+       IFT_NSIP                                = 0x1b
+       IFT_OTHER                               = 0x1
+       IFT_P10                                 = 0xc
+       IFT_P80                                 = 0xd
+       IFT_PARA                                = 0x22
+       IFT_PDP                                 = 0xff
+       IFT_PFLOG                               = 0xf5
+       IFT_PFSYNC                              = 0xf6
+       IFT_PKTAP                               = 0xfe
+       IFT_PPP                                 = 0x17
+       IFT_PROPMUX                             = 0x36
+       IFT_PROPVIRTUAL                         = 0x35
+       IFT_PTPSERIAL                           = 0x16
+       IFT_RS232                               = 0x21
+       IFT_SDLC                                = 0x11
+       IFT_SIP                                 = 0x1f
+       IFT_SLIP                                = 0x1c
+       IFT_SMDSDXI                             = 0x2b
+       IFT_SMDSICIP                            = 0x34
+       IFT_SONET                               = 0x27
+       IFT_SONETPATH                           = 0x32
+       IFT_SONETVT                             = 0x33
+       IFT_STARLAN                             = 0xb
+       IFT_STF                                 = 0x39
+       IFT_T1                                  = 0x12
+       IFT_ULTRA                               = 0x1d
+       IFT_V35                                 = 0x2d
+       IFT_X25                                 = 0x5
+       IFT_X25DDN                              = 0x4
+       IFT_X25PLE                              = 0x28
+       IFT_XETHER                              = 0x1a
+       IGNBRK                                  = 0x1
+       IGNCR                                   = 0x80
+       IGNPAR                                  = 0x4
+       IMAXBEL                                 = 0x2000
+       INLCR                                   = 0x40
+       INPCK                                   = 0x10
+       IN_CLASSA_HOST                          = 0xffffff
+       IN_CLASSA_MAX                           = 0x80
+       IN_CLASSA_NET                           = 0xff000000
+       IN_CLASSA_NSHIFT                        = 0x18
+       IN_CLASSB_HOST                          = 0xffff
+       IN_CLASSB_MAX                           = 0x10000
+       IN_CLASSB_NET                           = 0xffff0000
+       IN_CLASSB_NSHIFT                        = 0x10
+       IN_CLASSC_HOST                          = 0xff
+       IN_CLASSC_NET                           = 0xffffff00
+       IN_CLASSC_NSHIFT                        = 0x8
+       IN_CLASSD_HOST                          = 0xfffffff
+       IN_CLASSD_NET                           = 0xf0000000
+       IN_CLASSD_NSHIFT                        = 0x1c
+       IN_LINKLOCALNETNUM                      = 0xa9fe0000
+       IN_LOOPBACKNET                          = 0x7f
+       IOCTL_VM_SOCKETS_GET_LOCAL_CID          = 0x400473d1
+       IPPROTO_3PC                             = 0x22
+       IPPROTO_ADFS                            = 0x44
+       IPPROTO_AH                              = 0x33
+       IPPROTO_AHIP                            = 0x3d
+       IPPROTO_APES                            = 0x63
+       IPPROTO_ARGUS                           = 0xd
+       IPPROTO_AX25                            = 0x5d
+       IPPROTO_BHA                             = 0x31
+       IPPROTO_BLT                             = 0x1e
+       IPPROTO_BRSATMON                        = 0x4c
+       IPPROTO_CFTP                            = 0x3e
+       IPPROTO_CHAOS                           = 0x10
+       IPPROTO_CMTP                            = 0x26
+       IPPROTO_CPHB                            = 0x49
+       IPPROTO_CPNX                            = 0x48
+       IPPROTO_DDP                             = 0x25
+       IPPROTO_DGP                             = 0x56
+       IPPROTO_DIVERT                          = 0xfe
+       IPPROTO_DONE                            = 0x101
+       IPPROTO_DSTOPTS                         = 0x3c
+       IPPROTO_EGP                             = 0x8
+       IPPROTO_EMCON                           = 0xe
+       IPPROTO_ENCAP                           = 0x62
+       IPPROTO_EON                             = 0x50
+       IPPROTO_ESP                             = 0x32
+       IPPROTO_ETHERIP                         = 0x61
+       IPPROTO_FRAGMENT                        = 0x2c
+       IPPROTO_GGP                             = 0x3
+       IPPROTO_GMTP                            = 0x64
+       IPPROTO_GRE                             = 0x2f
+       IPPROTO_HELLO                           = 0x3f
+       IPPROTO_HMP                             = 0x14
+       IPPROTO_HOPOPTS                         = 0x0
+       IPPROTO_ICMP                            = 0x1
+       IPPROTO_ICMPV6                          = 0x3a
+       IPPROTO_IDP                             = 0x16
+       IPPROTO_IDPR                            = 0x23
+       IPPROTO_IDRP                            = 0x2d
+       IPPROTO_IGMP                            = 0x2
+       IPPROTO_IGP                             = 0x55
+       IPPROTO_IGRP                            = 0x58
+       IPPROTO_IL                              = 0x28
+       IPPROTO_INLSP                           = 0x34
+       IPPROTO_INP                             = 0x20
+       IPPROTO_IP                              = 0x0
+       IPPROTO_IPCOMP                          = 0x6c
+       IPPROTO_IPCV                            = 0x47
+       IPPROTO_IPEIP                           = 0x5e
+       IPPROTO_IPIP                            = 0x4
+       IPPROTO_IPPC                            = 0x43
+       IPPROTO_IPV4                            = 0x4
+       IPPROTO_IPV6                            = 0x29
+       IPPROTO_IRTP                            = 0x1c
+       IPPROTO_KRYPTOLAN                       = 0x41
+       IPPROTO_LARP                            = 0x5b
+       IPPROTO_LEAF1                           = 0x19
+       IPPROTO_LEAF2                           = 0x1a
+       IPPROTO_MAX                             = 0x100
+       IPPROTO_MAXID                           = 0x34
+       IPPROTO_MEAS                            = 0x13
+       IPPROTO_MHRP                            = 0x30
+       IPPROTO_MICP                            = 0x5f
+       IPPROTO_MTP                             = 0x5c
+       IPPROTO_MUX                             = 0x12
+       IPPROTO_ND                              = 0x4d
+       IPPROTO_NHRP                            = 0x36
+       IPPROTO_NONE                            = 0x3b
+       IPPROTO_NSP                             = 0x1f
+       IPPROTO_NVPII                           = 0xb
+       IPPROTO_OSPFIGP                         = 0x59
+       IPPROTO_PGM                             = 0x71
+       IPPROTO_PIGP                            = 0x9
+       IPPROTO_PIM                             = 0x67
+       IPPROTO_PRM                             = 0x15
+       IPPROTO_PUP                             = 0xc
+       IPPROTO_PVP                             = 0x4b
+       IPPROTO_RAW                             = 0xff
+       IPPROTO_RCCMON                          = 0xa
+       IPPROTO_RDP                             = 0x1b
+       IPPROTO_ROUTING                         = 0x2b
+       IPPROTO_RSVP                            = 0x2e
+       IPPROTO_RVD                             = 0x42
+       IPPROTO_SATEXPAK                        = 0x40
+       IPPROTO_SATMON                          = 0x45
+       IPPROTO_SCCSP                           = 0x60
+       IPPROTO_SCTP                            = 0x84
+       IPPROTO_SDRP                            = 0x2a
+       IPPROTO_SEP                             = 0x21
+       IPPROTO_SRPC                            = 0x5a
+       IPPROTO_ST                              = 0x7
+       IPPROTO_SVMTP                           = 0x52
+       IPPROTO_SWIPE                           = 0x35
+       IPPROTO_TCF                             = 0x57
+       IPPROTO_TCP                             = 0x6
+       IPPROTO_TP                              = 0x1d
+       IPPROTO_TPXX                            = 0x27
+       IPPROTO_TRUNK1                          = 0x17
+       IPPROTO_TRUNK2                          = 0x18
+       IPPROTO_TTP                             = 0x54
+       IPPROTO_UDP                             = 0x11
+       IPPROTO_VINES                           = 0x53
+       IPPROTO_VISA                            = 0x46
+       IPPROTO_VMTP                            = 0x51
+       IPPROTO_WBEXPAK                         = 0x4f
+       IPPROTO_WBMON                           = 0x4e
+       IPPROTO_WSN                             = 0x4a
+       IPPROTO_XNET                            = 0xf
+       IPPROTO_XTP                             = 0x24
+       IPV6_2292DSTOPTS                        = 0x17
+       IPV6_2292HOPLIMIT                       = 0x14
+       IPV6_2292HOPOPTS                        = 0x16
+       IPV6_2292NEXTHOP                        = 0x15
+       IPV6_2292PKTINFO                        = 0x13
+       IPV6_2292PKTOPTIONS                     = 0x19
+       IPV6_2292RTHDR                          = 0x18
+       IPV6_3542DSTOPTS                        = 0x32
+       IPV6_3542HOPLIMIT                       = 0x2f
+       IPV6_3542HOPOPTS                        = 0x31
+       IPV6_3542NEXTHOP                        = 0x30
+       IPV6_3542PKTINFO                        = 0x2e
+       IPV6_3542RTHDR                          = 0x33
+       IPV6_ADDR_MC_FLAGS_PREFIX               = 0x20
+       IPV6_ADDR_MC_FLAGS_TRANSIENT            = 0x10
+       IPV6_ADDR_MC_FLAGS_UNICAST_BASED        = 0x30
+       IPV6_AUTOFLOWLABEL                      = 0x3b
+       IPV6_BINDV6ONLY                         = 0x1b
+       IPV6_BOUND_IF                           = 0x7d
+       IPV6_CHECKSUM                           = 0x1a
+       IPV6_DEFAULT_MULTICAST_HOPS             = 0x1
+       IPV6_DEFAULT_MULTICAST_LOOP             = 0x1
+       IPV6_DEFHLIM                            = 0x40
+       IPV6_DONTFRAG                           = 0x3e
+       IPV6_DSTOPTS                            = 0x32
+       IPV6_FAITH                              = 0x1d
+       IPV6_FLOWINFO_MASK                      = 0xffffff0f
+       IPV6_FLOWLABEL_MASK                     = 0xffff0f00
+       IPV6_FLOW_ECN_MASK                      = 0x3000
+       IPV6_FRAGTTL                            = 0x3c
+       IPV6_FW_ADD                             = 0x1e
+       IPV6_FW_DEL                             = 0x1f
+       IPV6_FW_FLUSH                           = 0x20
+       IPV6_FW_GET                             = 0x22
+       IPV6_FW_ZERO                            = 0x21
+       IPV6_HLIMDEC                            = 0x1
+       IPV6_HOPLIMIT                           = 0x2f
+       IPV6_HOPOPTS                            = 0x31
+       IPV6_IPSEC_POLICY                       = 0x1c
+       IPV6_JOIN_GROUP                         = 0xc
+       IPV6_LEAVE_GROUP                        = 0xd
+       IPV6_MAXHLIM                            = 0xff
+       IPV6_MAXOPTHDR                          = 0x800
+       IPV6_MAXPACKET                          = 0xffff
+       IPV6_MAX_GROUP_SRC_FILTER               = 0x200
+       IPV6_MAX_MEMBERSHIPS                    = 0xfff
+       IPV6_MAX_SOCK_SRC_FILTER                = 0x80
+       IPV6_MIN_MEMBERSHIPS                    = 0x1f
+       IPV6_MMTU                               = 0x500
+       IPV6_MSFILTER                           = 0x4a
+       IPV6_MULTICAST_HOPS                     = 0xa
+       IPV6_MULTICAST_IF                       = 0x9
+       IPV6_MULTICAST_LOOP                     = 0xb
+       IPV6_NEXTHOP                            = 0x30
+       IPV6_PATHMTU                            = 0x2c
+       IPV6_PKTINFO                            = 0x2e
+       IPV6_PORTRANGE                          = 0xe
+       IPV6_PORTRANGE_DEFAULT                  = 0x0
+       IPV6_PORTRANGE_HIGH                     = 0x1
+       IPV6_PORTRANGE_LOW                      = 0x2
+       IPV6_PREFER_TEMPADDR                    = 0x3f
+       IPV6_RECVDSTOPTS                        = 0x28
+       IPV6_RECVHOPLIMIT                       = 0x25
+       IPV6_RECVHOPOPTS                        = 0x27
+       IPV6_RECVPATHMTU                        = 0x2b
+       IPV6_RECVPKTINFO                        = 0x3d
+       IPV6_RECVRTHDR                          = 0x26
+       IPV6_RECVTCLASS                         = 0x23
+       IPV6_RTHDR                              = 0x33
+       IPV6_RTHDRDSTOPTS                       = 0x39
+       IPV6_RTHDR_LOOSE                        = 0x0
+       IPV6_RTHDR_STRICT                       = 0x1
+       IPV6_RTHDR_TYPE_0                       = 0x0
+       IPV6_SOCKOPT_RESERVED1                  = 0x3
+       IPV6_TCLASS                             = 0x24
+       IPV6_UNICAST_HOPS                       = 0x4
+       IPV6_USE_MIN_MTU                        = 0x2a
+       IPV6_V6ONLY                             = 0x1b
+       IPV6_VERSION                            = 0x60
+       IPV6_VERSION_MASK                       = 0xf0
+       IP_ADD_MEMBERSHIP                       = 0xc
+       IP_ADD_SOURCE_MEMBERSHIP                = 0x46
+       IP_BLOCK_SOURCE                         = 0x48
+       IP_BOUND_IF                             = 0x19
+       IP_DEFAULT_MULTICAST_LOOP               = 0x1
+       IP_DEFAULT_MULTICAST_TTL                = 0x1
+       IP_DF                                   = 0x4000
+       IP_DONTFRAG                             = 0x1c
+       IP_DROP_MEMBERSHIP                      = 0xd
+       IP_DROP_SOURCE_MEMBERSHIP               = 0x47
+       IP_DUMMYNET_CONFIGURE                   = 0x3c
+       IP_DUMMYNET_DEL                         = 0x3d
+       IP_DUMMYNET_FLUSH                       = 0x3e
+       IP_DUMMYNET_GET                         = 0x40
+       IP_FAITH                                = 0x16
+       IP_FW_ADD                               = 0x28
+       IP_FW_DEL                               = 0x29
+       IP_FW_FLUSH                             = 0x2a
+       IP_FW_GET                               = 0x2c
+       IP_FW_RESETLOG                          = 0x2d
+       IP_FW_ZERO                              = 0x2b
+       IP_HDRINCL                              = 0x2
+       IP_IPSEC_POLICY                         = 0x15
+       IP_MAXPACKET                            = 0xffff
+       IP_MAX_GROUP_SRC_FILTER                 = 0x200
+       IP_MAX_MEMBERSHIPS                      = 0xfff
+       IP_MAX_SOCK_MUTE_FILTER                 = 0x80
+       IP_MAX_SOCK_SRC_FILTER                  = 0x80
+       IP_MF                                   = 0x2000
+       IP_MIN_MEMBERSHIPS                      = 0x1f
+       IP_MSFILTER                             = 0x4a
+       IP_MSS                                  = 0x240
+       IP_MULTICAST_IF                         = 0x9
+       IP_MULTICAST_IFINDEX                    = 0x42
+       IP_MULTICAST_LOOP                       = 0xb
+       IP_MULTICAST_TTL                        = 0xa
+       IP_MULTICAST_VIF                        = 0xe
+       IP_NAT__XXX                             = 0x37
+       IP_OFFMASK                              = 0x1fff
+       IP_OLD_FW_ADD                           = 0x32
+       IP_OLD_FW_DEL                           = 0x33
+       IP_OLD_FW_FLUSH                         = 0x34
+       IP_OLD_FW_GET                           = 0x36
+       IP_OLD_FW_RESETLOG                      = 0x38
+       IP_OLD_FW_ZERO                          = 0x35
+       IP_OPTIONS                              = 0x1
+       IP_PKTINFO                              = 0x1a
+       IP_PORTRANGE                            = 0x13
+       IP_PORTRANGE_DEFAULT                    = 0x0
+       IP_PORTRANGE_HIGH                       = 0x1
+       IP_PORTRANGE_LOW                        = 0x2
+       IP_RECVDSTADDR                          = 0x7
+       IP_RECVIF                               = 0x14
+       IP_RECVOPTS                             = 0x5
+       IP_RECVPKTINFO                          = 0x1a
+       IP_RECVRETOPTS                          = 0x6
+       IP_RECVTOS                              = 0x1b
+       IP_RECVTTL                              = 0x18
+       IP_RETOPTS                              = 0x8
+       IP_RF                                   = 0x8000
+       IP_RSVP_OFF                             = 0x10
+       IP_RSVP_ON                              = 0xf
+       IP_RSVP_VIF_OFF                         = 0x12
+       IP_RSVP_VIF_ON                          = 0x11
+       IP_STRIPHDR                             = 0x17
+       IP_TOS                                  = 0x3
+       IP_TRAFFIC_MGT_BACKGROUND               = 0x41
+       IP_TTL                                  = 0x4
+       IP_UNBLOCK_SOURCE                       = 0x49
+       ISIG                                    = 0x80
+       ISTRIP                                  = 0x20
+       IUTF8                                   = 0x4000
+       IXANY                                   = 0x800
+       IXOFF                                   = 0x400
+       IXON                                    = 0x200
+       KERN_HOSTNAME                           = 0xa
+       KERN_OSRELEASE                          = 0x2
+       KERN_OSTYPE                             = 0x1
+       KERN_VERSION                            = 0x4
+       LOCAL_PEERCRED                          = 0x1
+       LOCAL_PEEREPID                          = 0x3
+       LOCAL_PEEREUUID                         = 0x5
+       LOCAL_PEERPID                           = 0x2
+       LOCAL_PEERTOKEN                         = 0x6
+       LOCAL_PEERUUID                          = 0x4
+       LOCK_EX                                 = 0x2
+       LOCK_NB                                 = 0x4
+       LOCK_SH                                 = 0x1
+       LOCK_UN                                 = 0x8
+       MADV_CAN_REUSE                          = 0x9
+       MADV_DONTNEED                           = 0x4
+       MADV_FREE                               = 0x5
+       MADV_FREE_REUSABLE                      = 0x7
+       MADV_FREE_REUSE                         = 0x8
+       MADV_NORMAL                             = 0x0
+       MADV_PAGEOUT                            = 0xa
+       MADV_RANDOM                             = 0x1
+       MADV_SEQUENTIAL                         = 0x2
+       MADV_WILLNEED                           = 0x3
+       MADV_ZERO_WIRED_PAGES                   = 0x6
+       MAP_32BIT                               = 0x8000
+       MAP_ANON                                = 0x1000
+       MAP_ANONYMOUS                           = 0x1000
+       MAP_COPY                                = 0x2
+       MAP_FILE                                = 0x0
+       MAP_FIXED                               = 0x10
+       MAP_HASSEMAPHORE                        = 0x200
+       MAP_JIT                                 = 0x800
+       MAP_NOCACHE                             = 0x400
+       MAP_NOEXTEND                            = 0x100
+       MAP_NORESERVE                           = 0x40
+       MAP_PRIVATE                             = 0x2
+       MAP_RENAME                              = 0x20
+       MAP_RESERVED0080                        = 0x80
+       MAP_RESILIENT_CODESIGN                  = 0x2000
+       MAP_RESILIENT_MEDIA                     = 0x4000
+       MAP_SHARED                              = 0x1
+       MAP_TRANSLATED_ALLOW_EXECUTE            = 0x20000
+       MAP_UNIX03                              = 0x40000
+       MCAST_BLOCK_SOURCE                      = 0x54
+       MCAST_EXCLUDE                           = 0x2
+       MCAST_INCLUDE                           = 0x1
+       MCAST_JOIN_GROUP                        = 0x50
+       MCAST_JOIN_SOURCE_GROUP                 = 0x52
+       MCAST_LEAVE_GROUP                       = 0x51
+       MCAST_LEAVE_SOURCE_GROUP                = 0x53
+       MCAST_UNBLOCK_SOURCE                    = 0x55
+       MCAST_UNDEFINED                         = 0x0
+       MCL_CURRENT                             = 0x1
+       MCL_FUTURE                              = 0x2
+       MNT_ASYNC                               = 0x40
+       MNT_AUTOMOUNTED                         = 0x400000
+       MNT_CMDFLAGS                            = 0xf0000
+       MNT_CPROTECT                            = 0x80
+       MNT_DEFWRITE                            = 0x2000000
+       MNT_DONTBROWSE                          = 0x100000
+       MNT_DOVOLFS                             = 0x8000
+       MNT_DWAIT                               = 0x4
+       MNT_EXPORTED                            = 0x100
+       MNT_EXT_ROOT_DATA_VOL                   = 0x1
+       MNT_FORCE                               = 0x80000
+       MNT_IGNORE_OWNERSHIP                    = 0x200000
+       MNT_JOURNALED                           = 0x800000
+       MNT_LOCAL                               = 0x1000
+       MNT_MULTILABEL                          = 0x4000000
+       MNT_NOATIME                             = 0x10000000
+       MNT_NOBLOCK                             = 0x20000
+       MNT_NODEV                               = 0x10
+       MNT_NOEXEC                              = 0x4
+       MNT_NOSUID                              = 0x8
+       MNT_NOUSERXATTR                         = 0x1000000
+       MNT_NOWAIT                              = 0x2
+       MNT_QUARANTINE                          = 0x400
+       MNT_QUOTA                               = 0x2000
+       MNT_RDONLY                              = 0x1
+       MNT_RELOAD                              = 0x40000
+       MNT_REMOVABLE                           = 0x200
+       MNT_ROOTFS                              = 0x4000
+       MNT_SNAPSHOT                            = 0x40000000
+       MNT_STRICTATIME                         = 0x80000000
+       MNT_SYNCHRONOUS                         = 0x2
+       MNT_UNION                               = 0x20
+       MNT_UNKNOWNPERMISSIONS                  = 0x200000
+       MNT_UPDATE                              = 0x10000
+       MNT_VISFLAGMASK                         = 0xd7f0f7ff
+       MNT_WAIT                                = 0x1
+       MSG_CTRUNC                              = 0x20
+       MSG_DONTROUTE                           = 0x4
+       MSG_DONTWAIT                            = 0x80
+       MSG_EOF                                 = 0x100
+       MSG_EOR                                 = 0x8
+       MSG_FLUSH                               = 0x400
+       MSG_HAVEMORE                            = 0x2000
+       MSG_HOLD                                = 0x800
+       MSG_NEEDSA                              = 0x10000
+       MSG_NOSIGNAL                            = 0x80000
+       MSG_OOB                                 = 0x1
+       MSG_PEEK                                = 0x2
+       MSG_RCVMORE                             = 0x4000
+       MSG_SEND                                = 0x1000
+       MSG_TRUNC                               = 0x10
+       MSG_WAITALL                             = 0x40
+       MSG_WAITSTREAM                          = 0x200
+       MS_ASYNC                                = 0x1
+       MS_DEACTIVATE                           = 0x8
+       MS_INVALIDATE                           = 0x2
+       MS_KILLPAGES                            = 0x4
+       MS_SYNC                                 = 0x10
+       NAME_MAX                                = 0xff
+       NET_RT_DUMP                             = 0x1
+       NET_RT_DUMP2                            = 0x7
+       NET_RT_FLAGS                            = 0x2
+       NET_RT_FLAGS_PRIV                       = 0xa
+       NET_RT_IFLIST                           = 0x3
+       NET_RT_IFLIST2                          = 0x6
+       NET_RT_MAXID                            = 0xb
+       NET_RT_STAT                             = 0x4
+       NET_RT_TRASH                            = 0x5
+       NFDBITS                                 = 0x20
+       NL0                                     = 0x0
+       NL1                                     = 0x100
+       NL2                                     = 0x200
+       NL3                                     = 0x300
+       NLDLY                                   = 0x300
+       NOFLSH                                  = 0x80000000
+       NOKERNINFO                              = 0x2000000
+       NOTE_ABSOLUTE                           = 0x8
+       NOTE_ATTRIB                             = 0x8
+       NOTE_BACKGROUND                         = 0x40
+       NOTE_CHILD                              = 0x4
+       NOTE_CRITICAL                           = 0x20
+       NOTE_DELETE                             = 0x1
+       NOTE_EXEC                               = 0x20000000
+       NOTE_EXIT                               = 0x80000000
+       NOTE_EXITSTATUS                         = 0x4000000
+       NOTE_EXIT_CSERROR                       = 0x40000
+       NOTE_EXIT_DECRYPTFAIL                   = 0x10000
+       NOTE_EXIT_DETAIL                        = 0x2000000
+       NOTE_EXIT_DETAIL_MASK                   = 0x70000
+       NOTE_EXIT_MEMORY                        = 0x20000
+       NOTE_EXIT_REPARENTED                    = 0x80000
+       NOTE_EXTEND                             = 0x4
+       NOTE_FFAND                              = 0x40000000
+       NOTE_FFCOPY                             = 0xc0000000
+       NOTE_FFCTRLMASK                         = 0xc0000000
+       NOTE_FFLAGSMASK                         = 0xffffff
+       NOTE_FFNOP                              = 0x0
+       NOTE_FFOR                               = 0x80000000
+       NOTE_FORK                               = 0x40000000
+       NOTE_FUNLOCK                            = 0x100
+       NOTE_LEEWAY                             = 0x10
+       NOTE_LINK                               = 0x10
+       NOTE_LOWAT                              = 0x1
+       NOTE_MACHTIME                           = 0x100
+       NOTE_MACH_CONTINUOUS_TIME               = 0x80
+       NOTE_NONE                               = 0x80
+       NOTE_NSECONDS                           = 0x4
+       NOTE_OOB                                = 0x2
+       NOTE_PCTRLMASK                          = -0x100000
+       NOTE_PDATAMASK                          = 0xfffff
+       NOTE_REAP                               = 0x10000000
+       NOTE_RENAME                             = 0x20
+       NOTE_REVOKE                             = 0x40
+       NOTE_SECONDS                            = 0x1
+       NOTE_SIGNAL                             = 0x8000000
+       NOTE_TRACK                              = 0x1
+       NOTE_TRACKERR                           = 0x2
+       NOTE_TRIGGER                            = 0x1000000
+       NOTE_USECONDS                           = 0x2
+       NOTE_VM_ERROR                           = 0x10000000
+       NOTE_VM_PRESSURE                        = 0x80000000
+       NOTE_VM_PRESSURE_SUDDEN_TERMINATE       = 0x20000000
+       NOTE_VM_PRESSURE_TERMINATE              = 0x40000000
+       NOTE_WRITE                              = 0x2
+       OCRNL                                   = 0x10
+       OFDEL                                   = 0x20000
+       OFILL                                   = 0x80
+       ONLCR                                   = 0x2
+       ONLRET                                  = 0x40
+       ONOCR                                   = 0x20
+       ONOEOT                                  = 0x8
+       OPOST                                   = 0x1
+       OXTABS                                  = 0x4
+       O_ACCMODE                               = 0x3
+       O_ALERT                                 = 0x20000000
+       O_APPEND                                = 0x8
+       O_ASYNC                                 = 0x40
+       O_CLOEXEC                               = 0x1000000
+       O_CREAT                                 = 0x200
+       O_DIRECTORY                             = 0x100000
+       O_DP_GETRAWENCRYPTED                    = 0x1
+       O_DP_GETRAWUNENCRYPTED                  = 0x2
+       O_DSYNC                                 = 0x400000
+       O_EVTONLY                               = 0x8000
+       O_EXCL                                  = 0x800
+       O_EXLOCK                                = 0x20
+       O_FSYNC                                 = 0x80
+       O_NDELAY                                = 0x4
+       O_NOCTTY                                = 0x20000
+       O_NOFOLLOW                              = 0x100
+       O_NOFOLLOW_ANY                          = 0x20000000
+       O_NONBLOCK                              = 0x4
+       O_POPUP                                 = 0x80000000
+       O_RDONLY                                = 0x0
+       O_RDWR                                  = 0x2
+       O_SHLOCK                                = 0x10
+       O_SYMLINK                               = 0x200000
+       O_SYNC                                  = 0x80
+       O_TRUNC                                 = 0x400
+       O_WRONLY                                = 0x1
+       PARENB                                  = 0x1000
+       PARMRK                                  = 0x8
+       PARODD                                  = 0x2000
+       PENDIN                                  = 0x20000000
+       PRIO_PGRP                               = 0x1
+       PRIO_PROCESS                            = 0x0
+       PRIO_USER                               = 0x2
+       PROT_EXEC                               = 0x4
+       PROT_NONE                               = 0x0
+       PROT_READ                               = 0x1
+       PROT_WRITE                              = 0x2
+       PT_ATTACH                               = 0xa
+       PT_ATTACHEXC                            = 0xe
+       PT_CONTINUE                             = 0x7
+       PT_DENY_ATTACH                          = 0x1f
+       PT_DETACH                               = 0xb
+       PT_FIRSTMACH                            = 0x20
+       PT_FORCEQUOTA                           = 0x1e
+       PT_KILL                                 = 0x8
+       PT_READ_D                               = 0x2
+       PT_READ_I                               = 0x1
+       PT_READ_U                               = 0x3
+       PT_SIGEXC                               = 0xc
+       PT_STEP                                 = 0x9
+       PT_THUPDATE                             = 0xd
+       PT_TRACE_ME                             = 0x0
+       PT_WRITE_D                              = 0x5
+       PT_WRITE_I                              = 0x4
+       PT_WRITE_U                              = 0x6
+       RLIMIT_AS                               = 0x5
+       RLIMIT_CORE                             = 0x4
+       RLIMIT_CPU                              = 0x0
+       RLIMIT_CPU_USAGE_MONITOR                = 0x2
+       RLIMIT_DATA                             = 0x2
+       RLIMIT_FSIZE                            = 0x1
+       RLIMIT_MEMLOCK                          = 0x6
+       RLIMIT_NOFILE                           = 0x8
+       RLIMIT_NPROC                            = 0x7
+       RLIMIT_RSS                              = 0x5
+       RLIMIT_STACK                            = 0x3
+       RLIM_INFINITY                           = 0x7fffffffffffffff
+       RTAX_AUTHOR                             = 0x6
+       RTAX_BRD                                = 0x7
+       RTAX_DST                                = 0x0
+       RTAX_GATEWAY                            = 0x1
+       RTAX_GENMASK                            = 0x3
+       RTAX_IFA                                = 0x5
+       RTAX_IFP                                = 0x4
+       RTAX_MAX                                = 0x8
+       RTAX_NETMASK                            = 0x2
+       RTA_AUTHOR                              = 0x40
+       RTA_BRD                                 = 0x80
+       RTA_DST                                 = 0x1
+       RTA_GATEWAY                             = 0x2
+       RTA_GENMASK                             = 0x8
+       RTA_IFA                                 = 0x20
+       RTA_IFP                                 = 0x10
+       RTA_NETMASK                             = 0x4
+       RTF_BLACKHOLE                           = 0x1000
+       RTF_BROADCAST                           = 0x400000
+       RTF_CLONING                             = 0x100
+       RTF_CONDEMNED                           = 0x2000000
+       RTF_DEAD                                = 0x20000000
+       RTF_DELCLONE                            = 0x80
+       RTF_DONE                                = 0x40
+       RTF_DYNAMIC                             = 0x10
+       RTF_GATEWAY                             = 0x2
+       RTF_GLOBAL                              = 0x40000000
+       RTF_HOST                                = 0x4
+       RTF_IFREF                               = 0x4000000
+       RTF_IFSCOPE                             = 0x1000000
+       RTF_LLDATA                              = 0x400
+       RTF_LLINFO                              = 0x400
+       RTF_LOCAL                               = 0x200000
+       RTF_MODIFIED                            = 0x20
+       RTF_MULTICAST                           = 0x800000
+       RTF_NOIFREF                             = 0x2000
+       RTF_PINNED                              = 0x100000
+       RTF_PRCLONING                           = 0x10000
+       RTF_PROTO1                              = 0x8000
+       RTF_PROTO2                              = 0x4000
+       RTF_PROTO3                              = 0x40000
+       RTF_PROXY                               = 0x8000000
+       RTF_REJECT                              = 0x8
+       RTF_ROUTER                              = 0x10000000
+       RTF_STATIC                              = 0x800
+       RTF_UP                                  = 0x1
+       RTF_WASCLONED                           = 0x20000
+       RTF_XRESOLVE                            = 0x200
+       RTM_ADD                                 = 0x1
+       RTM_CHANGE                              = 0x3
+       RTM_DELADDR                             = 0xd
+       RTM_DELETE                              = 0x2
+       RTM_DELMADDR                            = 0x10
+       RTM_GET                                 = 0x4
+       RTM_GET2                                = 0x14
+       RTM_IFINFO                              = 0xe
+       RTM_IFINFO2                             = 0x12
+       RTM_LOCK                                = 0x8
+       RTM_LOSING                              = 0x5
+       RTM_MISS                                = 0x7
+       RTM_NEWADDR                             = 0xc
+       RTM_NEWMADDR                            = 0xf
+       RTM_NEWMADDR2                           = 0x13
+       RTM_OLDADD                              = 0x9
+       RTM_OLDDEL                              = 0xa
+       RTM_REDIRECT                            = 0x6
+       RTM_RESOLVE                             = 0xb
+       RTM_RTTUNIT                             = 0xf4240
+       RTM_VERSION                             = 0x5
+       RTV_EXPIRE                              = 0x4
+       RTV_HOPCOUNT                            = 0x2
+       RTV_MTU                                 = 0x1
+       RTV_RPIPE                               = 0x8
+       RTV_RTT                                 = 0x40
+       RTV_RTTVAR                              = 0x80
+       RTV_SPIPE                               = 0x10
+       RTV_SSTHRESH                            = 0x20
+       RUSAGE_CHILDREN                         = -0x1
+       RUSAGE_SELF                             = 0x0
+       SCM_CREDS                               = 0x3
+       SCM_RIGHTS                              = 0x1
+       SCM_TIMESTAMP                           = 0x2
+       SCM_TIMESTAMP_MONOTONIC                 = 0x4
+       SEEK_CUR                                = 0x1
+       SEEK_DATA                               = 0x4
+       SEEK_END                                = 0x2
+       SEEK_HOLE                               = 0x3
+       SEEK_SET                                = 0x0
+       SHUT_RD                                 = 0x0
+       SHUT_RDWR                               = 0x2
+       SHUT_WR                                 = 0x1
+       SIOCADDMULTI                            = 0x80206931
+       SIOCAIFADDR                             = 0x8040691a
+       SIOCARPIPLL                             = 0xc0206928
+       SIOCATMARK                              = 0x40047307
+       SIOCAUTOADDR                            = 0xc0206926
+       SIOCAUTONETMASK                         = 0x80206927
+       SIOCDELMULTI                            = 0x80206932
+       SIOCDIFADDR                             = 0x80206919
+       SIOCDIFPHYADDR                          = 0x80206941
+       SIOCGDRVSPEC                            = 0xc028697b
+       SIOCGETVLAN                             = 0xc020697f
+       SIOCGHIWAT                              = 0x40047301
+       SIOCGIF6LOWPAN                          = 0xc02069c5
+       SIOCGIFADDR                             = 0xc0206921
+       SIOCGIFALTMTU                           = 0xc0206948
+       SIOCGIFASYNCMAP                         = 0xc020697c
+       SIOCGIFBOND                             = 0xc0206947
+       SIOCGIFBRDADDR                          = 0xc0206923
+       SIOCGIFCAP                              = 0xc020695b
+       SIOCGIFCONF                             = 0xc00c6924
+       SIOCGIFDEVMTU                           = 0xc0206944
+       SIOCGIFDSTADDR                          = 0xc0206922
+       SIOCGIFFLAGS                            = 0xc0206911
+       SIOCGIFFUNCTIONALTYPE                   = 0xc02069ad
+       SIOCGIFGENERIC                          = 0xc020693a
+       SIOCGIFKPI                              = 0xc0206987
+       SIOCGIFMAC                              = 0xc0206982
+       SIOCGIFMEDIA                            = 0xc02c6938
+       SIOCGIFMETRIC                           = 0xc0206917
+       SIOCGIFMTU                              = 0xc0206933
+       SIOCGIFNETMASK                          = 0xc0206925
+       SIOCGIFPDSTADDR                         = 0xc0206940
+       SIOCGIFPHYS                             = 0xc0206935
+       SIOCGIFPSRCADDR                         = 0xc020693f
+       SIOCGIFSTATUS                           = 0xc331693d
+       SIOCGIFVLAN                             = 0xc020697f
+       SIOCGIFWAKEFLAGS                        = 0xc0206988
+       SIOCGIFXMEDIA                           = 0xc02c6948
+       SIOCGLOWAT                              = 0x40047303
+       SIOCGPGRP                               = 0x40047309
+       SIOCIFCREATE                            = 0xc0206978
+       SIOCIFCREATE2                           = 0xc020697a
+       SIOCIFDESTROY                           = 0x80206979
+       SIOCIFGCLONERS                          = 0xc0106981
+       SIOCRSLVMULTI                           = 0xc010693b
+       SIOCSDRVSPEC                            = 0x8028697b
+       SIOCSETVLAN                             = 0x8020697e
+       SIOCSHIWAT                              = 0x80047300
+       SIOCSIF6LOWPAN                          = 0x802069c4
+       SIOCSIFADDR                             = 0x8020690c
+       SIOCSIFALTMTU                           = 0x80206945
+       SIOCSIFASYNCMAP                         = 0x8020697d
+       SIOCSIFBOND                             = 0x80206946
+       SIOCSIFBRDADDR                          = 0x80206913
+       SIOCSIFCAP                              = 0x8020695a
+       SIOCSIFDSTADDR                          = 0x8020690e
+       SIOCSIFFLAGS                            = 0x80206910
+       SIOCSIFGENERIC                          = 0x80206939
+       SIOCSIFKPI                              = 0x80206986
+       SIOCSIFLLADDR                           = 0x8020693c
+       SIOCSIFMAC                              = 0x80206983
+       SIOCSIFMEDIA                            = 0xc0206937
+       SIOCSIFMETRIC                           = 0x80206918
+       SIOCSIFMTU                              = 0x80206934
+       SIOCSIFNETMASK                          = 0x80206916
+       SIOCSIFPHYADDR                          = 0x8040693e
+       SIOCSIFPHYS                             = 0x80206936
+       SIOCSIFVLAN                             = 0x8020697e
+       SIOCSLOWAT                              = 0x80047302
+       SIOCSPGRP                               = 0x80047308
+       SOCK_DGRAM                              = 0x2
+       SOCK_MAXADDRLEN                         = 0xff
+       SOCK_RAW                                = 0x3
+       SOCK_RDM                                = 0x4
+       SOCK_SEQPACKET                          = 0x5
+       SOCK_STREAM                             = 0x1
+       SOL_LOCAL                               = 0x0
+       SOL_SOCKET                              = 0xffff
+       SOMAXCONN                               = 0x80
+       SO_ACCEPTCONN                           = 0x2
+       SO_BROADCAST                            = 0x20
+       SO_DEBUG                                = 0x1
+       SO_DONTROUTE                            = 0x10
+       SO_DONTTRUNC                            = 0x2000
+       SO_ERROR                                = 0x1007
+       SO_KEEPALIVE                            = 0x8
+       SO_LABEL                                = 0x1010
+       SO_LINGER                               = 0x80
+       SO_LINGER_SEC                           = 0x1080
+       SO_NETSVC_MARKING_LEVEL                 = 0x1119
+       SO_NET_SERVICE_TYPE                     = 0x1116
+       SO_NKE                                  = 0x1021
+       SO_NOADDRERR                            = 0x1023
+       SO_NOSIGPIPE                            = 0x1022
+       SO_NOTIFYCONFLICT                       = 0x1026
+       SO_NP_EXTENSIONS                        = 0x1083
+       SO_NREAD                                = 0x1020
+       SO_NUMRCVPKT                            = 0x1112
+       SO_NWRITE                               = 0x1024
+       SO_OOBINLINE                            = 0x100
+       SO_PEERLABEL                            = 0x1011
+       SO_RANDOMPORT                           = 0x1082
+       SO_RCVBUF                               = 0x1002
+       SO_RCVLOWAT                             = 0x1004
+       SO_RCVTIMEO                             = 0x1006
+       SO_REUSEADDR                            = 0x4
+       SO_REUSEPORT                            = 0x200
+       SO_REUSESHAREUID                        = 0x1025
+       SO_SNDBUF                               = 0x1001
+       SO_SNDLOWAT                             = 0x1003
+       SO_SNDTIMEO                             = 0x1005
+       SO_TIMESTAMP                            = 0x400
+       SO_TIMESTAMP_MONOTONIC                  = 0x800
+       SO_TRACKER_ATTRIBUTE_FLAGS_APP_APPROVED = 0x1
+       SO_TRACKER_ATTRIBUTE_FLAGS_DOMAIN_SHORT = 0x4
+       SO_TRACKER_ATTRIBUTE_FLAGS_TRACKER      = 0x2
+       SO_TRACKER_TRANSPARENCY_VERSION         = 0x3
+       SO_TYPE                                 = 0x1008
+       SO_UPCALLCLOSEWAIT                      = 0x1027
+       SO_USELOOPBACK                          = 0x40
+       SO_WANTMORE                             = 0x4000
+       SO_WANTOOBFLAG                          = 0x8000
+       S_IEXEC                                 = 0x40
+       S_IFBLK                                 = 0x6000
+       S_IFCHR                                 = 0x2000
+       S_IFDIR                                 = 0x4000
+       S_IFIFO                                 = 0x1000
+       S_IFLNK                                 = 0xa000
+       S_IFMT                                  = 0xf000
+       S_IFREG                                 = 0x8000
+       S_IFSOCK                                = 0xc000
+       S_IFWHT                                 = 0xe000
+       S_IREAD                                 = 0x100
+       S_IRGRP                                 = 0x20
+       S_IROTH                                 = 0x4
+       S_IRUSR                                 = 0x100
+       S_IRWXG                                 = 0x38
+       S_IRWXO                                 = 0x7
+       S_IRWXU                                 = 0x1c0
+       S_ISGID                                 = 0x400
+       S_ISTXT                                 = 0x200
+       S_ISUID                                 = 0x800
+       S_ISVTX                                 = 0x200
+       S_IWGRP                                 = 0x10
+       S_IWOTH                                 = 0x2
+       S_IWRITE                                = 0x80
+       S_IWUSR                                 = 0x80
+       S_IXGRP                                 = 0x8
+       S_IXOTH                                 = 0x1
+       S_IXUSR                                 = 0x40
+       TAB0                                    = 0x0
+       TAB1                                    = 0x400
+       TAB2                                    = 0x800
+       TAB3                                    = 0x4
+       TABDLY                                  = 0xc04
+       TCIFLUSH                                = 0x1
+       TCIOFF                                  = 0x3
+       TCIOFLUSH                               = 0x3
+       TCION                                   = 0x4
+       TCOFLUSH                                = 0x2
+       TCOOFF                                  = 0x1
+       TCOON                                   = 0x2
+       TCPOPT_CC                               = 0xb
+       TCPOPT_CCECHO                           = 0xd
+       TCPOPT_CCNEW                            = 0xc
+       TCPOPT_EOL                              = 0x0
+       TCPOPT_FASTOPEN                         = 0x22
+       TCPOPT_MAXSEG                           = 0x2
+       TCPOPT_NOP                              = 0x1
+       TCPOPT_SACK                             = 0x5
+       TCPOPT_SACK_HDR                         = 0x1010500
+       TCPOPT_SACK_PERMITTED                   = 0x4
+       TCPOPT_SACK_PERMIT_HDR                  = 0x1010402
+       TCPOPT_SIGNATURE                        = 0x13
+       TCPOPT_TIMESTAMP                        = 0x8
+       TCPOPT_TSTAMP_HDR                       = 0x101080a
+       TCPOPT_WINDOW                           = 0x3
+       TCP_CONNECTIONTIMEOUT                   = 0x20
+       TCP_CONNECTION_INFO                     = 0x106
+       TCP_ENABLE_ECN                          = 0x104
+       TCP_FASTOPEN                            = 0x105
+       TCP_KEEPALIVE                           = 0x10
+       TCP_KEEPCNT                             = 0x102
+       TCP_KEEPINTVL                           = 0x101
+       TCP_MAXHLEN                             = 0x3c
+       TCP_MAXOLEN                             = 0x28
+       TCP_MAXSEG                              = 0x2
+       TCP_MAXWIN                              = 0xffff
+       TCP_MAX_SACK                            = 0x4
+       TCP_MAX_WINSHIFT                        = 0xe
+       TCP_MINMSS                              = 0xd8
+       TCP_MSS                                 = 0x200
+       TCP_NODELAY                             = 0x1
+       TCP_NOOPT                               = 0x8
+       TCP_NOPUSH                              = 0x4
+       TCP_NOTSENT_LOWAT                       = 0x201
+       TCP_RXT_CONNDROPTIME                    = 0x80
+       TCP_RXT_FINDROP                         = 0x100
+       TCP_SENDMOREACKS                        = 0x103
+       TCSAFLUSH                               = 0x2
+       TIOCCBRK                                = 0x2000747a
+       TIOCCDTR                                = 0x20007478
+       TIOCCONS                                = 0x80047462
+       TIOCDCDTIMESTAMP                        = 0x40107458
+       TIOCDRAIN                               = 0x2000745e
+       TIOCDSIMICROCODE                        = 0x20007455
+       TIOCEXCL                                = 0x2000740d
+       TIOCEXT                                 = 0x80047460
+       TIOCFLUSH                               = 0x80047410
+       TIOCGDRAINWAIT                          = 0x40047456
+       TIOCGETA                                = 0x40487413
+       TIOCGETD                                = 0x4004741a
+       TIOCGPGRP                               = 0x40047477
+       TIOCGWINSZ                              = 0x40087468
+       TIOCIXOFF                               = 0x20007480
+       TIOCIXON                                = 0x20007481
+       TIOCMBIC                                = 0x8004746b
+       TIOCMBIS                                = 0x8004746c
+       TIOCMGDTRWAIT                           = 0x4004745a
+       TIOCMGET                                = 0x4004746a
+       TIOCMODG                                = 0x40047403
+       TIOCMODS                                = 0x80047404
+       TIOCMSDTRWAIT                           = 0x8004745b
+       TIOCMSET                                = 0x8004746d
+       TIOCM_CAR                               = 0x40
+       TIOCM_CD                                = 0x40
+       TIOCM_CTS                               = 0x20
+       TIOCM_DSR                               = 0x100
+       TIOCM_DTR                               = 0x2
+       TIOCM_LE                                = 0x1
+       TIOCM_RI                                = 0x80
+       TIOCM_RNG                               = 0x80
+       TIOCM_RTS                               = 0x4
+       TIOCM_SR                                = 0x10
+       TIOCM_ST                                = 0x8
+       TIOCNOTTY                               = 0x20007471
+       TIOCNXCL                                = 0x2000740e
+       TIOCOUTQ                                = 0x40047473
+       TIOCPKT                                 = 0x80047470
+       TIOCPKT_DATA                            = 0x0
+       TIOCPKT_DOSTOP                          = 0x20
+       TIOCPKT_FLUSHREAD                       = 0x1
+       TIOCPKT_FLUSHWRITE                      = 0x2
+       TIOCPKT_IOCTL                           = 0x40
+       TIOCPKT_NOSTOP                          = 0x10
+       TIOCPKT_START                           = 0x8
+       TIOCPKT_STOP                            = 0x4
+       TIOCPTYGNAME                            = 0x40807453
+       TIOCPTYGRANT                            = 0x20007454
+       TIOCPTYUNLK                             = 0x20007452
+       TIOCREMOTE                              = 0x80047469
+       TIOCSBRK                                = 0x2000747b
+       TIOCSCONS                               = 0x20007463
+       TIOCSCTTY                               = 0x20007461
+       TIOCSDRAINWAIT                          = 0x80047457
+       TIOCSDTR                                = 0x20007479
+       TIOCSETA                                = 0x80487414
+       TIOCSETAF                               = 0x80487416
+       TIOCSETAW                               = 0x80487415
+       TIOCSETD                                = 0x8004741b
+       TIOCSIG                                 = 0x2000745f
+       TIOCSPGRP                               = 0x80047476
+       TIOCSTART                               = 0x2000746e
+       TIOCSTAT                                = 0x20007465
+       TIOCSTI                                 = 0x80017472
+       TIOCSTOP                                = 0x2000746f
+       TIOCSWINSZ                              = 0x80087467
+       TIOCTIMESTAMP                           = 0x40107459
+       TIOCUCNTL                               = 0x80047466
+       TOSTOP                                  = 0x400000
+       VDISCARD                                = 0xf
+       VDSUSP                                  = 0xb
+       VEOF                                    = 0x0
+       VEOL                                    = 0x1
+       VEOL2                                   = 0x2
+       VERASE                                  = 0x3
+       VINTR                                   = 0x8
+       VKILL                                   = 0x5
+       VLNEXT                                  = 0xe
+       VMADDR_CID_ANY                          = 0xffffffff
+       VMADDR_CID_HOST                         = 0x2
+       VMADDR_CID_HYPERVISOR                   = 0x0
+       VMADDR_CID_RESERVED                     = 0x1
+       VMADDR_PORT_ANY                         = 0xffffffff
+       VMIN                                    = 0x10
+       VM_LOADAVG                              = 0x2
+       VM_MACHFACTOR                           = 0x4
+       VM_MAXID                                = 0x6
+       VM_METER                                = 0x1
+       VM_SWAPUSAGE                            = 0x5
+       VQUIT                                   = 0x9
+       VREPRINT                                = 0x6
+       VSTART                                  = 0xc
+       VSTATUS                                 = 0x12
+       VSTOP                                   = 0xd
+       VSUSP                                   = 0xa
+       VT0                                     = 0x0
+       VT1                                     = 0x10000
+       VTDLY                                   = 0x10000
+       VTIME                                   = 0x11
+       VWERASE                                 = 0x4
+       WCONTINUED                              = 0x10
+       WCOREFLAG                               = 0x80
+       WEXITED                                 = 0x4
+       WNOHANG                                 = 0x1
+       WNOWAIT                                 = 0x20
+       WORDSIZE                                = 0x40
+       WSTOPPED                                = 0x8
+       WUNTRACED                               = 0x2
+       XATTR_CREATE                            = 0x2
+       XATTR_NODEFAULT                         = 0x10
+       XATTR_NOFOLLOW                          = 0x1
+       XATTR_NOSECURITY                        = 0x8
+       XATTR_REPLACE                           = 0x4
+       XATTR_SHOWCOMPRESSION                   = 0x20
 )
 
 // Errors
index 8894c4af44a250047ceb6c33bf8ac0ce60efe6b1..78d4b85ece50f6ec967661e9bbde11dbd7628d31 100644 (file)
@@ -1333,6 +1333,20 @@ const (
        KEY_SPEC_THREAD_KEYRING                     = -0x1
        KEY_SPEC_USER_KEYRING                       = -0x4
        KEY_SPEC_USER_SESSION_KEYRING               = -0x5
+       LANDLOCK_ACCESS_FS_EXECUTE                  = 0x1
+       LANDLOCK_ACCESS_FS_MAKE_BLOCK               = 0x800
+       LANDLOCK_ACCESS_FS_MAKE_CHAR                = 0x40
+       LANDLOCK_ACCESS_FS_MAKE_DIR                 = 0x80
+       LANDLOCK_ACCESS_FS_MAKE_FIFO                = 0x400
+       LANDLOCK_ACCESS_FS_MAKE_REG                 = 0x100
+       LANDLOCK_ACCESS_FS_MAKE_SOCK                = 0x200
+       LANDLOCK_ACCESS_FS_MAKE_SYM                 = 0x1000
+       LANDLOCK_ACCESS_FS_READ_DIR                 = 0x8
+       LANDLOCK_ACCESS_FS_READ_FILE                = 0x4
+       LANDLOCK_ACCESS_FS_REMOVE_DIR               = 0x10
+       LANDLOCK_ACCESS_FS_REMOVE_FILE              = 0x20
+       LANDLOCK_ACCESS_FS_WRITE_FILE               = 0x2
+       LANDLOCK_CREATE_RULESET_VERSION             = 0x1
        LINUX_REBOOT_CMD_CAD_OFF                    = 0x0
        LINUX_REBOOT_CMD_CAD_ON                     = 0x89abcdef
        LINUX_REBOOT_CMD_HALT                       = 0xcdef0123
@@ -1383,6 +1397,8 @@ const (
        MADV_NOHUGEPAGE                             = 0xf
        MADV_NORMAL                                 = 0x0
        MADV_PAGEOUT                                = 0x15
+       MADV_POPULATE_READ                          = 0x16
+       MADV_POPULATE_WRITE                         = 0x17
        MADV_RANDOM                                 = 0x1
        MADV_REMOVE                                 = 0x9
        MADV_SEQUENTIAL                             = 0x2
index d4efe8d457aca1e22cb810498a40af10c34dcce3..0ae0ed4cb8af7d2e6a6afa387efd4df0354dd3a5 100644 (file)
@@ -734,6 +734,65 @@ var libc_sendfile_trampoline_addr uintptr
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
+func shmat(id int, addr uintptr, flag int) (ret uintptr, err error) {
+       r0, _, e1 := syscall_syscall(libc_shmat_trampoline_addr, uintptr(id), uintptr(addr), uintptr(flag))
+       ret = uintptr(r0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+var libc_shmat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_shmat shmat "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func shmctl(id int, cmd int, buf *SysvShmDesc) (result int, err error) {
+       r0, _, e1 := syscall_syscall(libc_shmctl_trampoline_addr, uintptr(id), uintptr(cmd), uintptr(unsafe.Pointer(buf)))
+       result = int(r0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+var libc_shmctl_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_shmctl shmctl "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func shmdt(addr uintptr) (err error) {
+       _, _, e1 := syscall_syscall(libc_shmdt_trampoline_addr, uintptr(addr), 0, 0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+var libc_shmdt_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_shmdt shmdt "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func shmget(key int, size int, flag int) (id int, err error) {
+       r0, _, e1 := syscall_syscall(libc_shmget_trampoline_addr, uintptr(key), uintptr(size), uintptr(flag))
+       id = int(r0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+var libc_shmget_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_shmget shmget "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
 func Access(path string, mode uint32) (err error) {
        var _p0 *byte
        _p0, err = BytePtrFromString(path)
index bc169c2ab9ca8d3526b1970fba3a97f81cf07f24..eac6ca806f4d5c65ff3c9f564a6f3c7de73063d7 100644 (file)
@@ -264,6 +264,30 @@ TEXT libc_sendfile_trampoline<>(SB),NOSPLIT,$0-0
 GLOBL  Â·libc_sendfile_trampoline_addr(SB), RODATA, $8
 DATA   Â·libc_sendfile_trampoline_addr(SB)/8, $libc_sendfile_trampoline<>(SB)
 
+TEXT libc_shmat_trampoline<>(SB),NOSPLIT,$0-0
+       JMP     libc_shmat(SB)
+
+GLOBL  Â·libc_shmat_trampoline_addr(SB), RODATA, $8
+DATA   Â·libc_shmat_trampoline_addr(SB)/8, $libc_shmat_trampoline<>(SB)
+
+TEXT libc_shmctl_trampoline<>(SB),NOSPLIT,$0-0
+       JMP     libc_shmctl(SB)
+
+GLOBL  Â·libc_shmctl_trampoline_addr(SB), RODATA, $8
+DATA   Â·libc_shmctl_trampoline_addr(SB)/8, $libc_shmctl_trampoline<>(SB)
+
+TEXT libc_shmdt_trampoline<>(SB),NOSPLIT,$0-0
+       JMP     libc_shmdt(SB)
+
+GLOBL  Â·libc_shmdt_trampoline_addr(SB), RODATA, $8
+DATA   Â·libc_shmdt_trampoline_addr(SB)/8, $libc_shmdt_trampoline<>(SB)
+
+TEXT libc_shmget_trampoline<>(SB),NOSPLIT,$0-0
+       JMP     libc_shmget(SB)
+
+GLOBL  Â·libc_shmget_trampoline_addr(SB), RODATA, $8
+DATA   Â·libc_shmget_trampoline_addr(SB)/8, $libc_shmget_trampoline<>(SB)
+
 TEXT libc_access_trampoline<>(SB),NOSPLIT,$0-0
        JMP     libc_access(SB)
 
index f2ee2bd33b93f2b31b65ea8f5d0263884f690d8d..cf71be3edb3b34c33cbadcb9b883a158b7cb795d 100644 (file)
@@ -734,6 +734,65 @@ var libc_sendfile_trampoline_addr uintptr
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
+func shmat(id int, addr uintptr, flag int) (ret uintptr, err error) {
+       r0, _, e1 := syscall_syscall(libc_shmat_trampoline_addr, uintptr(id), uintptr(addr), uintptr(flag))
+       ret = uintptr(r0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+var libc_shmat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_shmat shmat "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func shmctl(id int, cmd int, buf *SysvShmDesc) (result int, err error) {
+       r0, _, e1 := syscall_syscall(libc_shmctl_trampoline_addr, uintptr(id), uintptr(cmd), uintptr(unsafe.Pointer(buf)))
+       result = int(r0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+var libc_shmctl_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_shmctl shmctl "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func shmdt(addr uintptr) (err error) {
+       _, _, e1 := syscall_syscall(libc_shmdt_trampoline_addr, uintptr(addr), 0, 0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+var libc_shmdt_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_shmdt shmdt "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func shmget(key int, size int, flag int) (id int, err error) {
+       r0, _, e1 := syscall_syscall(libc_shmget_trampoline_addr, uintptr(key), uintptr(size), uintptr(flag))
+       id = int(r0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+var libc_shmget_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_shmget shmget "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
 func Access(path string, mode uint32) (err error) {
        var _p0 *byte
        _p0, err = BytePtrFromString(path)
index 33e19776db4e2bd22f4311ca68090a51ce3a0ad4..4ebcf217585403cd63c424c65b67b83379e51dc2 100644 (file)
@@ -264,6 +264,30 @@ TEXT libc_sendfile_trampoline<>(SB),NOSPLIT,$0-0
 GLOBL  Â·libc_sendfile_trampoline_addr(SB), RODATA, $8
 DATA   Â·libc_sendfile_trampoline_addr(SB)/8, $libc_sendfile_trampoline<>(SB)
 
+TEXT libc_shmat_trampoline<>(SB),NOSPLIT,$0-0
+       JMP     libc_shmat(SB)
+
+GLOBL  Â·libc_shmat_trampoline_addr(SB), RODATA, $8
+DATA   Â·libc_shmat_trampoline_addr(SB)/8, $libc_shmat_trampoline<>(SB)
+
+TEXT libc_shmctl_trampoline<>(SB),NOSPLIT,$0-0
+       JMP     libc_shmctl(SB)
+
+GLOBL  Â·libc_shmctl_trampoline_addr(SB), RODATA, $8
+DATA   Â·libc_shmctl_trampoline_addr(SB)/8, $libc_shmctl_trampoline<>(SB)
+
+TEXT libc_shmdt_trampoline<>(SB),NOSPLIT,$0-0
+       JMP     libc_shmdt(SB)
+
+GLOBL  Â·libc_shmdt_trampoline_addr(SB), RODATA, $8
+DATA   Â·libc_shmdt_trampoline_addr(SB)/8, $libc_shmdt_trampoline<>(SB)
+
+TEXT libc_shmget_trampoline<>(SB),NOSPLIT,$0-0
+       JMP     libc_shmget(SB)
+
+GLOBL  Â·libc_shmget_trampoline_addr(SB), RODATA, $8
+DATA   Â·libc_shmget_trampoline_addr(SB)/8, $libc_shmget_trampoline<>(SB)
+
 TEXT libc_access_trampoline<>(SB),NOSPLIT,$0-0
        JMP     libc_access(SB)
 
index 2dbe3da7a09547eeaf0e8a4f6f40a0bc0d87ac72..4f5da1f54f80983ca163b679b4e4f93705f66e4e 100644 (file)
@@ -110,6 +110,16 @@ func openat2(dirfd int, path string, open_how *OpenHow, size int) (fd int, err e
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
+func pipe2(p *[2]_C_int, flags int) (err error) {
+       _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
 func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
        r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)
        n = int(r0)
@@ -1945,8 +1955,63 @@ func ProcessVMWritev(pid int, localIov []Iovec, remoteIov []RemoteIovec, flags u
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func pipe2(p *[2]_C_int, flags int) (err error) {
-       _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
+func PidfdOpen(pid int, flags int) (fd int, err error) {
+       r0, _, e1 := Syscall(SYS_PIDFD_OPEN, uintptr(pid), uintptr(flags), 0)
+       fd = int(r0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func PidfdGetfd(pidfd int, targetfd int, flags int) (fd int, err error) {
+       r0, _, e1 := Syscall(SYS_PIDFD_GETFD, uintptr(pidfd), uintptr(targetfd), uintptr(flags))
+       fd = int(r0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func shmat(id int, addr uintptr, flag int) (ret uintptr, err error) {
+       r0, _, e1 := Syscall(SYS_SHMAT, uintptr(id), uintptr(addr), uintptr(flag))
+       ret = uintptr(r0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func shmctl(id int, cmd int, buf *SysvShmDesc) (result int, err error) {
+       r0, _, e1 := Syscall(SYS_SHMCTL, uintptr(id), uintptr(cmd), uintptr(unsafe.Pointer(buf)))
+       result = int(r0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func shmdt(addr uintptr) (err error) {
+       _, _, e1 := Syscall(SYS_SHMDT, uintptr(addr), 0, 0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func shmget(key int, size int, flag int) (id int, err error) {
+       r0, _, e1 := Syscall(SYS_SHMGET, uintptr(key), uintptr(size), uintptr(flag))
+       id = int(r0)
        if e1 != 0 {
                err = errnoErr(e1)
        }
index e37096e4deccb9e6dbde1e97c74d31cb5ff223dd..ff90c81e7300eb19641ea5c9b7eb273fde949121 100644 (file)
@@ -46,37 +46,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func pipe(p *[2]_C_int) (err error) {
-       _, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func dup2(oldfd int, newfd int) (err error) {
-       _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate(size int) (fd int, err error) {
-       r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
-       fd = int(r0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
 func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
        var _p0 unsafe.Pointer
        if len(events) > 0 {
@@ -181,17 +150,6 @@ func Getuid() (uid int) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func InotifyInit() (fd int, err error) {
-       r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0)
-       fd = int(r0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
 func Ioperm(from int, num int, on int) (err error) {
        _, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on))
        if e1 != 0 {
@@ -566,14 +524,3 @@ func utimes(path string, times *[2]Timeval) (err error) {
        }
        return
 }
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
-       r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
-       n = int(r0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
index 9919d8486d41b95ba98830c3b4ce1feb35f7fec4..fa7d3dbe4e94d5ec4912d851cb2acee633c52473 100644 (file)
@@ -46,27 +46,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func dup2(oldfd int, newfd int) (err error) {
-       _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate(size int) (fd int, err error) {
-       r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
-       fd = int(r0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
 func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
        var _p0 unsafe.Pointer
        if len(events) > 0 {
@@ -191,17 +170,6 @@ func Getuid() (uid int) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func inotifyInit() (fd int, err error) {
-       r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0)
-       fd = int(r0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
 func Ioperm(from int, num int, on int) (err error) {
        _, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on))
        if e1 != 0 {
@@ -711,27 +679,6 @@ func utimes(path string, times *[2]Timeval) (err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func pipe(p *[2]_C_int) (err error) {
-       _, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
-       r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
-       n = int(r0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
 func kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error) {
        var _p0 *byte
        _p0, err = BytePtrFromString(cmdline)
index 076754d48d1d8fa194ce1ad0c41d45b1e79f45ad..654f91530f6950860dfdbbc443cf0fa4111c38ea 100644 (file)
@@ -46,16 +46,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func pipe(p *[2]_C_int) (err error) {
-       _, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
 func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
        r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
        fd = int(r0)
@@ -235,27 +225,6 @@ func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func dup2(oldfd int, newfd int) (err error) {
-       _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate(size int) (fd int, err error) {
-       r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
-       fd = int(r0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
 func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
        var _p0 unsafe.Pointer
        if len(events) > 0 {
@@ -340,17 +309,6 @@ func Getuid() (uid int) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func InotifyInit() (fd int, err error) {
-       r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0)
-       fd = int(r0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
 func Lchown(path string, uid int, gid int) (err error) {
        var _p0 *byte
        _p0, err = BytePtrFromString(path)
@@ -681,17 +639,6 @@ func setrlimit(resource int, rlim *rlimit32) (err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
-       r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
-       n = int(r0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
 func armSyncFileRange(fd int, flags int, off int64, n int64) (err error) {
        _, _, e1 := Syscall6(SYS_ARM_SYNC_FILE_RANGE, uintptr(fd), uintptr(flags), uintptr(off), uintptr(off>>32), uintptr(n), uintptr(n>>32))
        if e1 != 0 {
index 4703cf3c3385b8d58531e908eaa2da0c5c98e6af..6d1552885314b402c1462928dfa6b2de62eb2bb0 100644 (file)
@@ -46,27 +46,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func dup2(oldfd int, newfd int) (err error) {
-       _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate(size int) (fd int, err error) {
-       r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
-       fd = int(r0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
 func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
        var _p0 unsafe.Pointer
        if len(events) > 0 {
@@ -544,17 +523,6 @@ func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func InotifyInit() (fd int, err error) {
-       r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0)
-       fd = int(r0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
 func Ioperm(from int, num int, on int) (err error) {
        _, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on))
        if e1 != 0 {
@@ -706,18 +674,6 @@ func Pause() (err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func pipe() (p1 int, p2 int, err error) {
-       r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
-       p1 = int(r0)
-       p2 = int(r1)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
 func mmap2(addr uintptr, length uintptr, prot int, flags int, fd int, pageOffset uintptr) (xaddr uintptr, err error) {
        r0, _, e1 := Syscall6(SYS_MMAP2, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(pageOffset))
        xaddr = uintptr(r0)
@@ -746,14 +702,3 @@ func setrlimit(resource int, rlim *rlimit32) (err error) {
        }
        return
 }
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
-       r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
-       n = int(r0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
index a134f9a4d2e06bd3416b247cb9c3a0138204840a..1e20d72df21ec3a4e57d272f9c57ace9ee495c29 100644 (file)
@@ -46,27 +46,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func dup2(oldfd int, newfd int) (err error) {
-       _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate(size int) (fd int, err error) {
-       r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
-       fd = int(r0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
 func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
        var _p0 unsafe.Pointer
        if len(events) > 0 {
@@ -717,14 +696,3 @@ func stat(path string, st *stat_t) (err error) {
        }
        return
 }
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
-       r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
-       n = int(r0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
index b1fff2d946a225f91ffeacebfcebe78f6d34559a..82b5e2d9eda459f5f669f442b2cd948b41bd0f9b 100644 (file)
@@ -46,27 +46,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func dup2(oldfd int, newfd int) (err error) {
-       _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate(size int) (fd int, err error) {
-       r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
-       fd = int(r0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
 func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
        var _p0 unsafe.Pointer
        if len(events) > 0 {
@@ -717,14 +696,3 @@ func stat(path string, st *stat_t) (err error) {
        }
        return
 }
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
-       r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
-       n = int(r0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
index d13d6da01ef899f932f2cd1f4d33de6a3e124e3a..a0440c1d43be3b9757038590a819bc9dfa6f85f4 100644 (file)
@@ -46,27 +46,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func dup2(oldfd int, newfd int) (err error) {
-       _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate(size int) (fd int, err error) {
-       r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
-       fd = int(r0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
 func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
        var _p0 unsafe.Pointer
        if len(events) > 0 {
@@ -544,17 +523,6 @@ func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func InotifyInit() (fd int, err error) {
-       r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0)
-       fd = int(r0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
 func Ioperm(from int, num int, on int) (err error) {
        _, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on))
        if e1 != 0 {
@@ -706,18 +674,6 @@ func Pause() (err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func pipe() (p1 int, p2 int, err error) {
-       r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
-       p1 = int(r0)
-       p2 = int(r1)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
 func mmap2(addr uintptr, length uintptr, prot int, flags int, fd int, pageOffset uintptr) (xaddr uintptr, err error) {
        r0, _, e1 := Syscall6(SYS_MMAP2, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(pageOffset))
        xaddr = uintptr(r0)
@@ -746,14 +702,3 @@ func setrlimit(resource int, rlim *rlimit32) (err error) {
        }
        return
 }
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
-       r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
-       n = int(r0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
index 927cf1a00f0d72b6a8b6b2fc7c18c8a6bf7a1f9e..5864b9ca64903564e0122568d12beff0760b19e8 100644 (file)
@@ -46,27 +46,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func dup2(oldfd int, newfd int) (err error) {
-       _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate(size int) (fd int, err error) {
-       r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
-       fd = int(r0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
 func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
        var _p0 unsafe.Pointer
        if len(events) > 0 {
@@ -161,17 +140,6 @@ func Getuid() (uid int) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func InotifyInit() (fd int, err error) {
-       r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0)
-       fd = int(r0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
 func Ioperm(from int, num int, on int) (err error) {
        _, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on))
        if e1 != 0 {
@@ -717,27 +685,6 @@ func setrlimit(resource int, rlim *rlimit32) (err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func pipe(p *[2]_C_int) (err error) {
-       _, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
-       r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
-       n = int(r0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
 func syncFileRange2(fd int, flags int, off int64, n int64) (err error) {
        _, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE2, uintptr(fd), uintptr(flags), uintptr(off>>32), uintptr(off), uintptr(n>>32), uintptr(n))
        if e1 != 0 {
index da8ec0396665bdae6808bac03e444691d9d0b950..beeb49e34217a8623d54fb97c96ad0ceaee09c4b 100644 (file)
@@ -46,27 +46,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func dup2(oldfd int, newfd int) (err error) {
-       _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate(size int) (fd int, err error) {
-       r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
-       fd = int(r0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
 func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
        var _p0 unsafe.Pointer
        if len(events) > 0 {
@@ -191,17 +170,6 @@ func Getuid() (uid int) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func InotifyInit() (fd int, err error) {
-       r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0)
-       fd = int(r0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
 func Ioperm(from int, num int, on int) (err error) {
        _, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on))
        if e1 != 0 {
@@ -763,27 +731,6 @@ func utimes(path string, times *[2]Timeval) (err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func pipe(p *[2]_C_int) (err error) {
-       _, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
-       r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
-       n = int(r0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
 func syncFileRange2(fd int, flags int, off int64, n int64) (err error) {
        _, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE2, uintptr(fd), uintptr(flags), uintptr(off), uintptr(n), 0, 0)
        if e1 != 0 {
index 083f493bb6f473f1e8f7df4ae0d3f328c734d94c..53139b82c7be1a49e803ab9ff1697d099316c04d 100644 (file)
@@ -46,27 +46,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func dup2(oldfd int, newfd int) (err error) {
-       _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate(size int) (fd int, err error) {
-       r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
-       fd = int(r0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
 func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
        var _p0 unsafe.Pointer
        if len(events) > 0 {
@@ -191,17 +170,6 @@ func Getuid() (uid int) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func InotifyInit() (fd int, err error) {
-       r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0)
-       fd = int(r0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
 func Ioperm(from int, num int, on int) (err error) {
        _, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on))
        if e1 != 0 {
@@ -763,27 +731,6 @@ func utimes(path string, times *[2]Timeval) (err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func pipe(p *[2]_C_int) (err error) {
-       _, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
-       r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
-       n = int(r0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
 func syncFileRange2(fd int, flags int, off int64, n int64) (err error) {
        _, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE2, uintptr(fd), uintptr(flags), uintptr(off), uintptr(n), 0, 0)
        if e1 != 0 {
index bb347407d3d476cb80148854ae30679c49aed5ea..202add37d10a544127ce0a5c6387204207e0a5a8 100644 (file)
@@ -46,27 +46,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func dup2(oldfd int, newfd int) (err error) {
-       _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate(size int) (fd int, err error) {
-       r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
-       fd = int(r0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
 func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
        var _p0 unsafe.Pointer
        if len(events) > 0 {
@@ -191,17 +170,6 @@ func Getuid() (uid int) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func InotifyInit() (fd int, err error) {
-       r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0)
-       fd = int(r0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
 func Lchown(path string, uid int, gid int) (err error) {
        var _p0 *byte
        _p0, err = BytePtrFromString(path)
@@ -553,17 +521,6 @@ func utimes(path string, times *[2]Timeval) (err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
-       r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
-       n = int(r0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
 func kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error) {
        var _p0 *byte
        _p0, err = BytePtrFromString(cmdline)
index 8edc517e1e65c0ea38b95acdfb38f8eee28390bc..2ab268c3435930fc51b6e5efe36b958845552ffe 100644 (file)
@@ -73,16 +73,6 @@ func Fadvise(fd int, offset int64, length int64, advice int) (err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func dup2(oldfd int, newfd int) (err error) {
-       _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
 func Fchown(fd int, uid int, gid int) (err error) {
        _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
        if e1 != 0 {
@@ -180,17 +170,6 @@ func Getuid() (uid int) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func InotifyInit() (fd int, err error) {
-       r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0)
-       fd = int(r0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
 func Lchown(path string, uid int, gid int) (err error) {
        var _p0 *byte
        _p0, err = BytePtrFromString(path)
@@ -718,24 +697,3 @@ func utimes(path string, times *[2]Timeval) (err error) {
        }
        return
 }
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pipe(p *[2]_C_int) (err error) {
-       _, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
-       r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
-       n = int(r0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
index 4c8dc0ba2e1f3ef5c0796eaf1281291e310c33e4..7efe5ccba331f20e8598e268c5d2a285d7712cdc 100644 (file)
@@ -209,6 +209,92 @@ type RawSockaddrCtl struct {
        Sc_reserved [5]uint32
 }
 
+type RawSockaddrVM struct {
+       Len       uint8
+       Family    uint8
+       Reserved1 uint16
+       Port      uint32
+       Cid       uint32
+}
+
+type XVSockPCB struct {
+       Xv_len           uint32
+       Xv_vsockpp       uint64
+       Xvp_local_cid    uint32
+       Xvp_local_port   uint32
+       Xvp_remote_cid   uint32
+       Xvp_remote_port  uint32
+       Xvp_rxcnt        uint32
+       Xvp_txcnt        uint32
+       Xvp_peer_rxhiwat uint32
+       Xvp_peer_rxcnt   uint32
+       Xvp_last_pid     int32
+       Xvp_gencnt       uint64
+       Xv_socket        XSocket
+       _                [4]byte
+}
+
+type XSocket struct {
+       Xso_len      uint32
+       Xso_so       uint32
+       So_type      int16
+       So_options   int16
+       So_linger    int16
+       So_state     int16
+       So_pcb       uint32
+       Xso_protocol int32
+       Xso_family   int32
+       So_qlen      int16
+       So_incqlen   int16
+       So_qlimit    int16
+       So_timeo     int16
+       So_error     uint16
+       So_pgid      int32
+       So_oobmark   uint32
+       So_rcv       XSockbuf
+       So_snd       XSockbuf
+       So_uid       uint32
+}
+
+type XSocket64 struct {
+       Xso_len      uint32
+       _            [8]byte
+       So_type      int16
+       So_options   int16
+       So_linger    int16
+       So_state     int16
+       _            [8]byte
+       Xso_protocol int32
+       Xso_family   int32
+       So_qlen      int16
+       So_incqlen   int16
+       So_qlimit    int16
+       So_timeo     int16
+       So_error     uint16
+       So_pgid      int32
+       So_oobmark   uint32
+       So_rcv       XSockbuf
+       So_snd       XSockbuf
+       So_uid       uint32
+}
+
+type XSockbuf struct {
+       Cc    uint32
+       Hiwat uint32
+       Mbcnt uint32
+       Mbmax uint32
+       Lowat int32
+       Flags int16
+       Timeo int16
+}
+
+type XVSockPgen struct {
+       Len   uint32
+       Count uint64
+       Gen   uint64
+       Sogen uint64
+}
+
 type _Socklen uint32
 
 type Xucred struct {
@@ -287,6 +373,11 @@ const (
        SizeofSockaddrUnix     = 0x6a
        SizeofSockaddrDatalink = 0x14
        SizeofSockaddrCtl      = 0x20
+       SizeofSockaddrVM       = 0xc
+       SizeofXvsockpcb        = 0xa8
+       SizeofXSocket          = 0x64
+       SizeofXSockbuf         = 0x18
+       SizeofXVSockPgen       = 0x20
        SizeofXucred           = 0x4c
        SizeofLinger           = 0x8
        SizeofIovec            = 0x10
@@ -639,3 +730,39 @@ type Ucred struct {
        Ngroups int16
        Groups  [16]uint32
 }
+
+type SysvIpcPerm struct {
+       Uid  uint32
+       Gid  uint32
+       Cuid uint32
+       Cgid uint32
+       Mode uint16
+       _    uint16
+       _    int32
+}
+type SysvShmDesc struct {
+       Perm   SysvIpcPerm
+       Segsz  uint64
+       Lpid   int32
+       Cpid   int32
+       Nattch uint16
+       _      [34]byte
+}
+
+const (
+       IPC_CREAT   = 0x200
+       IPC_EXCL    = 0x400
+       IPC_NOWAIT  = 0x800
+       IPC_PRIVATE = 0x0
+)
+
+const (
+       IPC_RMID = 0x0
+       IPC_SET  = 0x1
+       IPC_STAT = 0x2
+)
+
+const (
+       SHM_RDONLY = 0x1000
+       SHM_RND    = 0x2000
+)
index 96f0e6ae2a2a483f7447f6498ae4961eefeb7390..b23a2efe81b8262ed092a9587c1aaa51ad0af56c 100644 (file)
@@ -209,6 +209,92 @@ type RawSockaddrCtl struct {
        Sc_reserved [5]uint32
 }
 
+type RawSockaddrVM struct {
+       Len       uint8
+       Family    uint8
+       Reserved1 uint16
+       Port      uint32
+       Cid       uint32
+}
+
+type XVSockPCB struct {
+       Xv_len           uint32
+       Xv_vsockpp       uint64
+       Xvp_local_cid    uint32
+       Xvp_local_port   uint32
+       Xvp_remote_cid   uint32
+       Xvp_remote_port  uint32
+       Xvp_rxcnt        uint32
+       Xvp_txcnt        uint32
+       Xvp_peer_rxhiwat uint32
+       Xvp_peer_rxcnt   uint32
+       Xvp_last_pid     int32
+       Xvp_gencnt       uint64
+       Xv_socket        XSocket
+       _                [4]byte
+}
+
+type XSocket struct {
+       Xso_len      uint32
+       Xso_so       uint32
+       So_type      int16
+       So_options   int16
+       So_linger    int16
+       So_state     int16
+       So_pcb       uint32
+       Xso_protocol int32
+       Xso_family   int32
+       So_qlen      int16
+       So_incqlen   int16
+       So_qlimit    int16
+       So_timeo     int16
+       So_error     uint16
+       So_pgid      int32
+       So_oobmark   uint32
+       So_rcv       XSockbuf
+       So_snd       XSockbuf
+       So_uid       uint32
+}
+
+type XSocket64 struct {
+       Xso_len      uint32
+       _            [8]byte
+       So_type      int16
+       So_options   int16
+       So_linger    int16
+       So_state     int16
+       _            [8]byte
+       Xso_protocol int32
+       Xso_family   int32
+       So_qlen      int16
+       So_incqlen   int16
+       So_qlimit    int16
+       So_timeo     int16
+       So_error     uint16
+       So_pgid      int32
+       So_oobmark   uint32
+       So_rcv       XSockbuf
+       So_snd       XSockbuf
+       So_uid       uint32
+}
+
+type XSockbuf struct {
+       Cc    uint32
+       Hiwat uint32
+       Mbcnt uint32
+       Mbmax uint32
+       Lowat int32
+       Flags int16
+       Timeo int16
+}
+
+type XVSockPgen struct {
+       Len   uint32
+       Count uint64
+       Gen   uint64
+       Sogen uint64
+}
+
 type _Socklen uint32
 
 type Xucred struct {
@@ -287,6 +373,11 @@ const (
        SizeofSockaddrUnix     = 0x6a
        SizeofSockaddrDatalink = 0x14
        SizeofSockaddrCtl      = 0x20
+       SizeofSockaddrVM       = 0xc
+       SizeofXvsockpcb        = 0xa8
+       SizeofXSocket          = 0x64
+       SizeofXSockbuf         = 0x18
+       SizeofXVSockPgen       = 0x20
        SizeofXucred           = 0x4c
        SizeofLinger           = 0x8
        SizeofIovec            = 0x10
@@ -639,3 +730,39 @@ type Ucred struct {
        Ngroups int16
        Groups  [16]uint32
 }
+
+type SysvIpcPerm struct {
+       Uid  uint32
+       Gid  uint32
+       Cuid uint32
+       Cgid uint32
+       Mode uint16
+       _    uint16
+       _    int32
+}
+type SysvShmDesc struct {
+       Perm   SysvIpcPerm
+       Segsz  uint64
+       Lpid   int32
+       Cpid   int32
+       Nattch uint16
+       _      [34]byte
+}
+
+const (
+       IPC_CREAT   = 0x200
+       IPC_EXCL    = 0x400
+       IPC_NOWAIT  = 0x800
+       IPC_PRIVATE = 0x0
+)
+
+const (
+       IPC_RMID = 0x0
+       IPC_SET  = 0x1
+       IPC_STAT = 0x2
+)
+
+const (
+       SHM_RDONLY = 0x1000
+       SHM_RND    = 0x2000
+)
index 1f99c024afd8ae0289bdcf543ff2d25cc4c1507b..4eec078e52490863cf2ce9f794afffcd71a453e6 100644 (file)
@@ -31,6 +31,8 @@ type Timeval struct {
        Usec int32
 }
 
+type Time_t int32
+
 type Rusage struct {
        Utime    Timeval
        Stime    Timeval
index ddf0305a5d1056764f093b3b509152f2a0439fbe..7622904a532f45f8ef0eb7d37c4dcad01fee1310 100644 (file)
@@ -31,6 +31,8 @@ type Timeval struct {
        Usec int64
 }
 
+type Time_t int64
+
 type Rusage struct {
        Utime    Timeval
        Stime    Timeval
index dce0a5c80c57b712c23c3f129046048f4fd7473b..19223ce8ecf906522e85e2c5f466f6d041897436 100644 (file)
@@ -33,6 +33,8 @@ type Timeval struct {
        _    [4]byte
 }
 
+type Time_t int32
+
 type Rusage struct {
        Utime    Timeval
        Stime    Timeval
index e232447025e682f60763bf41b41e133f69bbad7c..8e3e33f6790587e60208a6cf5f804f8005820320 100644 (file)
@@ -31,6 +31,8 @@ type Timeval struct {
        Usec int64
 }
 
+type Time_t int64
+
 type Rusage struct {
        Utime    Timeval
        Stime    Timeval
index 236f37ef6f7ec7f5b3f587321dc2445e05c9bed1..4c485261d6dfd9e6822090db517e29f9cad07318 100644 (file)
@@ -13,6 +13,8 @@ const (
        I_STR     = 0x5308
        I_POP     = 0x5303
        I_PUSH    = 0x5302
+       I_LINK    = 0x530c
+       I_UNLINK  = 0x530d
        I_PLINK   = 0x5316
        I_PUNLINK = 0x5317
 
index 4b73bb3b6386a184ff24b128af5739b1bd95f093..249ecfcd4cc66a75945707b69a2d3ad39a407395 100644 (file)
@@ -3923,3 +3923,36 @@ const (
        NFC_SDP_ATTR_URI                  = 0x1
        NFC_SDP_ATTR_SAP                  = 0x2
 )
+
+type LandlockRulesetAttr struct {
+       Access_fs uint64
+}
+
+type LandlockPathBeneathAttr struct {
+       Allowed_access uint64
+       Parent_fd      int32
+}
+
+const (
+       LANDLOCK_RULE_PATH_BENEATH = 0x1
+)
+
+const (
+       IPC_CREAT   = 0x200
+       IPC_EXCL    = 0x400
+       IPC_NOWAIT  = 0x800
+       IPC_PRIVATE = 0x0
+
+       ipc_64 = 0x100
+)
+
+const (
+       IPC_RMID = 0x0
+       IPC_SET  = 0x1
+       IPC_STAT = 0x2
+)
+
+const (
+       SHM_RDONLY = 0x1000
+       SHM_RND    = 0x2000
+)
index 72f2e96f32da730cfd312cdc6d0609ec1de8c194..eeeb9aa39ac1c70a1da365dd41ef2e0bf01a674a 100644 (file)
@@ -635,3 +635,36 @@ const (
        PPS_GETCAP    = 0x800470a3
        PPS_FETCH     = 0xc00470a4
 )
+
+const (
+       PIDFD_NONBLOCK = 0x800
+)
+
+type SysvIpcPerm struct {
+       Key  int32
+       Uid  uint32
+       Gid  uint32
+       Cuid uint32
+       Cgid uint32
+       Mode uint16
+       _    [2]uint8
+       Seq  uint16
+       _    uint16
+       _    uint32
+       _    uint32
+}
+type SysvShmDesc struct {
+       Perm       SysvIpcPerm
+       Segsz      uint32
+       Atime      uint32
+       Atime_high uint32
+       Dtime      uint32
+       Dtime_high uint32
+       Ctime      uint32
+       Ctime_high uint32
+       Cpid       int32
+       Lpid       int32
+       Nattch     uint32
+       _          uint32
+       _          uint32
+}
index d5f018d13dfe2ff233a56a5e06c46230d407e0ca..d30e1155cc0685b513ee87dc320d0feb96b2b259 100644 (file)
@@ -653,3 +653,33 @@ const (
        PPS_GETCAP    = 0x800870a3
        PPS_FETCH     = 0xc00870a4
 )
+
+const (
+       PIDFD_NONBLOCK = 0x800
+)
+
+type SysvIpcPerm struct {
+       Key  int32
+       Uid  uint32
+       Gid  uint32
+       Cuid uint32
+       Cgid uint32
+       Mode uint32
+       _    [0]uint8
+       Seq  uint16
+       _    uint16
+       _    uint64
+       _    uint64
+}
+type SysvShmDesc struct {
+       Perm   SysvIpcPerm
+       Segsz  uint64
+       Atime  int64
+       Dtime  int64
+       Ctime  int64
+       Cpid   int32
+       Lpid   int32
+       Nattch uint64
+       _      uint64
+       _      uint64
+}
index 675446d936c52b99fca83c1a71d702a3c2ac041e..69d0297520c4ee046dbaf3ffd053e575c575b55e 100644 (file)
@@ -630,3 +630,36 @@ const (
        PPS_GETCAP    = 0x800470a3
        PPS_FETCH     = 0xc00470a4
 )
+
+const (
+       PIDFD_NONBLOCK = 0x800
+)
+
+type SysvIpcPerm struct {
+       Key  int32
+       Uid  uint32
+       Gid  uint32
+       Cuid uint32
+       Cgid uint32
+       Mode uint16
+       _    [2]uint8
+       Seq  uint16
+       _    uint16
+       _    uint32
+       _    uint32
+}
+type SysvShmDesc struct {
+       Perm       SysvIpcPerm
+       Segsz      uint32
+       Atime      uint32
+       Atime_high uint32
+       Dtime      uint32
+       Dtime_high uint32
+       Ctime      uint32
+       Ctime_high uint32
+       Cpid       int32
+       Lpid       int32
+       Nattch     uint32
+       _          uint32
+       _          uint32
+}
index 711d0711cdfa0a65b1b634347bb10edfa1da2e36..28a0455bc9d60c396b2a2dafe7720da6e6cb4a08 100644 (file)
@@ -632,3 +632,33 @@ const (
        PPS_GETCAP    = 0x800870a3
        PPS_FETCH     = 0xc00870a4
 )
+
+const (
+       PIDFD_NONBLOCK = 0x800
+)
+
+type SysvIpcPerm struct {
+       Key  int32
+       Uid  uint32
+       Gid  uint32
+       Cuid uint32
+       Cgid uint32
+       Mode uint32
+       _    [0]uint8
+       Seq  uint16
+       _    uint16
+       _    uint64
+       _    uint64
+}
+type SysvShmDesc struct {
+       Perm   SysvIpcPerm
+       Segsz  uint64
+       Atime  int64
+       Dtime  int64
+       Ctime  int64
+       Cpid   int32
+       Lpid   int32
+       Nattch uint64
+       _      uint64
+       _      uint64
+}
index c1131c741144c6029aca4895f2747c008f43d1c2..64a845483db2e22ad97a1214459fe2b0c8ef2ba3 100644 (file)
@@ -636,3 +636,35 @@ const (
        PPS_GETCAP    = 0x400470a3
        PPS_FETCH     = 0xc00470a4
 )
+
+const (
+       PIDFD_NONBLOCK = 0x80
+)
+
+type SysvIpcPerm struct {
+       Key  int32
+       Uid  uint32
+       Gid  uint32
+       Cuid uint32
+       Cgid uint32
+       Mode uint32
+       _    [0]uint8
+       Seq  uint16
+       _    uint16
+       _    uint32
+       _    uint32
+}
+type SysvShmDesc struct {
+       Perm       SysvIpcPerm
+       Segsz      uint32
+       Atime      uint32
+       Dtime      uint32
+       Ctime      uint32
+       Cpid       int32
+       Lpid       int32
+       Nattch     uint32
+       Atime_high uint16
+       Dtime_high uint16
+       Ctime_high uint16
+       _          uint16
+}
index 91d5574ff9d336ba0c6b8db0f4e1a3cc042a918f..a1b7dee4123d9836dfa8c1490134b4a7c24c5650 100644 (file)
@@ -635,3 +635,33 @@ const (
        PPS_GETCAP    = 0x400870a3
        PPS_FETCH     = 0xc00870a4
 )
+
+const (
+       PIDFD_NONBLOCK = 0x80
+)
+
+type SysvIpcPerm struct {
+       Key  int32
+       Uid  uint32
+       Gid  uint32
+       Cuid uint32
+       Cgid uint32
+       Mode uint32
+       _    [0]uint8
+       Seq  uint16
+       _    uint16
+       _    uint64
+       _    uint64
+}
+type SysvShmDesc struct {
+       Perm   SysvIpcPerm
+       Segsz  uint64
+       Atime  int64
+       Dtime  int64
+       Ctime  int64
+       Cpid   int32
+       Lpid   int32
+       Nattch uint64
+       _      uint64
+       _      uint64
+}
index 5d721497b7c63a9a313cf22c08ecb1723307cbce..936fa6a266f1abb0bf192e806250fdadcc3d8095 100644 (file)
@@ -635,3 +635,33 @@ const (
        PPS_GETCAP    = 0x400870a3
        PPS_FETCH     = 0xc00870a4
 )
+
+const (
+       PIDFD_NONBLOCK = 0x80
+)
+
+type SysvIpcPerm struct {
+       Key  int32
+       Uid  uint32
+       Gid  uint32
+       Cuid uint32
+       Cgid uint32
+       Mode uint32
+       _    [0]uint8
+       Seq  uint16
+       _    uint16
+       _    uint64
+       _    uint64
+}
+type SysvShmDesc struct {
+       Perm   SysvIpcPerm
+       Segsz  uint64
+       Atime  int64
+       Dtime  int64
+       Ctime  int64
+       Cpid   int32
+       Lpid   int32
+       Nattch uint64
+       _      uint64
+       _      uint64
+}
index a5addd06aa1e2c0128d603cb0123f390655daac4..5dd546fbf0790b126d3bb0a81a062a8e48a397d9 100644 (file)
@@ -636,3 +636,35 @@ const (
        PPS_GETCAP    = 0x400470a3
        PPS_FETCH     = 0xc00470a4
 )
+
+const (
+       PIDFD_NONBLOCK = 0x80
+)
+
+type SysvIpcPerm struct {
+       Key  int32
+       Uid  uint32
+       Gid  uint32
+       Cuid uint32
+       Cgid uint32
+       Mode uint32
+       _    [0]uint8
+       Seq  uint16
+       _    uint16
+       _    uint32
+       _    uint32
+}
+type SysvShmDesc struct {
+       Perm       SysvIpcPerm
+       Segsz      uint32
+       Atime      uint32
+       Dtime      uint32
+       Ctime      uint32
+       Cpid       int32
+       Lpid       int32
+       Nattch     uint32
+       Atime_high uint16
+       Dtime_high uint16
+       Ctime_high uint16
+       _          uint16
+}
index bb6b03dfcbc509043a05f52c71ce41a609a533b6..947b32e434b05c73dc799558be8496b808ab4011 100644 (file)
@@ -642,3 +642,37 @@ const (
        PPS_GETCAP    = 0x400470a3
        PPS_FETCH     = 0xc00470a4
 )
+
+const (
+       PIDFD_NONBLOCK = 0x800
+)
+
+type SysvIpcPerm struct {
+       Key  int32
+       Uid  uint32
+       Gid  uint32
+       Cuid uint32
+       Cgid uint32
+       Mode uint32
+       Seq  uint32
+       _    uint32
+       _    uint64
+       _    uint64
+}
+type SysvShmDesc struct {
+       Perm       SysvIpcPerm
+       Atime_high uint32
+       Atime      uint32
+       Dtime_high uint32
+       Dtime      uint32
+       Ctime_high uint32
+       Ctime      uint32
+       _          uint32
+       Segsz      uint32
+       Cpid       int32
+       Lpid       int32
+       Nattch     uint32
+       _          uint32
+       _          uint32
+       _          [4]byte
+}
index 7637243b7b807963e4f73c79cd85626a49c36ded..2a606151b0c8d6086f1824c382903089c8397622 100644 (file)
@@ -642,3 +642,32 @@ const (
        PPS_GETCAP    = 0x400870a3
        PPS_FETCH     = 0xc00870a4
 )
+
+const (
+       PIDFD_NONBLOCK = 0x800
+)
+
+type SysvIpcPerm struct {
+       Key  int32
+       Uid  uint32
+       Gid  uint32
+       Cuid uint32
+       Cgid uint32
+       Mode uint32
+       Seq  uint32
+       _    uint32
+       _    uint64
+       _    uint64
+}
+type SysvShmDesc struct {
+       Perm   SysvIpcPerm
+       Atime  int64
+       Dtime  int64
+       Ctime  int64
+       Segsz  uint64
+       Cpid   int32
+       Lpid   int32
+       Nattch uint64
+       _      uint64
+       _      uint64
+}
index a1a28e525f3434b825f414cb8c1ec0286eb8f7a7..d0d735d02cd8eacda1b4ea2295f3c9cc29559e6a 100644 (file)
@@ -642,3 +642,32 @@ const (
        PPS_GETCAP    = 0x400870a3
        PPS_FETCH     = 0xc00870a4
 )
+
+const (
+       PIDFD_NONBLOCK = 0x800
+)
+
+type SysvIpcPerm struct {
+       Key  int32
+       Uid  uint32
+       Gid  uint32
+       Cuid uint32
+       Cgid uint32
+       Mode uint32
+       Seq  uint32
+       _    uint32
+       _    uint64
+       _    uint64
+}
+type SysvShmDesc struct {
+       Perm   SysvIpcPerm
+       Atime  int64
+       Dtime  int64
+       Ctime  int64
+       Segsz  uint64
+       Cpid   int32
+       Lpid   int32
+       Nattch uint64
+       _      uint64
+       _      uint64
+}
index e0a8a13622790102ca390f4b43031e34d45c1e26..95e3d6d06fcac198ff1ed5b45bc72575d717f064 100644 (file)
@@ -660,3 +660,33 @@ const (
        PPS_GETCAP    = 0x800870a3
        PPS_FETCH     = 0xc00870a4
 )
+
+const (
+       PIDFD_NONBLOCK = 0x800
+)
+
+type SysvIpcPerm struct {
+       Key  int32
+       Uid  uint32
+       Gid  uint32
+       Cuid uint32
+       Cgid uint32
+       Mode uint32
+       _    [0]uint8
+       Seq  uint16
+       _    uint16
+       _    uint64
+       _    uint64
+}
+type SysvShmDesc struct {
+       Perm   SysvIpcPerm
+       Segsz  uint64
+       Atime  int64
+       Dtime  int64
+       Ctime  int64
+       Cpid   int32
+       Lpid   int32
+       Nattch uint64
+       _      uint64
+       _      uint64
+}
index 21d6e56c705bd4a98421791ea0bbf41dcbe6c73d..cccf1ef26a65673ed81ba8242dc99b6f0ac25d3b 100644 (file)
@@ -656,3 +656,32 @@ const (
        PPS_GETCAP    = 0x800870a3
        PPS_FETCH     = 0xc00870a4
 )
+
+const (
+       PIDFD_NONBLOCK = 0x800
+)
+
+type SysvIpcPerm struct {
+       Key  int32
+       Uid  uint32
+       Gid  uint32
+       Cuid uint32
+       Cgid uint32
+       Mode uint32
+       _    uint16
+       Seq  uint16
+       _    uint64
+       _    uint64
+}
+type SysvShmDesc struct {
+       Perm   SysvIpcPerm
+       Segsz  uint64
+       Atime  int64
+       Dtime  int64
+       Ctime  int64
+       Cpid   int32
+       Lpid   int32
+       Nattch uint64
+       _      uint64
+       _      uint64
+}
index 0531e98f64303e19d9eccc400974f79eae5a14ae..44fcbe4e9a1baaa4f1d330fa6664dfd9294251cc 100644 (file)
@@ -637,3 +637,32 @@ const (
        PPS_GETCAP    = 0x400870a3
        PPS_FETCH     = 0xc00870a4
 )
+
+const (
+       PIDFD_NONBLOCK = 0x4000
+)
+
+type SysvIpcPerm struct {
+       Key  int32
+       Uid  uint32
+       Gid  uint32
+       Cuid uint32
+       Cgid uint32
+       Mode uint32
+       _    uint16
+       Seq  uint16
+       _    uint64
+       _    uint64
+}
+type SysvShmDesc struct {
+       Perm   SysvIpcPerm
+       Atime  int64
+       Dtime  int64
+       Ctime  int64
+       Segsz  uint64
+       Cpid   int32
+       Lpid   int32
+       Nattch uint64
+       _      uint64
+       _      uint64
+}
index 1adb60739a34b9b22284602d4117b8b0882824b7..6dc0920a84da2ab53810713043af3254cac6dc55 100644 (file)
@@ -35,3 +35,14 @@ const (
        QUOTA_LIMITS_HARDWS_MAX_DISABLE = 0x00000008
        QUOTA_LIMITS_HARDWS_MAX_ENABLE  = 0x00000004
 )
+
+type MemoryBasicInformation struct {
+       BaseAddress       uintptr
+       AllocationBase    uintptr
+       AllocationProtect uint32
+       PartitionId       uint16
+       RegionSize        uintptr
+       State             uint32
+       Protect           uint32
+       Type              uint32
+}
index 1215b2ae20972212fa6fa97442da4088abbcae85..d3b59ae69cd3c2b0e751cda12d2ffa899cd1eea7 100644 (file)
@@ -274,6 +274,11 @@ func NewCallbackCDecl(fn interface{}) uintptr {
 //sys  VirtualAlloc(address uintptr, size uintptr, alloctype uint32, protect uint32) (value uintptr, err error) = kernel32.VirtualAlloc
 //sys  VirtualFree(address uintptr, size uintptr, freetype uint32) (err error) = kernel32.VirtualFree
 //sys  VirtualProtect(address uintptr, size uintptr, newprotect uint32, oldprotect *uint32) (err error) = kernel32.VirtualProtect
+//sys  VirtualProtectEx(process Handle, address uintptr, size uintptr, newProtect uint32, oldProtect *uint32) (err error) = kernel32.VirtualProtectEx
+//sys  VirtualQuery(address uintptr, buffer *MemoryBasicInformation, length uintptr) (err error) = kernel32.VirtualQuery
+//sys  VirtualQueryEx(process Handle, address uintptr, buffer *MemoryBasicInformation, length uintptr) (err error) = kernel32.VirtualQueryEx
+//sys  ReadProcessMemory(process Handle, baseAddress uintptr, buffer *byte, size uintptr, numberOfBytesRead *uintptr) (err error) = kernel32.ReadProcessMemory
+//sys  WriteProcessMemory(process Handle, baseAddress uintptr, buffer *byte, size uintptr, numberOfBytesWritten *uintptr) (err error) = kernel32.WriteProcessMemory
 //sys  TransmitFile(s Handle, handle Handle, bytesToWrite uint32, bytsPerSend uint32, overlapped *Overlapped, transmitFileBuf *TransmitFileBuffers, flags uint32) (err error) = mswsock.TransmitFile
 //sys  ReadDirectoryChanges(handle Handle, buf *byte, buflen uint32, watchSubTree bool, mask uint32, retlen *uint32, overlapped *Overlapped, completionRoutine uintptr) (err error) = kernel32.ReadDirectoryChangesW
 //sys  FindFirstChangeNotification(path string, watchSubtree bool, notifyFilter uint32) (handle Handle, err error) [failretval==InvalidHandle] = kernel32.FindFirstChangeNotificationW
@@ -398,6 +403,11 @@ func NewCallbackCDecl(fn interface{}) uintptr {
 
 // Process Status API (PSAPI)
 //sys  EnumProcesses(processIds []uint32, bytesReturned *uint32) (err error) = psapi.EnumProcesses
+//sys  EnumProcessModules(process Handle, module *Handle, cb uint32, cbNeeded *uint32) (err error) = psapi.EnumProcessModules
+//sys  EnumProcessModulesEx(process Handle, module *Handle, cb uint32, cbNeeded *uint32, filterFlag uint32) (err error) = psapi.EnumProcessModulesEx
+//sys  GetModuleInformation(process Handle, module Handle, modinfo *ModuleInfo, cb uint32) (err error) = psapi.GetModuleInformation
+//sys  GetModuleFileNameEx(process Handle, module Handle, filename *uint16, size uint32) (err error) = psapi.GetModuleFileNameExW
+//sys  GetModuleBaseName(process Handle, module Handle, baseName *uint16, size uint32) (err error) = psapi.GetModuleBaseNameW
 
 // NT Native APIs
 //sys  rtlNtStatusToDosErrorNoTeb(ntstatus NTStatus) (ret syscall.Errno) = ntdll.RtlNtStatusToDosErrorNoTeb
index 17f03312df1c07c9b1f9cdabc090b9046c5dfd7c..88e0ce5d0db6c73e49b2ad94884747fd97aa5751 100644 (file)
@@ -242,6 +242,14 @@ const (
        TH32CS_INHERIT      = 0x80000000
 )
 
+const (
+       // flags for EnumProcessModulesEx
+       LIST_MODULES_32BIT   = 0x01
+       LIST_MODULES_64BIT   = 0x02
+       LIST_MODULES_ALL     = 0x03
+       LIST_MODULES_DEFAULT = 0x00
+)
+
 const (
        // filters for ReadDirectoryChangesW and FindFirstChangeNotificationW
        FILE_NOTIFY_CHANGE_FILE_NAME   = 0x001
@@ -2773,3 +2781,9 @@ const (
 
 // Flag for QueryFullProcessImageName.
 const PROCESS_NAME_NATIVE = 1
+
+type ModuleInfo struct {
+       BaseOfDll   uintptr
+       SizeOfImage uint32
+       EntryPoint  uintptr
+}
index 2083ec376e9d8551baae2213b53f115e981dd568..4ea788e4c415bb424943c8864c9645c1ab2d7435 100644 (file)
@@ -303,6 +303,7 @@ var (
        procReadConsoleW                                         = modkernel32.NewProc("ReadConsoleW")
        procReadDirectoryChangesW                                = modkernel32.NewProc("ReadDirectoryChangesW")
        procReadFile                                             = modkernel32.NewProc("ReadFile")
+       procReadProcessMemory                                    = modkernel32.NewProc("ReadProcessMemory")
        procReleaseMutex                                         = modkernel32.NewProc("ReleaseMutex")
        procRemoveDirectoryW                                     = modkernel32.NewProc("RemoveDirectoryW")
        procResetEvent                                           = modkernel32.NewProc("ResetEvent")
@@ -345,12 +346,16 @@ var (
        procVirtualFree                                          = modkernel32.NewProc("VirtualFree")
        procVirtualLock                                          = modkernel32.NewProc("VirtualLock")
        procVirtualProtect                                       = modkernel32.NewProc("VirtualProtect")
+       procVirtualProtectEx                                     = modkernel32.NewProc("VirtualProtectEx")
+       procVirtualQuery                                         = modkernel32.NewProc("VirtualQuery")
+       procVirtualQueryEx                                       = modkernel32.NewProc("VirtualQueryEx")
        procVirtualUnlock                                        = modkernel32.NewProc("VirtualUnlock")
        procWTSGetActiveConsoleSessionId                         = modkernel32.NewProc("WTSGetActiveConsoleSessionId")
        procWaitForMultipleObjects                               = modkernel32.NewProc("WaitForMultipleObjects")
        procWaitForSingleObject                                  = modkernel32.NewProc("WaitForSingleObject")
        procWriteConsoleW                                        = modkernel32.NewProc("WriteConsoleW")
        procWriteFile                                            = modkernel32.NewProc("WriteFile")
+       procWriteProcessMemory                                   = modkernel32.NewProc("WriteProcessMemory")
        procAcceptEx                                             = modmswsock.NewProc("AcceptEx")
        procGetAcceptExSockaddrs                                 = modmswsock.NewProc("GetAcceptExSockaddrs")
        procTransmitFile                                         = modmswsock.NewProc("TransmitFile")
@@ -377,7 +382,12 @@ var (
        procCoTaskMemFree                                        = modole32.NewProc("CoTaskMemFree")
        procCoUninitialize                                       = modole32.NewProc("CoUninitialize")
        procStringFromGUID2                                      = modole32.NewProc("StringFromGUID2")
+       procEnumProcessModules                                   = modpsapi.NewProc("EnumProcessModules")
+       procEnumProcessModulesEx                                 = modpsapi.NewProc("EnumProcessModulesEx")
        procEnumProcesses                                        = modpsapi.NewProc("EnumProcesses")
+       procGetModuleBaseNameW                                   = modpsapi.NewProc("GetModuleBaseNameW")
+       procGetModuleFileNameExW                                 = modpsapi.NewProc("GetModuleFileNameExW")
+       procGetModuleInformation                                 = modpsapi.NewProc("GetModuleInformation")
        procSubscribeServiceChangeNotifications                  = modsechost.NewProc("SubscribeServiceChangeNotifications")
        procUnsubscribeServiceChangeNotifications                = modsechost.NewProc("UnsubscribeServiceChangeNotifications")
        procGetUserNameExW                                       = modsecur32.NewProc("GetUserNameExW")
@@ -2631,6 +2641,14 @@ func ReadFile(handle Handle, buf []byte, done *uint32, overlapped *Overlapped) (
        return
 }
 
+func ReadProcessMemory(process Handle, baseAddress uintptr, buffer *byte, size uintptr, numberOfBytesRead *uintptr) (err error) {
+       r1, _, e1 := syscall.Syscall6(procReadProcessMemory.Addr(), 5, uintptr(process), uintptr(baseAddress), uintptr(unsafe.Pointer(buffer)), uintptr(size), uintptr(unsafe.Pointer(numberOfBytesRead)), 0)
+       if r1 == 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
 func ReleaseMutex(mutex Handle) (err error) {
        r1, _, e1 := syscall.Syscall(procReleaseMutex.Addr(), 1, uintptr(mutex), 0, 0)
        if r1 == 0 {
@@ -2985,6 +3003,30 @@ func VirtualProtect(address uintptr, size uintptr, newprotect uint32, oldprotect
        return
 }
 
+func VirtualProtectEx(process Handle, address uintptr, size uintptr, newProtect uint32, oldProtect *uint32) (err error) {
+       r1, _, e1 := syscall.Syscall6(procVirtualProtectEx.Addr(), 5, uintptr(process), uintptr(address), uintptr(size), uintptr(newProtect), uintptr(unsafe.Pointer(oldProtect)), 0)
+       if r1 == 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+func VirtualQuery(address uintptr, buffer *MemoryBasicInformation, length uintptr) (err error) {
+       r1, _, e1 := syscall.Syscall(procVirtualQuery.Addr(), 3, uintptr(address), uintptr(unsafe.Pointer(buffer)), uintptr(length))
+       if r1 == 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+func VirtualQueryEx(process Handle, address uintptr, buffer *MemoryBasicInformation, length uintptr) (err error) {
+       r1, _, e1 := syscall.Syscall6(procVirtualQueryEx.Addr(), 4, uintptr(process), uintptr(address), uintptr(unsafe.Pointer(buffer)), uintptr(length), 0, 0)
+       if r1 == 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
 func VirtualUnlock(addr uintptr, length uintptr) (err error) {
        r1, _, e1 := syscall.Syscall(procVirtualUnlock.Addr(), 2, uintptr(addr), uintptr(length), 0)
        if r1 == 0 {
@@ -3041,6 +3083,14 @@ func WriteFile(handle Handle, buf []byte, done *uint32, overlapped *Overlapped)
        return
 }
 
+func WriteProcessMemory(process Handle, baseAddress uintptr, buffer *byte, size uintptr, numberOfBytesWritten *uintptr) (err error) {
+       r1, _, e1 := syscall.Syscall6(procWriteProcessMemory.Addr(), 5, uintptr(process), uintptr(baseAddress), uintptr(unsafe.Pointer(buffer)), uintptr(size), uintptr(unsafe.Pointer(numberOfBytesWritten)), 0)
+       if r1 == 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
 func AcceptEx(ls Handle, as Handle, buf *byte, rxdatalen uint32, laddrlen uint32, raddrlen uint32, recvd *uint32, overlapped *Overlapped) (err error) {
        r1, _, e1 := syscall.Syscall9(procAcceptEx.Addr(), 8, uintptr(ls), uintptr(as), uintptr(unsafe.Pointer(buf)), uintptr(rxdatalen), uintptr(laddrlen), uintptr(raddrlen), uintptr(unsafe.Pointer(recvd)), uintptr(unsafe.Pointer(overlapped)), 0)
        if r1 == 0 {
@@ -3225,6 +3275,22 @@ func stringFromGUID2(rguid *GUID, lpsz *uint16, cchMax int32) (chars int32) {
        return
 }
 
+func EnumProcessModules(process Handle, module *Handle, cb uint32, cbNeeded *uint32) (err error) {
+       r1, _, e1 := syscall.Syscall6(procEnumProcessModules.Addr(), 4, uintptr(process), uintptr(unsafe.Pointer(module)), uintptr(cb), uintptr(unsafe.Pointer(cbNeeded)), 0, 0)
+       if r1 == 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+func EnumProcessModulesEx(process Handle, module *Handle, cb uint32, cbNeeded *uint32, filterFlag uint32) (err error) {
+       r1, _, e1 := syscall.Syscall6(procEnumProcessModulesEx.Addr(), 5, uintptr(process), uintptr(unsafe.Pointer(module)), uintptr(cb), uintptr(unsafe.Pointer(cbNeeded)), uintptr(filterFlag), 0)
+       if r1 == 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
 func EnumProcesses(processIds []uint32, bytesReturned *uint32) (err error) {
        var _p0 *uint32
        if len(processIds) > 0 {
@@ -3237,6 +3303,30 @@ func EnumProcesses(processIds []uint32, bytesReturned *uint32) (err error) {
        return
 }
 
+func GetModuleBaseName(process Handle, module Handle, baseName *uint16, size uint32) (err error) {
+       r1, _, e1 := syscall.Syscall6(procGetModuleBaseNameW.Addr(), 4, uintptr(process), uintptr(module), uintptr(unsafe.Pointer(baseName)), uintptr(size), 0, 0)
+       if r1 == 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+func GetModuleFileNameEx(process Handle, module Handle, filename *uint16, size uint32) (err error) {
+       r1, _, e1 := syscall.Syscall6(procGetModuleFileNameExW.Addr(), 4, uintptr(process), uintptr(module), uintptr(unsafe.Pointer(filename)), uintptr(size), 0, 0)
+       if r1 == 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+func GetModuleInformation(process Handle, module Handle, modinfo *ModuleInfo, cb uint32) (err error) {
+       r1, _, e1 := syscall.Syscall6(procGetModuleInformation.Addr(), 4, uintptr(process), uintptr(module), uintptr(unsafe.Pointer(modinfo)), uintptr(cb), 0, 0)
+       if r1 == 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
 func SubscribeServiceChangeNotifications(service Handle, eventType uint32, callback uintptr, callbackCtx uintptr, subscription *uintptr) (ret error) {
        ret = procSubscribeServiceChangeNotifications.Find()
        if ret != nil {
index ecb170d290cd27498874f12791294adcebcfaae6..ad08e583fb774eff633c165342805b0b9900a038 100644 (file)
@@ -1,4 +1,4 @@
-# github.com/google/pprof v0.0.0-20211001005136-7fe48b4c820b
+# github.com/google/pprof v0.0.0-20211104044539-f987b9c94b31
 ## explicit; go 1.14
 github.com/google/pprof/driver
 github.com/google/pprof/internal/binutils
@@ -15,8 +15,8 @@ github.com/google/pprof/profile
 github.com/google/pprof/third_party/d3
 github.com/google/pprof/third_party/d3flamegraph
 github.com/google/pprof/third_party/svgpan
-# github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639
-## explicit
+# github.com/ianlancetaylor/demangle v0.0.0-20210905161508-09a460cdf81d
+## explicit; go 1.12
 github.com/ianlancetaylor/demangle
 # golang.org/x/arch v0.0.0-20210901143047-ebb09ed340f1
 ## explicit; go 1.17
@@ -42,7 +42,7 @@ golang.org/x/mod/zip
 # golang.org/x/sync v0.0.0-20210220032951-036812b2e83c
 ## explicit
 golang.org/x/sync/semaphore
-# golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e
+# golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac
 ## explicit; go 1.17
 golang.org/x/sys/internal/unsafeheader
 golang.org/x/sys/plan9
index 35231cf91176f95914d037db2d8fcdc5940f95ff..7d982c75aa3a0721bdba1ce5def3a34d9fe03f53 100644 (file)
@@ -8,6 +8,6 @@ require (
 )
 
 require (
-       golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e // indirect
+       golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac // indirect
        golang.org/x/text v0.3.7 // indirect
 )
index 621d61384afbaf97f03f27efd1b46de441b62610..ff1279697dcc3ef973973ed1658a9b352a1f4e41 100644 (file)
@@ -2,7 +2,7 @@ golang.org/x/crypto v0.0.0-20210817164053-32db794688a5 h1:HWj/xjIHfjYU5nVXpTM0s3
 golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
 golang.org/x/net v0.0.0-20211005215030-d2e5035098b3 h1:G64nFNerDErBd2KdvHvIn3Ee6ccUQBTfhDZEO0DccfU=
 golang.org/x/net v0.0.0-20211005215030-d2e5035098b3/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
-golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e h1:XMgFehsDnnLGtjvjOfqWSUzt0alpTR1RSEuznObga2c=
-golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac h1:oN6lz7iLW/YC7un8pq+9bOLyXrprv2+DKfkJY+2LJJw=
+golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk=
 golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
index 683040db9bcb0316e158e287499ac6cfe1ad38ed..770a08e1fb4761a4f2d051a03d32731f9ca22e0b 100644 (file)
@@ -19,7 +19,7 @@ golang.org/x/net/idna
 golang.org/x/net/lif
 golang.org/x/net/nettest
 golang.org/x/net/route
-# golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e
+# golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac
 ## explicit; go 1.17
 golang.org/x/sys/cpu
 # golang.org/x/text v0.3.7